ilha 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-Dy3wGh4z.d.ts +297 -0
- package/dist/index.d.ts +2 -308
- package/dist/index.js +6 -1888
- package/dist/jsx-dev-runtime.d.ts +1 -2
- package/dist/jsx-dev-runtime.js +1 -2
- package/dist/jsx-runtime-BSfybS-R.d.ts +37 -0
- package/dist/jsx-runtime.d.ts +2 -3
- package/dist/jsx-runtime.js +1 -2
- package/package.json +23 -1
- package/dist/jsx-types-DSrM2NdI.d.ts +0 -26
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { Fragment, jsxDEV };
|
|
1
|
+
import{Fragment as e,jsxDEV as t}from"./jsx-runtime.js";export{e as Fragment,t as jsxDEV};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { v as RawHtml } from "./index-Dy3wGh4z.js";
|
|
2
|
+
|
|
3
|
+
//#region src/jsx-types.d.ts
|
|
4
|
+
declare namespace JSX {
|
|
5
|
+
type Child = unknown;
|
|
6
|
+
type ElementType = string | ((props: any) => any);
|
|
7
|
+
interface Element extends RawHtml {}
|
|
8
|
+
interface ElementChildrenAttribute {
|
|
9
|
+
children: {};
|
|
10
|
+
}
|
|
11
|
+
interface IntrinsicAttributes {
|
|
12
|
+
key?: string | number;
|
|
13
|
+
}
|
|
14
|
+
type IntrinsicElementProps = {
|
|
15
|
+
children?: Child;
|
|
16
|
+
class?: string | unknown[] | Record<string, boolean>;
|
|
17
|
+
className?: string | unknown[] | Record<string, boolean>;
|
|
18
|
+
htmlFor?: string;
|
|
19
|
+
[name: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
interface IntrinsicElements {
|
|
22
|
+
[name: string]: IntrinsicElementProps;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/jsx-runtime.d.ts
|
|
27
|
+
type JsxChild = unknown;
|
|
28
|
+
type JsxProps = Record<string, unknown> | null | undefined;
|
|
29
|
+
type JsxType = string | ((props: Record<string, unknown>) => unknown);
|
|
30
|
+
declare function jsx(type: JsxType, props: JsxProps, maybeKey?: JsxChild | string | number, ...restChildren: JsxChild[]): RawHtml;
|
|
31
|
+
declare const jsxs: typeof jsx;
|
|
32
|
+
declare function Fragment(props: {
|
|
33
|
+
children?: JsxChild;
|
|
34
|
+
} | null, ...children: JsxChild[]): RawHtml;
|
|
35
|
+
declare function jsxDEV(type: JsxType, props: JsxProps, maybeKey?: string | number, _source?: unknown, _self?: unknown): RawHtml;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { JSX as a, jsxs as i, jsx as n, jsxDEV as r, Fragment as t };
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export { Fragment, type JSX, jsx, jsxs };
|
|
1
|
+
import { a as JSX, i as jsxs, n as jsx, r as jsxDEV, t as Fragment } from "./jsx-runtime-BSfybS-R.js";
|
|
2
|
+
export { Fragment, JSX, jsx, jsxDEV, jsxs };
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { Fragment, jsx, jsxs };
|
|
1
|
+
import{__ilhaJsxSlot as e,html as t,raw as n}from"./index.js";const r=Symbol.for(`ilha.raw`),i=Symbol.for(`ilha.signalAccessor`),a=Symbol.for(`ilha.island`),o=Symbol.for(`ilha.islandCall`),s=Symbol.for(`ilha.renderPart`),c=/^[A-Za-z_:][A-Za-z0-9:._-]*$/,l=/^[A-Za-z][A-Za-z0-9]*$/,u=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),d=/^(-{2}[a-zA-Z][a-zA-Z0-9-]*|-?[a-zA-Z][a-zA-Z0-9-]*)$/,f=new Set([`href`,`src`,`action`,`formaction`,`cite`,`data`,`poster`]),p=/^(?!javascript:|data:text\/html|data:text\/xml|data:application\/xhtml\+xml|data:image\/svg|vbscript:)/i;function m(e){return!!(e&&typeof e==`object`&&r in e)}function h(e){return typeof e==`function`&&i in e}function g(e){return typeof e==`function`?a in e?!0:Object.getOwnPropertySymbols(e).some(e=>e.description===`ilha.island`):!1}function _(e){return e==null||typeof e!=`object`&&typeof e!=`function`?!1:o in e||Object.getOwnPropertySymbols(e).some(e=>e.description===`ilha.islandCall`)?!0:typeof e==`object`&&`island`in e&&g(e.island)}function v(e){return Array.isArray(e)?e.filter(Boolean).join(` `):e&&typeof e==`object`?Object.entries(e).filter(([,e])=>!!e).map(([e])=>e).join(` `):String(e)}function y(e,t){let n=e&&`children`in e?e.children:void 0;return(t.length>0?t:n===void 0?[]:[n]).flat(1)}function b(e){let t=String(e);if(t.trim().length===0)throw Error(`jsx key requires a non-empty string.`);if(t.includes(`:`))throw Error(`jsx key cannot contain the slot separator ":" (got "${t}").`);return t}function x(e,t){let n=e?.key,r=t??(typeof n==`string`||typeof n==`number`?n:void 0);if(r!=null)return b(r)}function S(e){return Object.entries(e).map(([e,t])=>{if(!d.test(e))return``;let n=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),r=String(t).replace(/["<>{};]/g,``);return/expression\(/i.test(r)||/^javascript:/i.test(r)?``:`${n}:${r}`}).filter(Boolean).join(`;`)}function C(e,t,n,r){if(r==null||r===!1||n===`children`||n===`key`||n===`__proto__`||n===`constructor`||n===`prototype`)return;if(n.startsWith(`bind:`)){let[i,a,...o]=n.split(`:`);if(i!==`bind`||o.length>0||!a||!l.test(a)||!h(r))return;e[e.length-1]+=` ${i}:${a}=`,t.push(r),e.push(``);return}if(!c.test(n))return;let i=n;if(i===`className`&&(i=`class`),i===`htmlFor`&&(i=`for`),!i.startsWith(`on`)&&(i===`class`&&(r=v(r)),i===`style`&&r&&typeof r==`object`&&(r=S(r)),!((f.has(i)||/:(href|src|action|formaction|cite|data|poster)$/.test(i))&&typeof r==`string`&&!p.test(r.trim())))){if(r===!0){e[e.length-1]+=` ${i}`;return}e[e.length-1]+=` ${i}="`,t.push(r),e.push(`"`)}}function w(e,n,r){let i=[`<${e}`],a=[];if(n)for(let[e,t]of Object.entries(n))C(i,a,e,t);if(i[i.length-1]+=`>`,!u.has(e)){for(let e of r)a.push(e),i.push(``);i[i.length-1]+=`</${e}>`}return t(i,...a)}function T(r,i,a,...o){let c=typeof a==`string`||typeof a==`number`,l=c?a:void 0,u=y(i,c||a===void 0?o:[a,...o]);if(typeof r==`function`){let a=x(i,typeof l==`string`||typeof l==`number`?l:void 0),o={...i,...u.length>0?{children:u}:{}};delete o.key;let c=r(Object.keys(o).length?o:{});return _(c)?(a!==void 0&&(c.key=a),t`${c}`):m(c)?c:typeof c==`string`&&g(r)?e(r,o,a):typeof c==`string`?t`${c}`:typeof c==`object`&&c&&Object.getPrototypeOf(c)===Object.prototype&&c[s]===!0&&typeof c.toString==`function`?n(String(c)):t`${c}`}return w(r,i,u)}const E=T;function D(e,...n){let r=y(e,n);return t([``,...r.map(()=>``)],...r)}function O(e,t,n,r,i){return T(e,t,n)}export{D as Fragment,T as jsx,O as jsxDEV,E as jsxs};
|
package/package.json
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ilha",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "A tiny, framework-free island architecture library",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"framework-free",
|
|
7
|
+
"frontend",
|
|
8
|
+
"hydration",
|
|
9
|
+
"island-architecture",
|
|
10
|
+
"islands",
|
|
11
|
+
"jsx",
|
|
12
|
+
"reactive",
|
|
13
|
+
"signals",
|
|
14
|
+
"ssr",
|
|
15
|
+
"web-components"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/ilhajs/ilha#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/ilhajs/ilha/issues"
|
|
20
|
+
},
|
|
5
21
|
"license": "MIT",
|
|
6
22
|
"author": "Ryuz <ryuzer@proton.me>",
|
|
7
23
|
"repository": {
|
|
@@ -12,9 +28,12 @@
|
|
|
12
28
|
"dist"
|
|
13
29
|
],
|
|
14
30
|
"type": "module",
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"module": "./dist/index.js",
|
|
15
33
|
"browser": {
|
|
16
34
|
"process": false
|
|
17
35
|
},
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
18
37
|
"exports": {
|
|
19
38
|
".": {
|
|
20
39
|
"types": "./dist/index.d.ts",
|
|
@@ -29,6 +48,9 @@
|
|
|
29
48
|
"import": "./dist/jsx-dev-runtime.js"
|
|
30
49
|
}
|
|
31
50
|
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
32
54
|
"scripts": {
|
|
33
55
|
"build": "tsc && tsdown",
|
|
34
56
|
"test": "bun test"
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { RawHtml } from "./index.js";
|
|
2
|
-
|
|
3
|
-
//#region src/jsx-types.d.ts
|
|
4
|
-
declare namespace JSX {
|
|
5
|
-
type Child = unknown;
|
|
6
|
-
type ElementType = string | ((props: any) => any);
|
|
7
|
-
interface Element extends RawHtml {}
|
|
8
|
-
interface ElementChildrenAttribute {
|
|
9
|
-
children: {};
|
|
10
|
-
}
|
|
11
|
-
interface IntrinsicAttributes {
|
|
12
|
-
key?: string | number;
|
|
13
|
-
}
|
|
14
|
-
type IntrinsicElementProps = {
|
|
15
|
-
children?: Child;
|
|
16
|
-
class?: string | unknown[] | Record<string, boolean>;
|
|
17
|
-
className?: string | unknown[] | Record<string, boolean>;
|
|
18
|
-
htmlFor?: string;
|
|
19
|
-
[name: string]: unknown;
|
|
20
|
-
};
|
|
21
|
-
interface IntrinsicElements {
|
|
22
|
-
[name: string]: IntrinsicElementProps;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { JSX as t };
|