apprun 4.0.0 → 6.0.0-rc.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/CHANGELOG.md +235 -12
- package/LICENSE +1 -1
- package/README.md +225 -110
- package/apprun.d.ts +240 -34
- package/cli/app.js +29 -0
- package/cli/colors.js +69 -0
- package/cli/index.html +13 -0
- package/cli/index.js +96 -0
- package/dist/apprun-code.js +2 -0
- package/dist/apprun-code.js.map +1 -0
- package/dist/apprun-dev-tools.js +1 -1
- package/dist/apprun-dev-tools.js.map +1 -1
- package/dist/apprun-html.esm.js +34 -0
- package/dist/apprun-html.esm.js.map +1 -0
- package/dist/apprun-html.js +2 -1
- package/dist/apprun-html.js.LICENSE.txt +11 -0
- package/dist/apprun-html.js.map +1 -1
- package/dist/apprun-play.js +2 -0
- package/dist/apprun-play.js.map +1 -0
- package/dist/apprun.esm.js +2 -0
- package/dist/apprun.esm.js.map +1 -0
- package/dist/apprun.js +1 -1
- package/dist/apprun.js.map +1 -1
- package/dist/createState.js +2 -0
- package/dist/createState.js.map +1 -0
- package/esm/add-components.js +90 -0
- package/esm/add-components.js.map +1 -0
- package/esm/app.js +209 -0
- package/esm/app.js.map +1 -0
- package/esm/apprun-code.js +170 -0
- package/esm/apprun-code.js.map +1 -0
- package/esm/apprun-dev-tools-tests.js +95 -0
- package/esm/apprun-dev-tools-tests.js.map +1 -0
- package/esm/apprun-dev-tools.js +281 -0
- package/esm/apprun-dev-tools.js.map +1 -0
- package/esm/apprun-html.js +24 -0
- package/esm/apprun-html.js.map +1 -0
- package/esm/apprun-play.js +248 -0
- package/esm/apprun-play.js.map +1 -0
- package/esm/apprun.js +220 -0
- package/esm/apprun.js.map +1 -0
- package/esm/component.js +413 -0
- package/esm/component.js.map +1 -0
- package/esm/createState.js +9 -0
- package/esm/createState.js.map +1 -0
- package/esm/decorator.js +88 -0
- package/esm/decorator.js.map +1 -0
- package/esm/directive.js +306 -0
- package/esm/directive.js.map +1 -0
- package/esm/router.js +345 -0
- package/esm/router.js.map +1 -0
- package/esm/type-utils.js +90 -0
- package/esm/type-utils.js.map +1 -0
- package/esm/types.js +58 -0
- package/esm/types.js.map +1 -0
- package/esm/vdom-lit-html.js +65 -0
- package/esm/vdom-lit-html.js.map +1 -0
- package/esm/vdom-my-prop-attr.js +227 -0
- package/esm/vdom-my-prop-attr.js.map +1 -0
- package/esm/vdom-my.js +293 -0
- package/esm/vdom-my.js.map +1 -0
- package/esm/vdom-to-html.js +54 -0
- package/esm/vdom-to-html.js.map +1 -0
- package/esm/vdom.js +28 -0
- package/esm/vdom.js.map +1 -0
- package/esm/version.js +15 -0
- package/esm/version.js.map +1 -0
- package/esm/web-component.js +155 -0
- package/esm/web-component.js.map +1 -0
- package/jsx-runtime.js +2 -0
- package/jsx-runtime.js.map +1 -0
- package/package.json +90 -41
- package/.travis.yml +0 -10
- package/.vscode/launch.json +0 -19
- package/BACKERS.md +0 -3
- package/apprun-cli.js +0 -177
- package/cli-templates/_gitignore +0 -6
- package/cli-templates/component.ts_ +0 -16
- package/cli-templates/index.html +0 -11
- package/cli-templates/karma.conf.js +0 -24
- package/cli-templates/main.ts_ +0 -13
- package/cli-templates/readme.md +0 -7
- package/cli-templates/spa_index.html +0 -14
- package/cli-templates/spa_main.ts_ +0 -47
- package/cli-templates/spec.ts_ +0 -11
- package/cli-templates/tsconfig.json +0 -12
- package/cli-templates/webpack.config.js +0 -23
- package/demo-html/app.js +0 -2
- package/demo-html/app.js.map +0 -1
- package/demo-html/counter-c.html +0 -29
- package/demo-html/counter-wc-event.html +0 -29
- package/demo-html/counter-wc.html +0 -29
- package/demo-html/counter.html +0 -26
- package/demo-html/index.html +0 -14
- package/demo-html/main.tsx +0 -31
- package/docs/README.md +0 -326
- package/docs/index.html +0 -23
- package/index.html +0 -85
- package/logo.png +0 -0
- package/src/app.ts +0 -69
- package/src/apprun-dev-tools.tsx +0 -67
- package/src/apprun-html.ts +0 -13
- package/src/apprun.ts +0 -53
- package/src/component.ts +0 -189
- package/src/createComponent.tsx +0 -38
- package/src/decorator.ts +0 -36
- package/src/router.ts +0 -19
- package/src/types.ts +0 -9
- package/src/vdom-html.ts +0 -17
- package/src/vdom-my.ts +0 -191
- package/src/vdom-to-html.tsx +0 -45
- package/src/vdom.ts +0 -7
- package/src/web-component.ts +0 -29
- package/tests/app-rx.spec_ +0 -41
- package/tests/app.spec.ts +0 -122
- package/tests/application.spec.tsx +0 -23
- package/tests/component.spec.tsx +0 -296
- package/tests/custom-element.spec.tsx +0 -19
- package/tests/data-attr.spec.tsx +0 -42
- package/tests/decorator.spec.tsx +0 -104
- package/tests/fragment.spec.tsx +0 -79
- package/tests/hyperscript.spec.ts +0 -43
- package/tests/node-test.js +0 -7
- package/tests/router.spec.ts +0 -69
- package/tests/stateful-component.spec.tsx +0 -248
- package/tests/typed.spec.tsx +0 -63
- package/tests/vdom-html.spec.ts +0 -35
- package/tests/vdom-jsx.spec.tsx +0 -131
- package/tests/vdom-my.spec.tsx +0 -195
- package/tests/view-engine.spec.js +0 -59
- package/tsconfig.json +0 -11
- package/tslint.json +0 -124
- package/typescriptreact.json +0 -87
- package/viewEngine.js +0 -54
- package/webpack.config.js +0 -30
package/esm/vdom-my.js
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/** * VDOM Implementation for AppRun
|
|
2
|
+
*
|
|
3
|
+
* Notes for AppRun’s key prop
|
|
4
|
+
* Use the key prop only if you need to preserve browser-side DOM state (such as cursor
|
|
5
|
+
* position in an <input>, focus, or maintaining state in inline components).
|
|
6
|
+
*
|
|
7
|
+
* For most use cases, especially with stateless or purely data-driven UIs, key is not
|
|
8
|
+
* needed and may decrease performance by forcing DOM moves.
|
|
9
|
+
*
|
|
10
|
+
* AppRun aggressively updates DOM to match your vdom, so DOM node preservation is
|
|
11
|
+
* only valuable when you intentionally depend on browser-managed state.
|
|
12
|
+
*
|
|
13
|
+
* | Use Case | Should I use `key`? | Why |
|
|
14
|
+
* | ----------------------------- | ------------------- | --------------------- |
|
|
15
|
+
* | Preserve input cursor/focus | ✅ Yes | Keeps browser state |
|
|
16
|
+
* | Inline stateful component | ✅ Yes | Preserves component |
|
|
17
|
+
* | Regular data list (stateless) | 🚫 No | Unnecessary DOM moves |
|
|
18
|
+
* | Purely visual updates | 🚫 No | No state to preserve |
|
|
19
|
+
*
|
|
20
|
+
* Features:
|
|
21
|
+
* - Virtual DOM rendering and diffing for efficient DOM updates
|
|
22
|
+
* - JSX Fragment support for both Babel and TypeScript
|
|
23
|
+
* - Element creation with props, children, and event handling
|
|
24
|
+
* - SVG element support with proper namespace handling
|
|
25
|
+
* - Component lifecycle management and caching
|
|
26
|
+
* - Parent-scoped keyed element optimization for memory-safe DOM reuse
|
|
27
|
+
* - Trusted HTML insertion and text node creation
|
|
28
|
+
* - Directive processing integration
|
|
29
|
+
*
|
|
30
|
+
* Implementation:
|
|
31
|
+
* - Builds keyed lookup from the current parent element instead of global state
|
|
32
|
+
* - Sweeps stale child component cache entries after each parent render
|
|
33
|
+
* - Supports both string and function-based tags
|
|
34
|
+
* - Handles component mounting and state management
|
|
35
|
+
* - Optimized children updating with minimal DOM operations
|
|
36
|
+
* - Memory-efficient child component caching tied to latest render usage
|
|
37
|
+
*
|
|
38
|
+
* Recent Changes:
|
|
39
|
+
* - 2026-06-19: Added trustedHTML alias and removed _html: text-prefix parsing
|
|
40
|
+
* - 2026-06-19: Scoped keyed reconciliation to the current parent and added child component cache eviction
|
|
41
|
+
* - 2026-06-19: Preserved explicit falsy component ids such as 0 in child component cache keys
|
|
42
|
+
* - Added comprehensive key prop usage documentation and guidelines
|
|
43
|
+
*/
|
|
44
|
+
import directive from './directive';
|
|
45
|
+
import { updateProps } from './vdom-my-prop-attr';
|
|
46
|
+
export function Fragment(props, ...children) {
|
|
47
|
+
return collect(children);
|
|
48
|
+
}
|
|
49
|
+
function collect(children) {
|
|
50
|
+
const ch = [];
|
|
51
|
+
const push = (c) => {
|
|
52
|
+
if (c !== null && c !== undefined && c !== '' && c !== false) {
|
|
53
|
+
ch.push((typeof c === 'function' || typeof c === 'object') ? c : `${c}`);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
children && children.forEach(c => {
|
|
57
|
+
if (Array.isArray(c)) {
|
|
58
|
+
c.forEach(i => push(i));
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
push(c);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return ch;
|
|
65
|
+
}
|
|
66
|
+
// Compatibility export. Keyed reconciliation is now parent-scoped and has no global cache.
|
|
67
|
+
export function clearKeyCache() {
|
|
68
|
+
}
|
|
69
|
+
export function createElement(tag, props, ...children) {
|
|
70
|
+
const ch = collect(children);
|
|
71
|
+
if (typeof tag === 'string')
|
|
72
|
+
return { tag, props, children: ch };
|
|
73
|
+
else if (Array.isArray(tag))
|
|
74
|
+
return tag; // JSX fragments - babel
|
|
75
|
+
else if (tag === undefined && children)
|
|
76
|
+
return ch; // JSX fragments - typescript
|
|
77
|
+
else if (Object.getPrototypeOf(tag).__isAppRunComponent)
|
|
78
|
+
return { tag, props, children: ch }; // createComponent(tag, { ...props, children });
|
|
79
|
+
else if (typeof tag === 'function')
|
|
80
|
+
return tag(props, ch);
|
|
81
|
+
else
|
|
82
|
+
throw new Error(`Unknown tag in vdom ${tag}`);
|
|
83
|
+
}
|
|
84
|
+
;
|
|
85
|
+
export const updateElement = (element, nodes, component = {}) => {
|
|
86
|
+
// tslint:disable-next-line
|
|
87
|
+
if (nodes == null || nodes === false)
|
|
88
|
+
return;
|
|
89
|
+
const el = (typeof element === 'string' && element) ?
|
|
90
|
+
document.getElementById(element) || document.querySelector(element) : element;
|
|
91
|
+
nodes = directive(nodes, component);
|
|
92
|
+
render(el, nodes, component);
|
|
93
|
+
};
|
|
94
|
+
function render(element, nodes, parent = {}) {
|
|
95
|
+
// tslint:disable-next-line
|
|
96
|
+
if (nodes == null || nodes === false)
|
|
97
|
+
return;
|
|
98
|
+
beginComponentCacheRender(parent);
|
|
99
|
+
nodes = createComponent(nodes, parent);
|
|
100
|
+
sweepComponentCache(parent);
|
|
101
|
+
if (!element)
|
|
102
|
+
return;
|
|
103
|
+
const isSvg = element.nodeName === "SVG";
|
|
104
|
+
if (Array.isArray(nodes)) {
|
|
105
|
+
updateChildren(element, nodes, isSvg);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
updateChildren(element, [nodes], isSvg);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function same(el, node) {
|
|
112
|
+
// if (!el || !node) return false;
|
|
113
|
+
const key1 = el.nodeName;
|
|
114
|
+
const key2 = `${node.tag || ''}`;
|
|
115
|
+
return key1.toUpperCase() === key2.toUpperCase();
|
|
116
|
+
}
|
|
117
|
+
function update(element, node, isSvg) {
|
|
118
|
+
// console.assert(!!element);
|
|
119
|
+
isSvg = isSvg || node.tag === "svg";
|
|
120
|
+
if (!same(element, node)) {
|
|
121
|
+
element.parentNode.replaceChild(create(node, isSvg), element);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
updateChildren(element, node.children, isSvg);
|
|
125
|
+
updateProps(element, node.props, isSvg);
|
|
126
|
+
}
|
|
127
|
+
function updateChildren(element, children, isSvg) {
|
|
128
|
+
const keyedChildren = {};
|
|
129
|
+
Array.from(element.childNodes || []).forEach((child) => {
|
|
130
|
+
if (child.key !== undefined && child.key !== null)
|
|
131
|
+
keyedChildren[keyId(child.key)] = child;
|
|
132
|
+
});
|
|
133
|
+
const old_len = element.childNodes?.length || 0;
|
|
134
|
+
const new_len = children?.length || 0;
|
|
135
|
+
const len = Math.min(old_len, new_len);
|
|
136
|
+
for (let i = 0; i < len; i++) {
|
|
137
|
+
const child = children[i];
|
|
138
|
+
const el = element.childNodes[i];
|
|
139
|
+
if (typeof child === 'string') {
|
|
140
|
+
if (el.textContent !== child) {
|
|
141
|
+
if (el.nodeType === 3) {
|
|
142
|
+
el.nodeValue = child;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
element.replaceChild(createText(child), el);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else if (child instanceof HTMLElement || child instanceof SVGElement) {
|
|
150
|
+
element.insertBefore(child, el);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
const key = child.props ? child.props['key'] : undefined;
|
|
154
|
+
if (key !== undefined && key !== null) {
|
|
155
|
+
if (el.key === key) {
|
|
156
|
+
update(element.childNodes[i], child, isSvg);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
// console.log(el.key, key);
|
|
160
|
+
const old = keyedChildren[keyId(key)];
|
|
161
|
+
if (old) {
|
|
162
|
+
// const temp = old.nextSibling;
|
|
163
|
+
element.insertBefore(old, el);
|
|
164
|
+
// temp ? element.insertBefore(el, temp) : element.appendChild(el);
|
|
165
|
+
update(element.childNodes[i], child, isSvg);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
element.replaceChild(create(child, isSvg), el);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
update(element.childNodes[i], child, isSvg);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
let n = element.childNodes?.length || 0;
|
|
178
|
+
while (n > len) {
|
|
179
|
+
element.removeChild(element.lastChild);
|
|
180
|
+
n--;
|
|
181
|
+
}
|
|
182
|
+
if (new_len > len) {
|
|
183
|
+
const d = document.createDocumentFragment();
|
|
184
|
+
for (let i = len; i < children.length; i++) {
|
|
185
|
+
d.appendChild(create(children[i], isSvg));
|
|
186
|
+
}
|
|
187
|
+
element.appendChild(d);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function keyId(key) {
|
|
191
|
+
return `${typeof key}:${String(key)}`;
|
|
192
|
+
}
|
|
193
|
+
export const trustedHTML = (html) => {
|
|
194
|
+
const div = document.createElement('section');
|
|
195
|
+
div.insertAdjacentHTML('afterbegin', html);
|
|
196
|
+
return Array.from(div.children);
|
|
197
|
+
};
|
|
198
|
+
/** @deprecated Use trustedHTML() for caller-owned trusted markup. */
|
|
199
|
+
export const safeHTML = trustedHTML;
|
|
200
|
+
function createText(node) {
|
|
201
|
+
return document.createTextNode(node ?? '');
|
|
202
|
+
}
|
|
203
|
+
function create(node, isSvg) {
|
|
204
|
+
// console.assert(node !== null && node !== undefined);
|
|
205
|
+
if ((node instanceof HTMLElement) || (node instanceof SVGElement))
|
|
206
|
+
return node;
|
|
207
|
+
if (typeof node === "string")
|
|
208
|
+
return createText(node);
|
|
209
|
+
if (!node.tag || (typeof node.tag === 'function'))
|
|
210
|
+
return createText(JSON.stringify(node));
|
|
211
|
+
isSvg = isSvg || node.tag === "svg";
|
|
212
|
+
const element = isSvg
|
|
213
|
+
? document.createElementNS("http://www.w3.org/2000/svg", node.tag)
|
|
214
|
+
: document.createElement(node.tag);
|
|
215
|
+
updateProps(element, node.props, isSvg);
|
|
216
|
+
if (node.children)
|
|
217
|
+
node.children.forEach(child => element.appendChild(create(child, isSvg)));
|
|
218
|
+
if (node.props && node.props.key !== undefined && node.props.key !== null) {
|
|
219
|
+
element.key = node.props.key;
|
|
220
|
+
}
|
|
221
|
+
return element;
|
|
222
|
+
}
|
|
223
|
+
function beginComponentCacheRender(parent) {
|
|
224
|
+
if (!parent || !parent.__componentCache)
|
|
225
|
+
return;
|
|
226
|
+
parent.__componentCacheUsed = {};
|
|
227
|
+
}
|
|
228
|
+
function markComponentCacheUsed(parent, key) {
|
|
229
|
+
if (!parent)
|
|
230
|
+
return;
|
|
231
|
+
parent.__componentCacheUsed = parent.__componentCacheUsed || {};
|
|
232
|
+
parent.__componentCacheUsed[key] = true;
|
|
233
|
+
}
|
|
234
|
+
function sweepComponentCache(parent) {
|
|
235
|
+
if (!parent || !parent.__componentCache || !parent.__componentCacheUsed)
|
|
236
|
+
return;
|
|
237
|
+
Object.keys(parent.__componentCache).forEach(key => {
|
|
238
|
+
if (!parent.__componentCacheUsed[key]) {
|
|
239
|
+
parent.__componentCache[key]?.unmount?.();
|
|
240
|
+
delete parent.__componentCache[key];
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
parent.__componentCacheUsed = null;
|
|
244
|
+
}
|
|
245
|
+
function render_component(node, parent, idx) {
|
|
246
|
+
const { tag, props, children } = node;
|
|
247
|
+
const id = props && props['id'];
|
|
248
|
+
const key = id !== undefined && id !== null ? String(id) : `_${idx}`;
|
|
249
|
+
let asTag = 'section';
|
|
250
|
+
if (props && props['as']) {
|
|
251
|
+
asTag = props['as'];
|
|
252
|
+
delete props['as'];
|
|
253
|
+
}
|
|
254
|
+
if (!parent.__componentCache)
|
|
255
|
+
parent.__componentCache = {};
|
|
256
|
+
markComponentCacheUsed(parent, key);
|
|
257
|
+
let component = parent.__componentCache[key];
|
|
258
|
+
if (!component || !(component instanceof tag) || !component.element) {
|
|
259
|
+
const element = document.createElement(asTag);
|
|
260
|
+
component = parent.__componentCache[key] = new tag({ ...props, children }).mount(element, { render: true });
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
component.renderState(component.state);
|
|
264
|
+
}
|
|
265
|
+
if (component.mounted) {
|
|
266
|
+
const new_state = component.mounted(props, children, component.state);
|
|
267
|
+
(typeof new_state !== 'undefined') && component.setState(new_state);
|
|
268
|
+
}
|
|
269
|
+
updateProps(component.element, props, false);
|
|
270
|
+
return component.element;
|
|
271
|
+
}
|
|
272
|
+
function createComponent(node, parent, idx = 0) {
|
|
273
|
+
if (typeof node === 'string')
|
|
274
|
+
return node;
|
|
275
|
+
if (Array.isArray(node))
|
|
276
|
+
return node.map(child => createComponent(child, parent, idx++));
|
|
277
|
+
let vdom = node;
|
|
278
|
+
if (node && typeof node.tag === 'function' && Object.getPrototypeOf(node.tag).__isAppRunComponent) {
|
|
279
|
+
vdom = render_component(node, parent, idx);
|
|
280
|
+
}
|
|
281
|
+
if (vdom && Array.isArray(vdom.children)) {
|
|
282
|
+
const new_parent = vdom.props?._component;
|
|
283
|
+
if (new_parent) {
|
|
284
|
+
let i = 0;
|
|
285
|
+
vdom.children = vdom.children.map(child => createComponent(child, new_parent, i++));
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
vdom.children = vdom.children.map(child => createComponent(child, parent, idx++));
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return vdom;
|
|
292
|
+
}
|
|
293
|
+
//# sourceMappingURL=vdom-my.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vdom-my.js","sourceRoot":"","sources":["../src/vdom-my.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,MAAM,UAAU,QAAQ,CAAC,KAAK,EAAE,GAAG,QAAQ;IACzC,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,OAAO,CAAC,QAAQ;IACvB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE;QACjB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;YAC7D,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,UAAU,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC,CAAA;IACD,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QAC/B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAA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d,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VDOM to HTML string renderer
|
|
3
|
+
*
|
|
4
|
+
* Converts AppRun VDOM, arrays, strings, and lit templates to HTML strings.
|
|
5
|
+
* String nodes are rendered literally; trusted markup must be supplied through
|
|
6
|
+
* explicit trusted-HTML helpers before reaching this renderer.
|
|
7
|
+
*/
|
|
8
|
+
function getProp(prop) {
|
|
9
|
+
if (typeof prop === 'object') {
|
|
10
|
+
return Object.keys(prop).map(name => `${name}:${prop[name]}`).join(';');
|
|
11
|
+
}
|
|
12
|
+
else
|
|
13
|
+
return prop.toString();
|
|
14
|
+
}
|
|
15
|
+
function toProps(props) {
|
|
16
|
+
return Object.keys(props)
|
|
17
|
+
.map(name => ` ${name === 'className' ? 'class' : name}="${getProp(props[name])}"`)
|
|
18
|
+
.join('');
|
|
19
|
+
}
|
|
20
|
+
function toHTMLArray(nodes) {
|
|
21
|
+
return nodes.map(node => toHTML(node)).join('');
|
|
22
|
+
}
|
|
23
|
+
function clean(obj) {
|
|
24
|
+
for (var i in obj) {
|
|
25
|
+
if (obj[i] == null) {
|
|
26
|
+
delete obj[i];
|
|
27
|
+
}
|
|
28
|
+
else if (typeof obj[i] === 'object') {
|
|
29
|
+
clean(obj[i]);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function toHTML(vdom) {
|
|
34
|
+
if (!vdom)
|
|
35
|
+
return '';
|
|
36
|
+
if (vdom['_$litType$']) {
|
|
37
|
+
return vdom.toString();
|
|
38
|
+
}
|
|
39
|
+
clean(vdom);
|
|
40
|
+
if (Array.isArray(vdom))
|
|
41
|
+
return toHTMLArray(vdom);
|
|
42
|
+
if (typeof vdom === 'string') {
|
|
43
|
+
return vdom;
|
|
44
|
+
}
|
|
45
|
+
else if (vdom.tag) {
|
|
46
|
+
const props = vdom.props ? toProps(vdom.props) : '';
|
|
47
|
+
const children = vdom.children ? toHTMLArray(vdom.children) : '';
|
|
48
|
+
return `<${vdom.tag}${props}>${children}</${vdom.tag}>`;
|
|
49
|
+
}
|
|
50
|
+
if (typeof vdom === 'object')
|
|
51
|
+
return JSON.stringify(vdom);
|
|
52
|
+
}
|
|
53
|
+
export default toHTML;
|
|
54
|
+
//# sourceMappingURL=vdom-to-html.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vdom-to-html.js","sourceRoot":"","sources":["../src/vdom-to-html.tsx"],"names":[],"mappings":"AACA;;;;;;GAMG;AAKH,SAAS,OAAO,CAAC,IAAI;IACnB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1E,CAAC;;QACI,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,OAAO,CAAC,KAAK;IACpB,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACtB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;SAClF,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED,SAAS,WAAW,CAAC,KAAK;IACxB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,KAAK,CAAC,GAAG;IAChB,KAAK,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QAClB,IAAI,GAAG,CAAC,CAAC,CAA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
|
+
* Virtual DOM Implementation
|
|
3
|
+
*
|
|
4
|
+
* This file provides the core virtual DOM functionality:
|
|
5
|
+
* 1. createElement: Creates virtual DOM nodes
|
|
6
|
+
* 2. Fragment: Support for fragments
|
|
7
|
+
* 3. render: Renders virtual DOM to real DOM
|
|
8
|
+
* 4. trustedHTML: Parses caller-owned trusted HTML strings
|
|
9
|
+
*
|
|
10
|
+
* The virtual DOM system:
|
|
11
|
+
* - Provides efficient DOM updates
|
|
12
|
+
* - Supports JSX compilation
|
|
13
|
+
* - Handles component rendering
|
|
14
|
+
* - Manages DOM diffing and patching
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* ```ts
|
|
18
|
+
* // JSX gets compiled to createElement calls
|
|
19
|
+
* const vdom = <div id="app">Hello</div>;
|
|
20
|
+
*
|
|
21
|
+
* // Render to DOM
|
|
22
|
+
* render(document.body, vdom);
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
import { createElement, updateElement, Fragment, trustedHTML, safeHTML } from './vdom-my';
|
|
26
|
+
export { createElement, Fragment, updateElement as render, trustedHTML, safeHTML };
|
|
27
|
+
export { createElement as jsx, createElement as jsxs };
|
|
28
|
+
//# sourceMappingURL=vdom.js.map
|
package/esm/vdom.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vdom.js","sourceRoot":"","sources":["../src/vdom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,IAAI,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AACnF,OAAO,EAAE,aAAa,IAAI,GAAG,EAAE,aAAa,IAAI,IAAI,EAAE,CAAC"}
|
package/esm/version.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Management Utility
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for AppRun version information.
|
|
5
|
+
* This file ensures version consistency across all modules.
|
|
6
|
+
*
|
|
7
|
+
* The version is derived from package.json and should be updated
|
|
8
|
+
* only when the package version changes.
|
|
9
|
+
*/
|
|
10
|
+
// Import version from package.json to maintain single source of truth
|
|
11
|
+
// This version string is used across the framework
|
|
12
|
+
export const APPRUN_VERSION = '6.0.0';
|
|
13
|
+
// Version string with prefix for global tracking
|
|
14
|
+
export const APPRUN_VERSION_GLOBAL = `AppRun-${APPRUN_VERSION}`;
|
|
15
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,sEAAsE;AACtE,mDAAmD;AACnD,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC,iDAAiD;AACjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web Components Integration
|
|
3
|
+
*
|
|
4
|
+
* This file enables using AppRun components as Web Components:
|
|
5
|
+
* 1. Custom Element Creation
|
|
6
|
+
* - Converts AppRun components to custom elements
|
|
7
|
+
* - Handles lifecycle (connected, disconnected, attributeChanged)
|
|
8
|
+
* - Manages shadow DOM and light DOM rendering options
|
|
9
|
+
* - Automatic element registration with customElements.define()
|
|
10
|
+
*
|
|
11
|
+
* 2. Property/Attribute Sync
|
|
12
|
+
* - Observes attribute changes with attributeChangedCallback
|
|
13
|
+
* - Updates component state automatically on changes
|
|
14
|
+
* - Handles camelCase/kebab-case conversion automatically
|
|
15
|
+
* - Supports complex property types and JSON parsing
|
|
16
|
+
* - Two-way data binding between attributes and state
|
|
17
|
+
*
|
|
18
|
+
* 3. Event Handling
|
|
19
|
+
* - Proxies events between component and element
|
|
20
|
+
* - Supports both global and local event systems
|
|
21
|
+
* - Maintains proper event bubbling and capturing
|
|
22
|
+
* - Custom event dispatching for component communication
|
|
23
|
+
*
|
|
24
|
+
* Features:
|
|
25
|
+
* - Shadow DOM encapsulation support
|
|
26
|
+
* - Attribute observation and change detection
|
|
27
|
+
* - Lifecycle management, queued pre-mount attributes, and cleanup
|
|
28
|
+
* - Property reflection to attributes
|
|
29
|
+
* - Event proxy system
|
|
30
|
+
* - Flexible rendering options
|
|
31
|
+
*
|
|
32
|
+
* Type Safety Improvements (v3.35.1):
|
|
33
|
+
* - Enhanced custom element options typing
|
|
34
|
+
* - Better lifecycle method signatures
|
|
35
|
+
* - Improved attribute/property type safety
|
|
36
|
+
* - Safer DOM manipulation with null checks
|
|
37
|
+
*
|
|
38
|
+
* Usage:
|
|
39
|
+
* ```ts
|
|
40
|
+
* // Register web component
|
|
41
|
+
* @customElement('my-element', {
|
|
42
|
+
* shadow: true,
|
|
43
|
+
* observedAttributes: ['name', 'value']
|
|
44
|
+
* })
|
|
45
|
+
* class MyComponent extends Component {
|
|
46
|
+
* // Regular AppRun component code
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* // Use in HTML
|
|
50
|
+
* <my-element name="value" data-prop="complex"></my-element>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export const customElement = (componentClass, options = {}) => class CustomElement extends HTMLElement {
|
|
54
|
+
constructor() {
|
|
55
|
+
super();
|
|
56
|
+
this._pendingAttributes = [];
|
|
57
|
+
}
|
|
58
|
+
get component() { return this._component; }
|
|
59
|
+
get state() { return this._component.state; }
|
|
60
|
+
static get observedAttributes() {
|
|
61
|
+
// attributes need to be set to lowercase in order to get observed
|
|
62
|
+
return (options.observedAttributes || []).map(attr => attr.toLowerCase());
|
|
63
|
+
}
|
|
64
|
+
connectedCallback() {
|
|
65
|
+
if (this.isConnected && !this._component && this._mountFrame == null) {
|
|
66
|
+
const opts = options || {};
|
|
67
|
+
this._shadowRoot = opts.shadow ? this.attachShadow({ mode: 'open' }) : this;
|
|
68
|
+
const observedAttributes = (opts.observedAttributes || []);
|
|
69
|
+
const attrMap = observedAttributes.reduce((map, name) => {
|
|
70
|
+
const lc = name.toLowerCase();
|
|
71
|
+
if (lc !== name) {
|
|
72
|
+
map[lc] = name;
|
|
73
|
+
}
|
|
74
|
+
return map;
|
|
75
|
+
}, {});
|
|
76
|
+
this._attrMap = (name) => attrMap[name] || name;
|
|
77
|
+
const props = {};
|
|
78
|
+
Array.from(this.attributes).forEach(item => props[this._attrMap(item.name)] = item.value);
|
|
79
|
+
// add getters/ setters to allow observation on observedAttributes
|
|
80
|
+
observedAttributes.forEach(name => {
|
|
81
|
+
if (this[name] !== undefined)
|
|
82
|
+
props[name] = this[name];
|
|
83
|
+
Object.defineProperty(this, name, {
|
|
84
|
+
get() {
|
|
85
|
+
return props[name];
|
|
86
|
+
},
|
|
87
|
+
set(value) {
|
|
88
|
+
// trigger change event
|
|
89
|
+
this.attributeChangedCallback(name, props[name], value);
|
|
90
|
+
},
|
|
91
|
+
configurable: true,
|
|
92
|
+
enumerable: true
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
this._mountFrame = requestAnimationFrame(() => {
|
|
96
|
+
this._mountFrame = null;
|
|
97
|
+
if (!this.isConnected)
|
|
98
|
+
return;
|
|
99
|
+
const children = this.children ? Array.from(this.children) : [];
|
|
100
|
+
// children.forEach(el => el.parentElement.removeChild(el));
|
|
101
|
+
this._component = new componentClass({ ...props, children }).mount(this._shadowRoot, opts);
|
|
102
|
+
// attach props to component
|
|
103
|
+
this._component._props = props;
|
|
104
|
+
// expose dispatchEvent
|
|
105
|
+
this._component.dispatchEvent = this.dispatchEvent.bind(this);
|
|
106
|
+
if (this._component.mounted) {
|
|
107
|
+
const new_state = this._component.mounted(props, children, this._component.state);
|
|
108
|
+
if (typeof new_state !== 'undefined')
|
|
109
|
+
this._component.state = new_state;
|
|
110
|
+
}
|
|
111
|
+
this.on = this._component.on.bind(this._component);
|
|
112
|
+
this.run = this._component.run.bind(this._component);
|
|
113
|
+
const pendingAttributes = this._pendingAttributes;
|
|
114
|
+
this._pendingAttributes = [];
|
|
115
|
+
pendingAttributes.forEach(({ name, oldValue, value }) => {
|
|
116
|
+
this.attributeChangedCallback(name, oldValue, value);
|
|
117
|
+
});
|
|
118
|
+
if (!(opts.render === false))
|
|
119
|
+
this._component.run('.');
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
disconnectedCallback() {
|
|
124
|
+
if (this._mountFrame != null) {
|
|
125
|
+
cancelAnimationFrame(this._mountFrame);
|
|
126
|
+
this._mountFrame = null;
|
|
127
|
+
}
|
|
128
|
+
this._pendingAttributes = [];
|
|
129
|
+
this._component?.unload?.(this._component.state);
|
|
130
|
+
this._component?.unmount?.();
|
|
131
|
+
this._component = null;
|
|
132
|
+
}
|
|
133
|
+
attributeChangedCallback(name, oldValue, value) {
|
|
134
|
+
if (this._component) {
|
|
135
|
+
// camelCase attributes arrive only in lowercase
|
|
136
|
+
const mappedName = this._attrMap ? this._attrMap(name) : name;
|
|
137
|
+
// store the new property/ attribute
|
|
138
|
+
this._component._props[mappedName] = value;
|
|
139
|
+
this._component.run('attributeChanged', mappedName, oldValue, value);
|
|
140
|
+
if (value !== oldValue && !(options.render === false)) {
|
|
141
|
+
window.requestAnimationFrame(() => {
|
|
142
|
+
// re-render state with new combined props on next animation frame
|
|
143
|
+
this._component?.run('.');
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
this._pendingAttributes.push({ name, oldValue, value });
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
export default (name, componentClass, options) => {
|
|
153
|
+
(typeof customElements !== 'undefined') && customElements.define(name, customElement(componentClass, options));
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=web-component.js.map
|
|
@@ -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