@zeus-js/web-c-runtime 0.1.0-canary.20260605.7.1.708d4580
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/web-c-runtime.d.ts +60 -0
- package/dist/web-c-runtime.esm-bundler.js +357 -0
- package/package.json +38 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type ZeusPropType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'function' | 'unknown';
|
|
2
|
+
export interface ZeusPropMeta {
|
|
3
|
+
name: string;
|
|
4
|
+
attrName?: string | false;
|
|
5
|
+
type: ZeusPropType;
|
|
6
|
+
reflect?: boolean;
|
|
7
|
+
default?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface ZeusLazyComponentMeta {
|
|
10
|
+
tagName: string;
|
|
11
|
+
/**
|
|
12
|
+
* Real component implementation chunk.
|
|
13
|
+
* This function must be explicitly generated by the component library manifest,
|
|
14
|
+
* so the runtime does not need to construct dynamic paths.
|
|
15
|
+
*/
|
|
16
|
+
load: () => Promise<ZeusComponentModule | {
|
|
17
|
+
default: ZeusComponentModule;
|
|
18
|
+
}>;
|
|
19
|
+
props: ZeusPropMeta[];
|
|
20
|
+
/**
|
|
21
|
+
* Whether to render into a ShadowRoot.
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
shadow?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface HostRef {
|
|
28
|
+
host: HTMLElement;
|
|
29
|
+
meta: ZeusLazyComponentMeta;
|
|
30
|
+
connected: boolean;
|
|
31
|
+
loaded: boolean;
|
|
32
|
+
loading?: Promise<void>;
|
|
33
|
+
instance?: ZeusComponentInstance;
|
|
34
|
+
values: Map<string, unknown>;
|
|
35
|
+
reflectingAttrs: Set<string>;
|
|
36
|
+
readyWaiters: Array<{
|
|
37
|
+
resolve(host: HTMLElement): void;
|
|
38
|
+
reject(error: unknown): void;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
export interface ZeusComponentInstance {
|
|
42
|
+
connected?(): void;
|
|
43
|
+
disconnected?(): void;
|
|
44
|
+
propertyChanged?(name: string, oldValue: unknown, newValue: unknown): void;
|
|
45
|
+
/**
|
|
46
|
+
* Can return Node / Node[] / string.
|
|
47
|
+
* If the component completes rendering itself, it can also return void.
|
|
48
|
+
*/
|
|
49
|
+
render?(): void | string | Node | Node[];
|
|
50
|
+
dispose?(): void;
|
|
51
|
+
}
|
|
52
|
+
export interface ZeusComponentModule {
|
|
53
|
+
createComponent(hostRef: HostRef): ZeusComponentInstance;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export declare function bootstrapLazy(components: ZeusLazyComponentMeta[]): void;
|
|
57
|
+
|
|
58
|
+
export declare function createLazyElementClass(meta: ZeusLazyComponentMeta): CustomElementConstructor;
|
|
59
|
+
|
|
60
|
+
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* web-c-runtime v0.1.0-canary.20260605.7.1.708d4580
|
|
3
|
+
* (c) 2026 baicie
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
**/
|
|
6
|
+
//#region packages/web-c/web-c-runtime/src/host-ref.ts
|
|
7
|
+
const hostRefs = /* @__PURE__ */ new WeakMap();
|
|
8
|
+
function registerHost(host, meta) {
|
|
9
|
+
const existing = hostRefs.get(host);
|
|
10
|
+
if (existing) return existing;
|
|
11
|
+
const hostRef = {
|
|
12
|
+
host,
|
|
13
|
+
meta,
|
|
14
|
+
connected: false,
|
|
15
|
+
loaded: false,
|
|
16
|
+
values: /* @__PURE__ */ new Map(),
|
|
17
|
+
reflectingAttrs: /* @__PURE__ */ new Set(),
|
|
18
|
+
readyWaiters: []
|
|
19
|
+
};
|
|
20
|
+
hostRefs.set(host, hostRef);
|
|
21
|
+
return hostRef;
|
|
22
|
+
}
|
|
23
|
+
function getHostRef(host) {
|
|
24
|
+
return hostRefs.get(host);
|
|
25
|
+
}
|
|
26
|
+
function requireHostRef(host) {
|
|
27
|
+
const hostRef = getHostRef(host);
|
|
28
|
+
if (!hostRef) throw new Error(`[zeus:web-c] hostRef not found for <${host.tagName.toLowerCase()}>.`);
|
|
29
|
+
return hostRef;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region packages/web-c/web-c-runtime/src/props.ts
|
|
33
|
+
function installPropertyAccessors(proto, props) {
|
|
34
|
+
for (const prop of props) {
|
|
35
|
+
if (Object.getOwnPropertyDescriptor(proto, prop.name)) continue;
|
|
36
|
+
Object.defineProperty(proto, prop.name, {
|
|
37
|
+
get() {
|
|
38
|
+
return getPropValue(requireHostRef(this), prop);
|
|
39
|
+
},
|
|
40
|
+
set(value) {
|
|
41
|
+
setPropValue(requireHostRef(this), prop, value);
|
|
42
|
+
},
|
|
43
|
+
configurable: true,
|
|
44
|
+
enumerable: true
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function getPropValue(hostRef, prop) {
|
|
49
|
+
if (hostRef.values.has(prop.name)) return hostRef.values.get(prop.name);
|
|
50
|
+
return prop.default;
|
|
51
|
+
}
|
|
52
|
+
function setPropValue(hostRef, prop, value) {
|
|
53
|
+
const oldValue = getPropValue(hostRef, prop);
|
|
54
|
+
if (Object.is(oldValue, value)) return;
|
|
55
|
+
hostRef.values.set(prop.name, value);
|
|
56
|
+
if (prop.reflect) reflectPropertyToAttribute(hostRef, prop, value);
|
|
57
|
+
if (hostRef.loaded) {
|
|
58
|
+
var _hostRef$instance, _hostRef$instance$pro;
|
|
59
|
+
(_hostRef$instance = hostRef.instance) === null || _hostRef$instance === void 0 || (_hostRef$instance$pro = _hostRef$instance.propertyChanged) === null || _hostRef$instance$pro === void 0 || _hostRef$instance$pro.call(_hostRef$instance, prop.name, oldValue, value);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function syncAttributeToProperty(hostRef, attrName, _oldValue, newValue) {
|
|
63
|
+
const normalizedAttrName = normalizeAttrName(attrName);
|
|
64
|
+
if (hostRef.reflectingAttrs.has(normalizedAttrName)) return;
|
|
65
|
+
const prop = findPropByAttrName(hostRef, normalizedAttrName);
|
|
66
|
+
if (!prop) return;
|
|
67
|
+
const oldPropValue = getPropValue(hostRef, prop);
|
|
68
|
+
const newPropValue = parseAttributeValue(prop, newValue);
|
|
69
|
+
if (Object.is(oldPropValue, newPropValue)) return;
|
|
70
|
+
hostRef.values.set(prop.name, newPropValue);
|
|
71
|
+
if (hostRef.loaded) {
|
|
72
|
+
var _hostRef$instance2, _hostRef$instance2$pr;
|
|
73
|
+
(_hostRef$instance2 = hostRef.instance) === null || _hostRef$instance2 === void 0 || (_hostRef$instance2$pr = _hostRef$instance2.propertyChanged) === null || _hostRef$instance2$pr === void 0 || _hostRef$instance2$pr.call(_hostRef$instance2, prop.name, oldPropValue, newPropValue);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function applyInitialValues(hostRef) {
|
|
77
|
+
const host = hostRef.host;
|
|
78
|
+
for (const prop of hostRef.meta.props) {
|
|
79
|
+
if (hostRef.values.has(prop.name)) continue;
|
|
80
|
+
const attrName = getAttrName(prop);
|
|
81
|
+
if (attrName && host.hasAttribute(attrName)) {
|
|
82
|
+
hostRef.values.set(prop.name, parseAttributeValue(prop, host.getAttribute(attrName)));
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if ("default" in prop) hostRef.values.set(prop.name, prop.default);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function getObservedAttributes(props) {
|
|
89
|
+
const attrs = [];
|
|
90
|
+
for (const prop of props) {
|
|
91
|
+
const attrName = getAttrName(prop);
|
|
92
|
+
if (attrName) attrs.push(attrName);
|
|
93
|
+
}
|
|
94
|
+
return attrs;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Upgrades properties that were written on an element instance before its
|
|
98
|
+
* custom element class was defined (e.g. during SSR or before
|
|
99
|
+
* `defineCustomElements()` was called). Own properties on the element
|
|
100
|
+
* shadow the prototype accessors, so we must capture them before
|
|
101
|
+
* the prototype accessors take effect.
|
|
102
|
+
*/
|
|
103
|
+
function upgradePreDefinedProperties(host, hostRef) {
|
|
104
|
+
const target = host;
|
|
105
|
+
for (const prop of hostRef.meta.props) {
|
|
106
|
+
if (!Object.prototype.hasOwnProperty.call(target, prop.name)) continue;
|
|
107
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, prop.name);
|
|
108
|
+
if ((descriptor === null || descriptor === void 0 ? void 0 : descriptor.configurable) === false) continue;
|
|
109
|
+
const value = target[prop.name];
|
|
110
|
+
delete target[prop.name];
|
|
111
|
+
setPropValue(hostRef, prop, value);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function findPropByAttrName(hostRef, attrName) {
|
|
115
|
+
return hostRef.meta.props.find((prop) => {
|
|
116
|
+
return getAttrName(prop) === attrName;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function getAttrName(prop) {
|
|
120
|
+
var _prop$attrName;
|
|
121
|
+
if (prop.attrName === false) return;
|
|
122
|
+
if (!isAttributeBackedType(prop.type)) return;
|
|
123
|
+
return normalizeAttrName((_prop$attrName = prop.attrName) !== null && _prop$attrName !== void 0 ? _prop$attrName : toKebabCase(prop.name));
|
|
124
|
+
}
|
|
125
|
+
function isAttributeBackedType(type) {
|
|
126
|
+
return type === "string" || type === "number" || type === "boolean";
|
|
127
|
+
}
|
|
128
|
+
function normalizeAttrName(value) {
|
|
129
|
+
return value.toLowerCase();
|
|
130
|
+
}
|
|
131
|
+
function parseAttributeValue(prop, value) {
|
|
132
|
+
switch (prop.type) {
|
|
133
|
+
case "boolean": return value !== null;
|
|
134
|
+
case "number":
|
|
135
|
+
if (value === null) return;
|
|
136
|
+
return Number(value);
|
|
137
|
+
case "string": return value !== null && value !== void 0 ? value : void 0;
|
|
138
|
+
default: return value;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function reflectPropertyToAttribute(hostRef, prop, value) {
|
|
142
|
+
const host = hostRef.host;
|
|
143
|
+
const attrName = getAttrName(prop);
|
|
144
|
+
if (!attrName) return;
|
|
145
|
+
hostRef.reflectingAttrs.add(attrName);
|
|
146
|
+
try {
|
|
147
|
+
if (prop.type === "boolean") {
|
|
148
|
+
host.toggleAttribute(attrName, Boolean(value));
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (value === null || value === void 0 || value === false) {
|
|
152
|
+
host.removeAttribute(attrName);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (prop.type === "string" || prop.type === "number") host.setAttribute(attrName, String(value));
|
|
156
|
+
} finally {
|
|
157
|
+
hostRef.reflectingAttrs.delete(attrName);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function toKebabCase(value) {
|
|
161
|
+
return value.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region \0@oxc-project+runtime@0.134.0/helpers/esm/asyncToGenerator.js
|
|
165
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
166
|
+
try {
|
|
167
|
+
var i = n[a](c), u = i.value;
|
|
168
|
+
} catch (n) {
|
|
169
|
+
e(n);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
173
|
+
}
|
|
174
|
+
function _asyncToGenerator(n) {
|
|
175
|
+
return function() {
|
|
176
|
+
var t = this, e = arguments;
|
|
177
|
+
return new Promise(function(r, o) {
|
|
178
|
+
var a = n.apply(t, e);
|
|
179
|
+
function _next(n) {
|
|
180
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
181
|
+
}
|
|
182
|
+
function _throw(n) {
|
|
183
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
184
|
+
}
|
|
185
|
+
_next(void 0);
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region packages/web-c/web-c-runtime/src/lifecycle.ts
|
|
191
|
+
const moduleCache = /* @__PURE__ */ new WeakMap();
|
|
192
|
+
function waitForComponentReady(hostRef) {
|
|
193
|
+
if (hostRef.loaded) return Promise.resolve(hostRef.host);
|
|
194
|
+
return new Promise((resolve, reject) => {
|
|
195
|
+
hostRef.readyWaiters.push({
|
|
196
|
+
resolve,
|
|
197
|
+
reject
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function initializeComponent(_x) {
|
|
202
|
+
return _initializeComponent.apply(this, arguments);
|
|
203
|
+
}
|
|
204
|
+
function _initializeComponent() {
|
|
205
|
+
_initializeComponent = _asyncToGenerator(function* (hostRef) {
|
|
206
|
+
if (hostRef.loaded) {
|
|
207
|
+
var _hostRef$instance, _hostRef$instance$con;
|
|
208
|
+
(_hostRef$instance = hostRef.instance) === null || _hostRef$instance === void 0 || (_hostRef$instance$con = _hostRef$instance.connected) === null || _hostRef$instance$con === void 0 || _hostRef$instance$con.call(_hostRef$instance);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (hostRef.loading) {
|
|
212
|
+
yield hostRef.loading;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
const loading = doInitializeComponent(hostRef);
|
|
216
|
+
hostRef.loading = loading;
|
|
217
|
+
try {
|
|
218
|
+
yield loading;
|
|
219
|
+
} catch (error) {
|
|
220
|
+
rejectReadyWaiters(hostRef, error);
|
|
221
|
+
throw error;
|
|
222
|
+
} finally {
|
|
223
|
+
if (hostRef.loading === loading) hostRef.loading = void 0;
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
return _initializeComponent.apply(this, arguments);
|
|
227
|
+
}
|
|
228
|
+
function doInitializeComponent(_x2) {
|
|
229
|
+
return _doInitializeComponent.apply(this, arguments);
|
|
230
|
+
}
|
|
231
|
+
function _doInitializeComponent() {
|
|
232
|
+
_doInitializeComponent = _asyncToGenerator(function* (hostRef) {
|
|
233
|
+
applyInitialValues(hostRef);
|
|
234
|
+
const mod = yield loadComponentModule(hostRef);
|
|
235
|
+
if (!hostRef.connected) return;
|
|
236
|
+
const instance = mod.createComponent(hostRef);
|
|
237
|
+
hostRef.instance = instance;
|
|
238
|
+
try {
|
|
239
|
+
var _instance$connected, _instance$render;
|
|
240
|
+
(_instance$connected = instance.connected) === null || _instance$connected === void 0 || _instance$connected.call(instance);
|
|
241
|
+
const rendered = (_instance$render = instance.render) === null || _instance$render === void 0 ? void 0 : _instance$render.call(instance);
|
|
242
|
+
if (rendered !== void 0) mountRenderedOutput(hostRef, rendered);
|
|
243
|
+
hostRef.loaded = true;
|
|
244
|
+
resolveReadyWaiters(hostRef);
|
|
245
|
+
} catch (error) {
|
|
246
|
+
var _instance$dispose;
|
|
247
|
+
hostRef.instance = void 0;
|
|
248
|
+
hostRef.loaded = false;
|
|
249
|
+
(_instance$dispose = instance.dispose) === null || _instance$dispose === void 0 || _instance$dispose.call(instance);
|
|
250
|
+
throw error;
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
return _doInitializeComponent.apply(this, arguments);
|
|
254
|
+
}
|
|
255
|
+
function loadComponentModule(_x3) {
|
|
256
|
+
return _loadComponentModule.apply(this, arguments);
|
|
257
|
+
}
|
|
258
|
+
function _loadComponentModule() {
|
|
259
|
+
_loadComponentModule = _asyncToGenerator(function* (hostRef) {
|
|
260
|
+
let pending = moduleCache.get(hostRef.meta);
|
|
261
|
+
if (!pending) {
|
|
262
|
+
pending = hostRef.meta.load().then((mod) => {
|
|
263
|
+
return "default" in mod ? mod.default : mod;
|
|
264
|
+
}).catch((error) => {
|
|
265
|
+
moduleCache.delete(hostRef.meta);
|
|
266
|
+
throw error;
|
|
267
|
+
});
|
|
268
|
+
moduleCache.set(hostRef.meta, pending);
|
|
269
|
+
}
|
|
270
|
+
return pending;
|
|
271
|
+
});
|
|
272
|
+
return _loadComponentModule.apply(this, arguments);
|
|
273
|
+
}
|
|
274
|
+
function resolveReadyWaiters(hostRef) {
|
|
275
|
+
const waiters = hostRef.readyWaiters.splice(0);
|
|
276
|
+
for (const waiter of waiters) waiter.resolve(hostRef.host);
|
|
277
|
+
}
|
|
278
|
+
function rejectReadyWaiters(hostRef, error) {
|
|
279
|
+
const waiters = hostRef.readyWaiters.splice(0);
|
|
280
|
+
for (const waiter of waiters) waiter.reject(error);
|
|
281
|
+
}
|
|
282
|
+
function mountRenderedOutput(hostRef, rendered) {
|
|
283
|
+
const root = getRenderRoot(hostRef);
|
|
284
|
+
if (typeof rendered === "string") {
|
|
285
|
+
root.innerHTML = rendered;
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (Array.isArray(rendered)) {
|
|
289
|
+
root.replaceChildren(...rendered);
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
root.replaceChildren(rendered);
|
|
293
|
+
}
|
|
294
|
+
function getRenderRoot(hostRef) {
|
|
295
|
+
var _hostRef$host$shadowR;
|
|
296
|
+
if (!hostRef.meta.shadow) return hostRef.host;
|
|
297
|
+
return (_hostRef$host$shadowR = hostRef.host.shadowRoot) !== null && _hostRef$host$shadowR !== void 0 ? _hostRef$host$shadowR : hostRef.host.attachShadow({ mode: "open" });
|
|
298
|
+
}
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region packages/web-c/web-c-runtime/src/lazy-element.ts
|
|
301
|
+
function reportInitializationError(tagName, error) {
|
|
302
|
+
console.error(`[zeus:web-c] Failed to initialize <${tagName}>.`, error);
|
|
303
|
+
}
|
|
304
|
+
function createLazyElementClass(meta) {
|
|
305
|
+
const observedAttributes = getObservedAttributes(meta.props);
|
|
306
|
+
class ZeusLazyElement extends HTMLElement {
|
|
307
|
+
static get observedAttributes() {
|
|
308
|
+
return observedAttributes;
|
|
309
|
+
}
|
|
310
|
+
constructor() {
|
|
311
|
+
super();
|
|
312
|
+
const hostRef = registerHost(this, meta);
|
|
313
|
+
upgradePreDefinedProperties(this, hostRef);
|
|
314
|
+
}
|
|
315
|
+
connectedCallback() {
|
|
316
|
+
const hostRef = requireHostRef(this);
|
|
317
|
+
hostRef.connected = true;
|
|
318
|
+
initializeComponent(hostRef).catch((error) => {
|
|
319
|
+
reportInitializationError(meta.tagName, error);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
disconnectedCallback() {
|
|
323
|
+
const hostRef = requireHostRef(this);
|
|
324
|
+
hostRef.connected = false;
|
|
325
|
+
if (hostRef.loaded) {
|
|
326
|
+
var _hostRef$instance, _hostRef$instance$dis;
|
|
327
|
+
(_hostRef$instance = hostRef.instance) === null || _hostRef$instance === void 0 || (_hostRef$instance$dis = _hostRef$instance.disconnected) === null || _hostRef$instance$dis === void 0 || _hostRef$instance$dis.call(_hostRef$instance);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
331
|
+
if (oldValue === newValue) return;
|
|
332
|
+
syncAttributeToProperty(requireHostRef(this), name, oldValue, newValue);
|
|
333
|
+
}
|
|
334
|
+
componentOnReady() {
|
|
335
|
+
const hostRef = requireHostRef(this);
|
|
336
|
+
if (hostRef.connected && !hostRef.loaded && !hostRef.loading) initializeComponent(hostRef).catch((error) => {
|
|
337
|
+
reportInitializationError(meta.tagName, error);
|
|
338
|
+
});
|
|
339
|
+
return waitForComponentReady(hostRef);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
installPropertyAccessors(ZeusLazyElement.prototype, meta.props);
|
|
343
|
+
return ZeusLazyElement;
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region packages/web-c/web-c-runtime/src/bootstrapLazy.ts
|
|
347
|
+
function bootstrapLazy(components) {
|
|
348
|
+
const registry = typeof customElements === "undefined" ? void 0 : customElements;
|
|
349
|
+
if (!registry) return;
|
|
350
|
+
for (const meta of components) {
|
|
351
|
+
if (registry.get(meta.tagName)) continue;
|
|
352
|
+
const LazyElement = createLazyElementClass(meta);
|
|
353
|
+
registry.define(meta.tagName, LazyElement);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
//#endregion
|
|
357
|
+
export { bootstrapLazy, createLazyElementClass };
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zeus-js/web-c-runtime",
|
|
3
|
+
"version": "0.1.0-canary.20260605.7.1.708d4580",
|
|
4
|
+
"description": "Zeus Web-C lazy-loading runtime",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/web-c-runtime.esm-bundler.js",
|
|
7
|
+
"module": "./dist/web-c-runtime.esm-bundler.js",
|
|
8
|
+
"types": "./dist/web-c-runtime.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/web-c-runtime.d.ts",
|
|
15
|
+
"import": "./dist/web-c-runtime.esm-bundler.js",
|
|
16
|
+
"module": "./dist/web-c-runtime.esm-bundler.js",
|
|
17
|
+
"default": "./dist/web-c-runtime.esm-bundler.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/baicie/zeus"
|
|
24
|
+
},
|
|
25
|
+
"buildOptions": {
|
|
26
|
+
"name": "ZeusWebCRuntime",
|
|
27
|
+
"formats": [
|
|
28
|
+
"esm-bundler"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"zeus",
|
|
33
|
+
"web-components",
|
|
34
|
+
"custom-elements"
|
|
35
|
+
],
|
|
36
|
+
"author": "Baicie",
|
|
37
|
+
"license": "MIT"
|
|
38
|
+
}
|