@firsthandjs/dom 0.7.1 → 0.9.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/chunk-26MSEGYG.js +1 -0
- package/dist/chunk-NNHZJMZS.js +1 -0
- package/dist/chunk-TZRPGQ3R.js +1 -0
- package/dist/claim.d.ts +76 -0
- package/dist/claim.d.ts.map +1 -0
- package/dist/component.d.ts +36 -1
- package/dist/component.d.ts.map +1 -1
- package/dist/dev-chunk-5QV3XALZ.js +45 -0
- package/dist/{dev-chunk-2INCAQ6G.js → dev-chunk-HCAUM4JK.js} +54 -277
- package/dist/dev-chunk-HTXIHAW7.js +501 -0
- package/dist/dev.d.ts +34 -0
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.prod.d.ts +9 -0
- package/dist/dev.prod.d.ts.map +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/hydrate.d.ts +91 -0
- package/dist/hydrate.d.ts.map +1 -0
- package/dist/hydrate.dev.js +153 -0
- package/dist/hydrate.js +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.dev.js +19 -29
- package/dist/index.js +1 -1
- package/dist/insert.d.ts +112 -2
- package/dist/insert.d.ts.map +1 -1
- package/dist/internal.d.ts +4 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.dev.js +46 -8
- package/dist/internal.js +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/props.d.ts.map +1 -1
- package/dist/render.d.ts +9 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/template.d.ts.map +1 -1
- package/package.json +7 -2
- package/dist/chunk-QZ5SESOU.js +0 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import {
|
|
2
|
+
mount
|
|
3
|
+
} from "./dev-chunk-5QV3XALZ.js";
|
|
4
|
+
import {
|
|
5
|
+
hydration
|
|
6
|
+
} from "./dev-chunk-HTXIHAW7.js";
|
|
7
|
+
|
|
8
|
+
// packages/dom/src/hydrate.ts
|
|
9
|
+
var COMMENT_NODE = 8;
|
|
10
|
+
var TEXT_NODE = 3;
|
|
11
|
+
var OPEN = "[";
|
|
12
|
+
var claim = null;
|
|
13
|
+
var depth = 0;
|
|
14
|
+
var cursors = /* @__PURE__ */ new WeakMap();
|
|
15
|
+
var openers = [];
|
|
16
|
+
var offers = /* @__PURE__ */ new Map();
|
|
17
|
+
function hydrate(view, container = document.body) {
|
|
18
|
+
return mount(view, container, (body) => {
|
|
19
|
+
hydrateWith(container, body);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function hydrateWith(container, body) {
|
|
23
|
+
const outer = claim;
|
|
24
|
+
const previous = depth;
|
|
25
|
+
depth++;
|
|
26
|
+
hydration.current = claimer;
|
|
27
|
+
claim = { node: container.firstChild, end: null };
|
|
28
|
+
try {
|
|
29
|
+
return body();
|
|
30
|
+
} finally {
|
|
31
|
+
claim = outer;
|
|
32
|
+
depth = previous;
|
|
33
|
+
if (depth === 0) {
|
|
34
|
+
hydration.current = null;
|
|
35
|
+
finish();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function finish() {
|
|
40
|
+
for (let i = 0; i < openers.length; i++) {
|
|
41
|
+
const node = openers[i];
|
|
42
|
+
node.parentNode?.removeChild(node);
|
|
43
|
+
}
|
|
44
|
+
openers = [];
|
|
45
|
+
cursors = /* @__PURE__ */ new WeakMap();
|
|
46
|
+
offers = /* @__PURE__ */ new Map();
|
|
47
|
+
}
|
|
48
|
+
function adopt(tag) {
|
|
49
|
+
if (claim === null) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const node = claim.node;
|
|
53
|
+
if (node === null || node.nodeName !== tag) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
const after = node.nextSibling;
|
|
57
|
+
claim.node = after === claim.end ? null : after;
|
|
58
|
+
return node;
|
|
59
|
+
}
|
|
60
|
+
function claimRegion(parent, marker) {
|
|
61
|
+
if (marker !== null) {
|
|
62
|
+
const offered = offers.get(marker);
|
|
63
|
+
if (offered !== void 0) {
|
|
64
|
+
offers.delete(marker);
|
|
65
|
+
return offered;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const held = cursors.get(parent);
|
|
69
|
+
const fromTheTop = held === void 0;
|
|
70
|
+
const node = fromTheTop ? parent.firstChild : held;
|
|
71
|
+
let start;
|
|
72
|
+
let end;
|
|
73
|
+
const stop = fromTheTop ? marker : null;
|
|
74
|
+
let open = node;
|
|
75
|
+
while (open !== null && open !== stop && !isOpen(open)) {
|
|
76
|
+
open = open.nextSibling;
|
|
77
|
+
}
|
|
78
|
+
if (open !== null && open !== stop) {
|
|
79
|
+
end = closeOf(open);
|
|
80
|
+
if (marker !== null && marker !== end) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
openers.push(open);
|
|
84
|
+
start = open.nextSibling;
|
|
85
|
+
} else if (fromTheTop) {
|
|
86
|
+
start = node;
|
|
87
|
+
end = marker;
|
|
88
|
+
} else {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
cursors.set(parent, end === null ? null : end.nextSibling);
|
|
92
|
+
if (start === end) {
|
|
93
|
+
start = null;
|
|
94
|
+
}
|
|
95
|
+
const nodes = [];
|
|
96
|
+
for (let one = start; one !== null && one !== end; one = one.nextSibling) {
|
|
97
|
+
nodes.push(one);
|
|
98
|
+
}
|
|
99
|
+
const only = nodes.length === 1 ? nodes[0] : null;
|
|
100
|
+
return {
|
|
101
|
+
nodes: nodes.length === 0 ? null : only ?? nodes,
|
|
102
|
+
text: only !== null && only.nodeType === TEXT_NODE ? only.data : void 0,
|
|
103
|
+
region: { node: start, end }
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function within(region, body) {
|
|
107
|
+
const outer = claim;
|
|
108
|
+
claim = region;
|
|
109
|
+
try {
|
|
110
|
+
return body();
|
|
111
|
+
} finally {
|
|
112
|
+
claim = outer;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function isOpen(node) {
|
|
116
|
+
return node !== null && node.nodeType === COMMENT_NODE && node.nodeValue === OPEN;
|
|
117
|
+
}
|
|
118
|
+
function closeOf(open) {
|
|
119
|
+
let level = 0;
|
|
120
|
+
for (let node = open.nextSibling; node !== null; node = node.nextSibling) {
|
|
121
|
+
if (node.nodeType !== COMMENT_NODE) {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
if (isOpen(node)) {
|
|
125
|
+
level++;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (level === 0) {
|
|
129
|
+
return node;
|
|
130
|
+
}
|
|
131
|
+
level--;
|
|
132
|
+
}
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
function step(node) {
|
|
136
|
+
return isOpen(node) ? closeOf(node) : node;
|
|
137
|
+
}
|
|
138
|
+
function tagOf(html) {
|
|
139
|
+
return html.slice(1, html.search(/[\s/>]/)).toUpperCase();
|
|
140
|
+
}
|
|
141
|
+
function keep(slot, parent, anchor, claimed) {
|
|
142
|
+
parent.insertBefore(anchor, claimed.region.end);
|
|
143
|
+
slot.node = claimed.nodes === null ? anchor : [...Array.isArray(claimed.nodes) ? claimed.nodes : [claimed.nodes], anchor];
|
|
144
|
+
offers.set(anchor, claimed);
|
|
145
|
+
}
|
|
146
|
+
var claimer = { tag: tagOf, adopt, claim: claimRegion, within, keep, step };
|
|
147
|
+
export {
|
|
148
|
+
adopt,
|
|
149
|
+
claimRegion,
|
|
150
|
+
hydrate,
|
|
151
|
+
hydrateWith,
|
|
152
|
+
within
|
|
153
|
+
};
|
package/dist/hydrate.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as x}from"./chunk-26MSEGYG.js";import{b as a}from"./chunk-NNHZJMZS.js";var m=8,C=3,w="[",i=null,p=0,g=new WeakMap,c=[],N=new Map;function F(e,n=document.body){return x(e,n,l=>{M(n,l)})}function M(e,n){let l=i,o=p;p++,a.current=V,i={node:e.firstChild,end:null};try{return n()}finally{i=l,p=o,p===0&&(a.current=null,O())}}function O(){for(let e=0;e<c.length;e++){let n=c[e];n.parentNode?.removeChild(n)}c=[],g=new WeakMap,N=new Map}function S(e){if(i===null)return null;let n=i.node;if(n===null||n.nodeName!==e)return null;let l=n.nextSibling;return i.node=l===i.end?null:l,n}function v(e,n){if(n!==null){let r=N.get(n);if(r!==void 0)return N.delete(n),r}let l=g.get(e),o=l===void 0,h=o?e.firstChild:l,d,u,T=o?n:null,t=h;for(;t!==null&&t!==T&&!y(t);)t=t.nextSibling;if(t!==null&&t!==T){if(u=b(t),n!==null&&n!==u)return null;c.push(t),d=t.nextSibling}else if(o)d=h,u=n;else return null;g.set(e,u===null?null:u.nextSibling),d===u&&(d=null);let s=[];for(let r=d;r!==null&&r!==u;r=r.nextSibling)s.push(r);let f=s.length===1?s[0]:null;return{nodes:s.length===0?null:f??s,text:f!==null&&f.nodeType===C?f.data:void 0,region:{node:d,end:u}}}function E(e,n){let l=i;i=e;try{return n()}finally{i=l}}function y(e){return e!==null&&e.nodeType===m&&e.nodeValue===w}function b(e){let n=0;for(let l=e.nextSibling;l!==null;l=l.nextSibling)if(l.nodeType===m){if(y(l)){n++;continue}if(n===0)return l;n--}return null}function D(e){return y(e)?b(e):e}function R(e){return e.slice(1,e.search(/[\s/>]/)).toUpperCase()}function W(e,n,l,o){n.insertBefore(l,o.region.end),e.node=o.nodes===null?l:[...Array.isArray(o.nodes)?o.nodes:[o.nodes],l],N.set(l,o)}var V={tag:R,adopt:S,claim:v,within:E,keep:W,step:D};export{S as adopt,v as claimRegion,F as hydrate,M as hydrateWith,E as within};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Re-exports the reactive core so that applications have one import site.
|
|
5
5
|
*/
|
|
6
|
-
export { component, defineElement, setElementPrefix, createComponent } from './component.js';
|
|
6
|
+
export { component, defineElement, setElementPrefix, createComponent, view } from './component.js';
|
|
7
7
|
export { setComponentAdapter, FirsthandComponentError } from './adapter.js';
|
|
8
8
|
export type { ComponentAdapter } from './adapter.js';
|
|
9
|
-
export type { Component, ComponentOptions, AttributeCodec, View } from './component.js';
|
|
9
|
+
export type { Component, ComponentOptions, AttributeCodec, View, Render } from './component.js';
|
|
10
10
|
export { render } from './render.js';
|
|
11
11
|
export { portal } from './portal.js';
|
|
12
12
|
export { list } from './list.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5E,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,KAAK,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,OAAO,EACP,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,WAAW,EACX,OAAO,EACP,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,aAAa,EACb,MAAM,GACP,MAAM,mBAAmB,CAAC"}
|
package/dist/index.dev.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FirsthandComponentError,
|
|
3
|
-
applyChild,
|
|
4
3
|
component,
|
|
5
4
|
createComponent,
|
|
6
5
|
defineElement,
|
|
@@ -9,33 +8,23 @@ import {
|
|
|
9
8
|
off,
|
|
10
9
|
on,
|
|
11
10
|
setComponentAdapter,
|
|
12
|
-
setElementPrefix
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
createRoot((stop) => {
|
|
20
|
-
dispose = stop;
|
|
21
|
-
let slot = null;
|
|
22
|
-
slot = applyChild(container, null, null, untrack(view));
|
|
23
|
-
onCleanup(() => {
|
|
24
|
-
applyChild(container, null, slot, null);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
return dispose;
|
|
28
|
-
}
|
|
11
|
+
setElementPrefix,
|
|
12
|
+
view
|
|
13
|
+
} from "./dev-chunk-HCAUM4JK.js";
|
|
14
|
+
import {
|
|
15
|
+
render
|
|
16
|
+
} from "./dev-chunk-5QV3XALZ.js";
|
|
17
|
+
import "./dev-chunk-HTXIHAW7.js";
|
|
29
18
|
|
|
30
19
|
// packages/dom/src/portal.ts
|
|
31
|
-
import { onCleanup
|
|
32
|
-
function portal(
|
|
20
|
+
import { onCleanup } from "@firsthandjs/core";
|
|
21
|
+
function portal(view2, target) {
|
|
33
22
|
const nodes = [];
|
|
34
|
-
collectNodes(
|
|
23
|
+
collectNodes(view2, nodes);
|
|
35
24
|
for (let i = 0; i < nodes.length; i++) {
|
|
36
25
|
target.appendChild(nodes[i]);
|
|
37
26
|
}
|
|
38
|
-
|
|
27
|
+
onCleanup(() => {
|
|
39
28
|
for (let i = 0; i < nodes.length; i++) {
|
|
40
29
|
const node = nodes[i];
|
|
41
30
|
node.parentNode?.removeChild(node);
|
|
@@ -66,9 +55,9 @@ import {
|
|
|
66
55
|
computed,
|
|
67
56
|
effect,
|
|
68
57
|
batch,
|
|
69
|
-
untrack
|
|
70
|
-
onCleanup as
|
|
71
|
-
createRoot
|
|
58
|
+
untrack,
|
|
59
|
+
onCleanup as onCleanup2,
|
|
60
|
+
createRoot,
|
|
72
61
|
catchError,
|
|
73
62
|
runWithOwner,
|
|
74
63
|
createContext,
|
|
@@ -89,14 +78,14 @@ export {
|
|
|
89
78
|
computed,
|
|
90
79
|
createComponent,
|
|
91
80
|
createContext,
|
|
92
|
-
|
|
81
|
+
createRoot,
|
|
93
82
|
defineElement,
|
|
94
83
|
effect,
|
|
95
84
|
list,
|
|
96
85
|
mergeProps,
|
|
97
86
|
off,
|
|
98
87
|
on,
|
|
99
|
-
|
|
88
|
+
onCleanup2 as onCleanup,
|
|
100
89
|
portal,
|
|
101
90
|
provide,
|
|
102
91
|
render,
|
|
@@ -104,6 +93,7 @@ export {
|
|
|
104
93
|
setComponentAdapter,
|
|
105
94
|
setElementPrefix,
|
|
106
95
|
signal,
|
|
107
|
-
|
|
108
|
-
useContext
|
|
96
|
+
untrack,
|
|
97
|
+
useContext,
|
|
98
|
+
view
|
|
109
99
|
};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as d,b as i,e as f,f as s,h as a,i as m,j as l,k as x,l as C,m as h,x as y}from"./chunk-TZRPGQ3R.js";import{a as c}from"./chunk-26MSEGYG.js";import"./chunk-NNHZJMZS.js";import{onCleanup as u}from"@firsthandjs/core";function N(e,t){let o=[];p(e,o);for(let r=0;r<o.length;r++)t.appendChild(o[r]);return u(()=>{for(let r=0;r<o.length;r++){let n=o[r];n.parentNode?.removeChild(n)}}),null}function p(e,t){if(!(e==null||typeof e=="boolean")){if(Array.isArray(e)){for(let o=0;o<e.length;o++)p(e[o],t);return}if(typeof e=="object"&&typeof e.nodeType=="number"){t.push(e);return}t.push(document.createTextNode(String(e)))}}import{signal as D,computed as S,effect as T,batch as V,untrack as W,onCleanup as q,createRoot as z,catchError as B,runWithOwner as G,createContext as H,provide as I,useContext as J,FirsthandContextError as K,FirsthandCycleError as L,FirsthandReadonlyError as M}from"@firsthandjs/core";export{i as FirsthandComponentError,K as FirsthandContextError,L as FirsthandCycleError,M as FirsthandReadonlyError,V as batch,B as catchError,s as component,S as computed,m as createComponent,H as createContext,z as createRoot,l as defineElement,T as effect,x as list,y as mergeProps,h as off,C as on,q as onCleanup,N as portal,I as provide,c as render,G as runWithOwner,d as setComponentAdapter,f as setElementPrefix,D as signal,W as untrack,J as useContext,a as view};
|
package/dist/insert.d.ts
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
import { type Owner } from '@firsthandjs/core';
|
|
1
|
+
import { type Owner, type Signal } from '@firsthandjs/core';
|
|
2
|
+
import { type Claimed } from './claim.js';
|
|
2
3
|
/** What a child part currently owns in the DOM. */
|
|
3
4
|
export type ChildSlot = Node | Node[] | null;
|
|
5
|
+
/**
|
|
6
|
+
* Runs `body` with the parts inside it excused from removing their nodes.
|
|
7
|
+
*
|
|
8
|
+
* The caller is promising that the nodes those parts wrote into are about to
|
|
9
|
+
* be removed wholesale. `list` is the only caller, and `reconcile` is the
|
|
10
|
+
* promise it is keeping.
|
|
11
|
+
*/
|
|
12
|
+
export declare function discard(body: () => void): void;
|
|
4
13
|
declare const PART: unique symbol;
|
|
14
|
+
/**
|
|
15
|
+
* Marks an array as nodes, in order, with nothing to unpack.
|
|
16
|
+
*
|
|
17
|
+
* `applyChild` accepts arrays of anything — nested arrays, thunks, strings,
|
|
18
|
+
* dynamic children — so it walks what it is given and builds a flat list of
|
|
19
|
+
* nodes out of it. A keyed list has already done that walk: it has the nodes,
|
|
20
|
+
* it made the array, and nobody else can reach it. Walking it again is one
|
|
21
|
+
* allocation and ten thousand steps for a list of ten thousand rows.
|
|
22
|
+
*/
|
|
23
|
+
export declare const FLAT: unique symbol;
|
|
5
24
|
/**
|
|
6
25
|
* A dynamic child inside an array, carrying the scope it was written in.
|
|
7
26
|
*
|
|
@@ -24,6 +43,89 @@ export type DynamicChild = {
|
|
|
24
43
|
};
|
|
25
44
|
/** Marks a dynamic child of a fragment. Emitted by the compiler. */
|
|
26
45
|
export declare function part(thunk: () => unknown): DynamicChild;
|
|
46
|
+
/**
|
|
47
|
+
* One place a run writes to, and what it last put there.
|
|
48
|
+
*
|
|
49
|
+
* A render function runs as a whole, so the DOM it describes has to be the DOM
|
|
50
|
+
* it already made: created on the first run, written on every one after. These
|
|
51
|
+
* records are what survives between runs — the node, and the last value, so a
|
|
52
|
+
* run that produces what is already on screen writes nothing.
|
|
53
|
+
*/
|
|
54
|
+
export type Slot = {
|
|
55
|
+
/** What this site made, or what a write currently owns. */
|
|
56
|
+
node?: ChildSlot;
|
|
57
|
+
/** The last primitive written here, when the last thing written was one. */
|
|
58
|
+
text?: string | undefined;
|
|
59
|
+
/** The last value written to an attribute or a property. */
|
|
60
|
+
last?: unknown;
|
|
61
|
+
/** What the site made besides its node: parts, listeners, components. */
|
|
62
|
+
owner?: Owner;
|
|
63
|
+
/** The run that last reached this site. */
|
|
64
|
+
seen?: number;
|
|
65
|
+
/** A prop a run feeds a child, held so the child keeps its instance. */
|
|
66
|
+
cell?: Signal<unknown>;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Where a run keeps its sites.
|
|
70
|
+
*
|
|
71
|
+
* One per instance, made in the setup — which runs once, so there is nothing
|
|
72
|
+
* to look up and nothing ambient. What a site makes belongs to `owner`, the
|
|
73
|
+
* component's own, rather than to the run that happened to make it: a run's
|
|
74
|
+
* scope is cleared before it runs again, and anything left there would be
|
|
75
|
+
* disposed by the second run.
|
|
76
|
+
*/
|
|
77
|
+
export type Store = {
|
|
78
|
+
slots: (Slot | undefined)[];
|
|
79
|
+
owner: Owner | null;
|
|
80
|
+
/** Which run is in progress, so that what it did not reach can be found. */
|
|
81
|
+
generation: number;
|
|
82
|
+
/** The component this belongs to, for what development has to say about it. */
|
|
83
|
+
name: string;
|
|
84
|
+
/** Whether this run has changed anything. Development only. */
|
|
85
|
+
busy?: boolean;
|
|
86
|
+
/** How many runs in a row have changed nothing. Development only. */
|
|
87
|
+
quiet?: number;
|
|
88
|
+
};
|
|
89
|
+
/** Declared once per instance by the compiler, in the setup. */
|
|
90
|
+
export declare function store(name?: string): Store;
|
|
91
|
+
/** Notes that this run has actually changed something. */
|
|
92
|
+
export declare function wrote(store: Store): void;
|
|
93
|
+
/** The record for one site, made the first time a run reaches it. */
|
|
94
|
+
export declare function site(store: Store, index: number): Slot;
|
|
95
|
+
/**
|
|
96
|
+
* Opens a site: what it makes now belongs to the instance, not to this run.
|
|
97
|
+
*
|
|
98
|
+
* Returns the owner to restore, which the compiler hands back to `close`.
|
|
99
|
+
*/
|
|
100
|
+
export declare function open(store: Store, slot: Slot): Owner | null;
|
|
101
|
+
export declare function close(previous: Owner | null): void;
|
|
102
|
+
/**
|
|
103
|
+
* Ends a run, and disposes what it did not reach.
|
|
104
|
+
*
|
|
105
|
+
* A branch the run has left is gone, not hidden: its components run their
|
|
106
|
+
* cleanups and its parts stop, exactly as if the markup had never been there.
|
|
107
|
+
* Coming back builds it again. That is what the control flow says, so it is
|
|
108
|
+
* what happens.
|
|
109
|
+
*/
|
|
110
|
+
export declare function ran<T>(store: Store, value: T): T;
|
|
111
|
+
/**
|
|
112
|
+
* A prop whose value belongs to the run, as something the child can hold.
|
|
113
|
+
*
|
|
114
|
+
* The child keeps its instance across runs, so its props cannot be getters
|
|
115
|
+
* over the run that made them — that value belongs to one call. It gets a cell
|
|
116
|
+
* instead, made the first time and written afterwards, so a prop that did not
|
|
117
|
+
* change wakes nothing.
|
|
118
|
+
*/
|
|
119
|
+
export declare function cell(store: Store, index: number, value: unknown): Signal<unknown>;
|
|
120
|
+
/**
|
|
121
|
+
* Writes a child position a run owns.
|
|
122
|
+
*
|
|
123
|
+
* The same text twice is not a write: `data` would accept it, and measuring
|
|
124
|
+
* says that comparing a remembered string costs half what setting one does.
|
|
125
|
+
* Anything else goes through `applyChild`, where a node that has not moved is
|
|
126
|
+
* recognised and left where it is.
|
|
127
|
+
*/
|
|
128
|
+
export declare function writeChild(store: Store, index: number, parent: Node, marker: Node | null, value: unknown): void;
|
|
27
129
|
/**
|
|
28
130
|
* Binds a dynamic child position.
|
|
29
131
|
*
|
|
@@ -31,7 +133,15 @@ export declare function part(thunk: () => unknown): DynamicChild;
|
|
|
31
133
|
* The thunk is evaluated once inside a tracking scope; if it read nothing
|
|
32
134
|
* reactive, no effect is retained (ADR-0009).
|
|
33
135
|
*/
|
|
34
|
-
export declare function insert(parent: Node, value: unknown, marker?: Node | null
|
|
136
|
+
export declare function insert(parent: Node, value: unknown, marker?: Node | null,
|
|
137
|
+
/**
|
|
138
|
+
* A region already claimed, handed down rather than looked up.
|
|
139
|
+
*
|
|
140
|
+
* The compiler never passes this. It is how a part that turns out to
|
|
141
|
+
* produce another part gives the markup it claimed to the part that will
|
|
142
|
+
* actually own it — see the `function` branch below.
|
|
143
|
+
*/
|
|
144
|
+
seed?: Claimed | null): void;
|
|
35
145
|
/** Applies one value to a child slot and returns the slot's new contents. */
|
|
36
146
|
export declare function applyChild(parent: Node, marker: Node | null, current: ChildSlot, value: unknown): ChildSlot;
|
|
37
147
|
/**
|
package/dist/insert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../src/insert.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../src/insert.ts"],"names":[],"mappings":"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"}
|
package/dist/internal.d.ts
CHANGED
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const PROTOCOL_VERSION = 1;
|
|
13
13
|
export { template, path } from './template.js';
|
|
14
|
-
export {
|
|
15
|
-
export
|
|
14
|
+
export { first, next } from './claim.js';
|
|
15
|
+
export { insert, applyChild, reconcile, part, store, site, open, close, ran, wrote, cell, writeChild, } from './insert.js';
|
|
16
|
+
export type { DynamicChild, ChildSlot, Slot, Store } from './insert.js';
|
|
16
17
|
export { setAttribute, setAttributeNS, setProperty, setBoolean, setClass, setClassList, setStyle, setStyleObject, } from './attributes.js';
|
|
17
18
|
export { on, off } from './events.js';
|
|
18
19
|
export { applyProp, spread, mergeProps, rest } from './props.js';
|
|
19
20
|
export { bind } from '@firsthandjs/core';
|
|
20
21
|
export { label } from './dev.js';
|
|
21
22
|
export { list } from './list.js';
|
|
22
|
-
export { createComponent, isComponent, COMPONENT } from './component.js';
|
|
23
|
+
export { createComponent, isComponent, view, COMPONENT, VIEW } from './component.js';
|
|
23
24
|
//# sourceMappingURL=internal.d.ts.map
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,GAAG,EACH,KAAK,EACL,IAAI,EACJ,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EACL,YAAY,EACZ,cAAc,EACd,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAGzC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/internal.dev.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COMPONENT,
|
|
3
|
-
|
|
3
|
+
VIEW,
|
|
4
4
|
applyProp,
|
|
5
5
|
createComponent,
|
|
6
|
-
insert,
|
|
7
6
|
isComponent,
|
|
8
|
-
label,
|
|
9
7
|
list,
|
|
10
8
|
mergeProps,
|
|
11
9
|
off,
|
|
12
10
|
on,
|
|
13
|
-
part,
|
|
14
|
-
reconcile,
|
|
15
11
|
rest,
|
|
16
12
|
setAttribute,
|
|
17
13
|
setAttributeNS,
|
|
@@ -21,13 +17,43 @@ import {
|
|
|
21
17
|
setProperty,
|
|
22
18
|
setStyle,
|
|
23
19
|
setStyleObject,
|
|
24
|
-
spread
|
|
25
|
-
|
|
20
|
+
spread,
|
|
21
|
+
view
|
|
22
|
+
} from "./dev-chunk-HCAUM4JK.js";
|
|
23
|
+
import {
|
|
24
|
+
applyChild,
|
|
25
|
+
cell,
|
|
26
|
+
close,
|
|
27
|
+
devHydrationMismatch,
|
|
28
|
+
first,
|
|
29
|
+
hydration,
|
|
30
|
+
insert,
|
|
31
|
+
label,
|
|
32
|
+
next,
|
|
33
|
+
open,
|
|
34
|
+
part,
|
|
35
|
+
ran,
|
|
36
|
+
reconcile,
|
|
37
|
+
site,
|
|
38
|
+
store,
|
|
39
|
+
writeChild,
|
|
40
|
+
wrote
|
|
41
|
+
} from "./dev-chunk-HTXIHAW7.js";
|
|
26
42
|
|
|
27
43
|
// packages/dom/src/template.ts
|
|
28
44
|
function template(html, isFragment = false) {
|
|
29
45
|
let source;
|
|
46
|
+
let expected;
|
|
30
47
|
return () => {
|
|
48
|
+
const claimer = hydration.current;
|
|
49
|
+
if (claimer !== null) {
|
|
50
|
+
expected ??= claimer.tag(html);
|
|
51
|
+
const claimed = claimer.adopt(expected);
|
|
52
|
+
if (claimed !== null) {
|
|
53
|
+
devHydrationMismatch(claimed, html);
|
|
54
|
+
return claimed;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
31
57
|
if (source === void 0) {
|
|
32
58
|
const element = document.createElement("template");
|
|
33
59
|
element.innerHTML = html;
|
|
@@ -54,19 +80,26 @@ var PROTOCOL_VERSION = 1;
|
|
|
54
80
|
export {
|
|
55
81
|
COMPONENT,
|
|
56
82
|
PROTOCOL_VERSION,
|
|
83
|
+
VIEW,
|
|
57
84
|
applyChild,
|
|
58
85
|
applyProp,
|
|
59
86
|
bind,
|
|
87
|
+
cell,
|
|
88
|
+
close,
|
|
60
89
|
createComponent,
|
|
90
|
+
first,
|
|
61
91
|
insert,
|
|
62
92
|
isComponent,
|
|
63
93
|
label,
|
|
64
94
|
list,
|
|
65
95
|
mergeProps,
|
|
96
|
+
next,
|
|
66
97
|
off,
|
|
67
98
|
on,
|
|
99
|
+
open,
|
|
68
100
|
part,
|
|
69
101
|
path,
|
|
102
|
+
ran,
|
|
70
103
|
reconcile,
|
|
71
104
|
rest,
|
|
72
105
|
setAttribute,
|
|
@@ -77,6 +110,11 @@ export {
|
|
|
77
110
|
setProperty,
|
|
78
111
|
setStyle,
|
|
79
112
|
setStyleObject,
|
|
113
|
+
site,
|
|
80
114
|
spread,
|
|
81
|
-
|
|
115
|
+
store,
|
|
116
|
+
template,
|
|
117
|
+
view,
|
|
118
|
+
writeChild,
|
|
119
|
+
wrote
|
|
82
120
|
};
|
package/dist/internal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as O,d as g,g as E,h as P,i as T,k as w,l as L,m as M,n as j,o as v,p as A,q as F,r as H,s as I,t as R,u as V,v as B,w as D,x as W,y as _}from"./chunk-TZRPGQ3R.js";import{a as p,b as i,c as s,d as a,g as d,h as m,i as f,j as c,k as u,l as x,m as y,n as C,o as N,p as h,q as b,r as S}from"./chunk-NNHZJMZS.js";function k(n,l=!1){let t,o;return()=>{let r=i.current;if(r!==null){o??=r.tag(n);let e=r.adopt(o);if(e!==null)return e}if(t===void 0){let e=document.createElement("template");e.innerHTML=n,t=l?e.content:e.content.firstChild}return t.cloneNode(!0)}}function q(n,...l){let t=n;for(let o=0;o<l.length;o++){let r=t.firstChild;for(let e=l[o];e>0;e--)r=r.nextSibling;t=r}return t}import{bind as oe}from"@firsthandjs/core";var Q=1;export{O as COMPONENT,Q as PROTOCOL_VERSION,g as VIEW,b as applyChild,B as applyProp,oe as bind,C as cell,x as close,T as createComponent,s as first,h as insert,E as isComponent,p as label,w as list,W as mergeProps,a as next,M as off,L as on,u as open,d as part,q as path,y as ran,S as reconcile,_ as rest,j as setAttribute,v as setAttributeNS,F as setBoolean,H as setClass,I as setClassList,A as setProperty,R as setStyle,V as setStyleObject,c as site,D as spread,m as store,k as template,P as view,N as writeChild,f as wrote};
|
package/dist/list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../src/list.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../src/list.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAW3B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,IAAI,EAAE,MAAM,SAAS,CAAC,EAAE,EACxB,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAC1C,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,OAAO,GACtE,MAAM,IAAI,EAAE,CAyDd"}
|
package/dist/props.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../src/props.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../src/props.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CA8C3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAa5E;AAED,+CAA+C;AAC/C,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAM1E;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAazF;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB"}
|
package/dist/render.d.ts
CHANGED
|
@@ -10,4 +10,13 @@ import type { View } from './component.js';
|
|
|
10
10
|
* children.
|
|
11
11
|
*/
|
|
12
12
|
export declare function render(view: () => View, container?: ParentNode): Dispose;
|
|
13
|
+
/**
|
|
14
|
+
* The whole of mounting, with one hole in it.
|
|
15
|
+
*
|
|
16
|
+
* `around` is how `@firsthandjs/dom/hydrate` gets in: it wraps the run so that
|
|
17
|
+
* what the view builds is adopted rather than created. `render` passes
|
|
18
|
+
* nothing, which is why a build without a server contains neither the wrapper
|
|
19
|
+
* nor anything it would have called.
|
|
20
|
+
*/
|
|
21
|
+
export declare function mount(view: () => View, container: ParentNode, around: ((body: () => void) => void) | null): Dispose;
|
|
13
22
|
//# sourceMappingURL=render.d.ts.map
|
package/dist/render.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,SAAS,GAAE,UAA0B,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,SAAS,GAAE,UAA0B,GAAG,OAAO,CAEvF;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,IAAI,EAChB,SAAS,EAAE,UAAU,EACrB,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,GAAG,IAAI,GAC1C,OAAO,CAcT"}
|
package/dist/template.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC;AAEzC,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,UAAQ,GAAG,eAAe,CA+B1E;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAUpE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firsthandjs/dom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "DOM parts, templates, components, portals and keyed lists for Firsthand.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"development": "./dist/index.dev.js",
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
|
+
"./hydrate": {
|
|
15
|
+
"types": "./dist/hydrate.d.ts",
|
|
16
|
+
"development": "./dist/hydrate.dev.js",
|
|
17
|
+
"default": "./dist/hydrate.js"
|
|
18
|
+
},
|
|
14
19
|
"./internal": {
|
|
15
20
|
"types": "./dist/internal.d.ts",
|
|
16
21
|
"development": "./dist/internal.dev.js",
|
|
@@ -25,7 +30,7 @@
|
|
|
25
30
|
"LICENSE"
|
|
26
31
|
],
|
|
27
32
|
"dependencies": {
|
|
28
|
-
"@firsthandjs/core": "0.
|
|
33
|
+
"@firsthandjs/core": "0.9.0"
|
|
29
34
|
},
|
|
30
35
|
"engines": {
|
|
31
36
|
"node": ">=20.11.0"
|