Compare commits
8 commits
2c8d95a18d
...
96e70ecb2f
Author | SHA1 | Date | |
---|---|---|---|
Cat /dev/Nulo | 96e70ecb2f | ||
Cat /dev/Nulo | 5b2e1f57bb | ||
Cat /dev/Nulo | 86316ee642 | ||
Cat /dev/Nulo | 62c36650c1 | ||
Cat /dev/Nulo | d57afae810 | ||
Cat /dev/Nulo | f0902a5413 | ||
Cat /dev/Nulo | 295e4d3b02 | ||
Cat /dev/Nulo | b57b14a49a |
8
html.ts
8
html.ts
|
@ -1,17 +1,17 @@
|
|||
// Inspirado en https://gitea.nulo.in/Nulo/html.lua/src/commit/cb7e35dcca0e45b397baf628f5e1a162a2269638/html.lua
|
||||
|
||||
interface VirtualElement {
|
||||
export interface VirtualElement {
|
||||
__element_type: string;
|
||||
things: Thing[];
|
||||
}
|
||||
interface RawHtml {
|
||||
export interface RawHtml {
|
||||
__raw: string;
|
||||
}
|
||||
interface Attributes {
|
||||
[key: string]: string | number;
|
||||
}
|
||||
type Thing = VirtualElement | RawHtml | Attributes | string;
|
||||
type Renderable = VirtualElement | RawHtml | string;
|
||||
export type Renderable = VirtualElement | RawHtml | string;
|
||||
|
||||
export const basicElement =
|
||||
(__element_type: string) =>
|
||||
|
@ -44,7 +44,9 @@ export const figure = basicElement("figure");
|
|||
export const figcaption = basicElement("figcaption");
|
||||
export const article = basicElement("article");
|
||||
export const nav = basicElement("nav");
|
||||
export const header = basicElement("header");
|
||||
export const main = basicElement("main");
|
||||
export const section = basicElement("section");
|
||||
|
||||
// TODO: actually escape
|
||||
const escapeHTML = (string: string) => string;
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
{
|
||||
"name": "@nulo/html.js",
|
||||
"version": "0.0.2",
|
||||
"type": "module",
|
||||
"version": "0.0.6",
|
||||
"description": "",
|
||||
"main": "dist/html.js",
|
||||
"files": [
|
||||
"dist/**.js",
|
||||
"dist/**.d.ts"
|
||||
],
|
||||
"files": ["dist/**.js", "dist/**.d.ts"],
|
||||
"scripts": {
|
||||
"prepublish": "tsc"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue