Compare commits

...

8 commits

Author SHA1 Message Date
Cat /dev/Nulo 96e70ecb2f 0.0.6 2023-01-12 15:30:34 -03:00
Cat /dev/Nulo 5b2e1f57bb type module 2023-01-12 15:30:21 -03:00
Cat /dev/Nulo 86316ee642 0.0.5 2023-01-12 14:59:05 -03:00
Cat /dev/Nulo 62c36650c1 <section> 2023-01-12 14:58:36 -03:00
Cat /dev/Nulo d57afae810 0.0.4 2023-01-12 14:57:51 -03:00
Cat /dev/Nulo f0902a5413 <header> 2023-01-12 14:57:43 -03:00
Cat /dev/Nulo 295e4d3b02 0.0.3 2023-01-12 14:54:35 -03:00
Cat /dev/Nulo b57b14a49a export types 2023-01-12 14:54:22 -03:00
2 changed files with 8 additions and 8 deletions

View file

@ -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;

View file

@ -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"
},