@nisli/core 0.56.0 → 0.57.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.
Files changed (114) hide show
  1. package/README.md +38 -6
  2. package/dist/bundler/component.js +409 -0
  3. package/dist/bundler/component.js.map +7 -0
  4. package/dist/bundler/context.js +27 -0
  5. package/dist/bundler/context.js.map +7 -0
  6. package/dist/bundler/diagnostics.js +55 -0
  7. package/dist/bundler/diagnostics.js.map +7 -0
  8. package/dist/bundler/disposable.js +9 -0
  9. package/dist/bundler/disposable.js.map +7 -0
  10. package/dist/bundler/element-context.js +47 -0
  11. package/dist/bundler/element-context.js.map +7 -0
  12. package/dist/bundler/emitter.js +70 -0
  13. package/dist/bundler/emitter.js.map +7 -0
  14. package/dist/bundler/hmr/registry.js +72 -0
  15. package/dist/bundler/hmr/registry.js.map +7 -0
  16. package/dist/bundler/hmr/transform.js +30 -0
  17. package/dist/bundler/hmr/transform.js.map +7 -0
  18. package/dist/bundler/index.js +103 -0
  19. package/dist/bundler/index.js.map +7 -0
  20. package/dist/bundler/injector.js +75 -0
  21. package/dist/bundler/injector.js.map +7 -0
  22. package/dist/bundler/lifecycle.js +56 -0
  23. package/dist/bundler/lifecycle.js.map +7 -0
  24. package/dist/bundler/projection.js +92 -0
  25. package/dist/bundler/projection.js.map +7 -0
  26. package/dist/bundler/query.js +302 -0
  27. package/dist/bundler/query.js.map +7 -0
  28. package/dist/bundler/ref.js +16 -0
  29. package/dist/bundler/ref.js.map +7 -0
  30. package/dist/bundler/resource.js +99 -0
  31. package/dist/bundler/resource.js.map +7 -0
  32. package/dist/bundler/settle.js +43 -0
  33. package/dist/bundler/settle.js.map +7 -0
  34. package/dist/bundler/signal.js +403 -0
  35. package/dist/bundler/signal.js.map +7 -0
  36. package/dist/bundler/template-audit.js +162 -0
  37. package/dist/bundler/template-audit.js.map +7 -0
  38. package/dist/bundler/template.js +847 -0
  39. package/dist/bundler/template.js.map +7 -0
  40. package/dist/bundler/view-transition.js +20 -0
  41. package/dist/bundler/view-transition.js.map +7 -0
  42. package/dist/bundler/vite-hmr/plugin.js +32 -0
  43. package/dist/bundler/vite-hmr/plugin.js.map +7 -0
  44. package/dist/bundler/vite-hmr/runtime.js +8 -0
  45. package/dist/bundler/vite-hmr/runtime.js.map +7 -0
  46. package/dist/index.js +2607 -47
  47. package/dist/index.js.map +7 -1
  48. package/dist/index.production.js +2 -0
  49. package/dist/index.production.js.map +6 -0
  50. package/dist/{diagnostics.d.ts → types/diagnostics.d.ts} +8 -15
  51. package/dist/{template-audit.d.ts → types/template-audit.d.ts} +4 -5
  52. package/package.json +12 -9
  53. package/dist/component.js +0 -633
  54. package/dist/component.js.map +0 -1
  55. package/dist/context.js +0 -55
  56. package/dist/context.js.map +0 -1
  57. package/dist/diagnostics.js +0 -118
  58. package/dist/diagnostics.js.map +0 -1
  59. package/dist/disposable.js +0 -8
  60. package/dist/disposable.js.map +0 -1
  61. package/dist/element-context.js +0 -108
  62. package/dist/element-context.js.map +0 -1
  63. package/dist/emitter.js +0 -91
  64. package/dist/emitter.js.map +0 -1
  65. package/dist/hmr/registry.js +0 -136
  66. package/dist/hmr/registry.js.map +0 -1
  67. package/dist/hmr/transform.js +0 -52
  68. package/dist/hmr/transform.js.map +0 -1
  69. package/dist/injector.js +0 -118
  70. package/dist/injector.js.map +0 -1
  71. package/dist/lifecycle.js +0 -117
  72. package/dist/lifecycle.js.map +0 -1
  73. package/dist/projection.js +0 -179
  74. package/dist/projection.js.map +0 -1
  75. package/dist/query.js +0 -429
  76. package/dist/query.js.map +0 -1
  77. package/dist/ref.js +0 -43
  78. package/dist/ref.js.map +0 -1
  79. package/dist/resource.js +0 -129
  80. package/dist/resource.js.map +0 -1
  81. package/dist/settle.js +0 -106
  82. package/dist/settle.js.map +0 -1
  83. package/dist/signal.js +0 -645
  84. package/dist/signal.js.map +0 -1
  85. package/dist/template-audit.js +0 -246
  86. package/dist/template-audit.js.map +0 -1
  87. package/dist/template.js +0 -1244
  88. package/dist/template.js.map +0 -1
  89. package/dist/view-transition.js +0 -98
  90. package/dist/view-transition.js.map +0 -1
  91. package/dist/vite-hmr/plugin.js +0 -62
  92. package/dist/vite-hmr/plugin.js.map +0 -1
  93. package/dist/vite-hmr/runtime.js +0 -17
  94. package/dist/vite-hmr/runtime.js.map +0 -1
  95. /package/dist/{component.d.ts → types/component.d.ts} +0 -0
  96. /package/dist/{context.d.ts → types/context.d.ts} +0 -0
  97. /package/dist/{disposable.d.ts → types/disposable.d.ts} +0 -0
  98. /package/dist/{element-context.d.ts → types/element-context.d.ts} +0 -0
  99. /package/dist/{emitter.d.ts → types/emitter.d.ts} +0 -0
  100. /package/dist/{hmr → types/hmr}/registry.d.ts +0 -0
  101. /package/dist/{hmr → types/hmr}/transform.d.ts +0 -0
  102. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
  103. /package/dist/{injector.d.ts → types/injector.d.ts} +0 -0
  104. /package/dist/{lifecycle.d.ts → types/lifecycle.d.ts} +0 -0
  105. /package/dist/{projection.d.ts → types/projection.d.ts} +0 -0
  106. /package/dist/{query.d.ts → types/query.d.ts} +0 -0
  107. /package/dist/{ref.d.ts → types/ref.d.ts} +0 -0
  108. /package/dist/{resource.d.ts → types/resource.d.ts} +0 -0
  109. /package/dist/{settle.d.ts → types/settle.d.ts} +0 -0
  110. /package/dist/{signal.d.ts → types/signal.d.ts} +0 -0
  111. /package/dist/{template.d.ts → types/template.d.ts} +0 -0
  112. /package/dist/{view-transition.d.ts → types/view-transition.d.ts} +0 -0
  113. /package/dist/{vite-hmr → types/vite-hmr}/plugin.d.ts +0 -0
  114. /package/dist/{vite-hmr → types/vite-hmr}/runtime.d.ts +0 -0
@@ -1,246 +0,0 @@
1
- /**
2
- * template-audit.ts — First-parse static template audit (ADR 0030.2 T4).
3
- *
4
- * Attached to the parse-once cache in template.ts: runs ONCE per `html`
5
- * callsite (keyed by TemplateStringsArray identity) at the first parse, and
6
- * walks the parsed-but-never-mounted template element checking its STATIC
7
- * parts. The silent-static-typo class — the no-build equivalent of a compile
8
- * error — dies in the engine, amortized free.
9
- *
10
- * Checks (per ADR 0030.2 §2 T4 as amended by §8 "T4 (template)"):
11
- * - N101 — a dash-tag with no customElements definition. Races
12
- * `customElements.whenDefined` against a microtask + macrotask grace so
13
- * ordinary lazy definition (module import order) never warns.
14
- * - N102 — an `@event` name that is neither a known native event nor an
15
- * allowlisted component-dispatched event (`ui-*`, `nisli-*`).
16
- * - N103 — an unknown `@event.modifier`.
17
- * - N104 — an attribute on a component tag that declares attributes
18
- * (non-empty `static observedAttributes`) which is neither declared nor a
19
- * global HTML attribute. Components WITHOUT declared attributes get NO
20
- * attribute audit: pre-schema (T3) there is no truth source — auto-resolved
21
- * props are deliberately not attributes (§8).
22
- *
23
- * Suppression escape (designed for lazy islands, §8): a comment directive as
24
- * the template's FIRST node (leading whitespace allowed):
25
- *
26
- * html`<!-- nisli-audit off --><my-island>…</my-island>`
27
- * — disables the whole audit for this template.
28
- *
29
- * html`<!-- nisli-audit allow-undefined: my-island other-tag --><…>`
30
- * — suppresses only N101 for the named tags (other checks stay live).
31
- *
32
- * The directive comment is static content: it survives into the mounted DOM
33
- * (and SSG output) as an inert HTML comment. Documented, accepted for the
34
- * prototype; the design gate may choose to strip it at parse.
35
- *
36
- * Dev gating: core has no build-time dev/prod define today — that mechanism
37
- * is a named Wave-1 deliverable (§8). Until it exists this module is gated on
38
- * the `devMode` flag below ONLY. SSG/happy-dom detection is deliberately NOT
39
- * attempted (unreliable); an SSG build that wants silence must call
40
- * `setTemplateAuditEnabled(false)` before rendering.
41
- */
42
- // Reporting goes through the diagnostics leaf. The audit keeps its own
43
- // enable override (tests, SSG environments) and otherwise follows the
44
- // leaf's dev gate — under NODE_ENV=production builds it is silent.
45
- import { diag as emitDiag, isDev } from './diagnostics.js';
46
- let enabledOverride = null;
47
- /**
48
- * Enable/disable the first-parse audit (and its callsite capture);
49
- * `null` restores the dev-gate default.
50
- */
51
- export function setTemplateAuditEnabled(enabled) {
52
- enabledOverride = enabled;
53
- }
54
- /** Current audit gate state (exposed for template.ts and tests). */
55
- export function isTemplateAuditEnabled() {
56
- return enabledOverride ?? isDev();
57
- }
58
- /** Emit a coded audit diagnostic through the diagnostics leaf (audit-gated). */
59
- export function diag(code, message, detail) {
60
- if (!isTemplateAuditEnabled())
61
- return;
62
- emitDiag(code, message, detail === undefined ? undefined : { detail });
63
- }
64
- // ── Callsite capture ────────────────────────────────────────────────
65
- /** First-seen authoring callsite per template identity (dev only). */
66
- const callsites = new WeakMap();
67
- /**
68
- * Remember the authoring callsite of an `html` template the first time its
69
- * strings identity is seen. Must be called from `html()` itself — by the
70
- * time the first parse happens (first mount), the authoring frame is gone
71
- * from the stack. No-op when the audit is disabled or already captured.
72
- */
73
- export function captureCallsite(strings) {
74
- if (!isTemplateAuditEnabled() || callsites.has(strings))
75
- return;
76
- const stack = new Error().stack ?? '';
77
- const frame = stack
78
- .split('\n')
79
- .slice(1)
80
- .find(line => line.includes('at ') && !/template(-audit)?\.(ts|js|mjs|cjs)/.test(line));
81
- callsites.set(strings, frame ? frame.trim() : '(unknown callsite)');
82
- }
83
- // ── Audit ───────────────────────────────────────────────────────────
84
- const audited = new WeakSet();
85
- /** Modifiers understood by bindEvent (template.ts). */
86
- const KNOWN_MODIFIERS = new Set(['stop', 'prevent', 'once', 'enter', 'escape', 'space', 'tab']);
87
- /** Component-dispatched event prefixes exempt from the native-event check (§8). */
88
- const COMPONENT_EVENT_PREFIXES = ['ui-', 'nisli-'];
89
- /** Real native events with no `on*` IDL attribute (the `in`-check misses them). */
90
- const NATIVE_EVENTS_WITHOUT_IDL = new Set(['focusin', 'focusout']);
91
- /**
92
- * Global HTML attributes legal on ANY component tag. Mirrors (and must stay a
93
- * superset of) template.ts's auto-resolution exclusion list — these reach the
94
- * element as plain attributes, never `_setProp`.
95
- */
96
- const GLOBAL_ATTRS = new Set([
97
- 'id', 'class', 'style', 'slot', 'title', 'role', 'tabindex', 'name',
98
- 'part', 'hidden', 'dir', 'lang', 'is',
99
- ]);
100
- /** Parse the leading `<!-- nisli-audit … -->` directive comment, if any. */
101
- function parseDirectives(content) {
102
- const directives = { off: false, allowUndefined: new Set() };
103
- for (const node of content.childNodes) {
104
- if (node.nodeType === Node.TEXT_NODE) {
105
- if ((node.textContent ?? '').trim() === '')
106
- continue; // leading whitespace
107
- break;
108
- }
109
- if (node.nodeType === Node.COMMENT_NODE) {
110
- const body = (node.textContent ?? '').trim();
111
- if (!body.startsWith('nisli-audit'))
112
- break;
113
- const rest = body.slice('nisli-audit'.length).trim();
114
- if (rest === 'off') {
115
- directives.off = true;
116
- }
117
- else if (rest.startsWith('allow-undefined')) {
118
- const tags = rest
119
- .slice('allow-undefined'.length)
120
- .replace(/^[:\s]+/, '')
121
- .split(/[\s,]+/)
122
- .filter(Boolean);
123
- for (const tag of tags)
124
- directives.allowUndefined.add(tag.toLowerCase());
125
- }
126
- }
127
- break; // only the FIRST non-whitespace node may carry the directive
128
- }
129
- return directives;
130
- }
131
- /**
132
- * N101 — dash-tag with no definition. Rather than warning synchronously (the
133
- * defining module may simply import later in the same task), race
134
- * `customElements.whenDefined(tag)` against a microtask + macrotask grace;
135
- * warn only if the tag is still undefined after the grace elapses.
136
- */
137
- function checkDashTag(tag, site) {
138
- let registry;
139
- try {
140
- registry = customElements;
141
- }
142
- catch {
143
- return; // no registry in this environment — nothing to check
144
- }
145
- if (!registry || registry.get(tag))
146
- return;
147
- let defined = false;
148
- try {
149
- registry.whenDefined(tag).then(() => { defined = true; }, () => { });
150
- }
151
- catch {
152
- diag('N101', `<${tag}> is not a valid custom element name — at ${site}`);
153
- return;
154
- }
155
- // Grace: one microtask hop (whenDefined settlements for definitions made
156
- // earlier in this task) + one macrotask hop (definitions made later in the
157
- // same task, e.g. module evaluation order). Under fake timers the macrotask
158
- // may never fire — the warning is simply skipped, never wrong.
159
- queueMicrotask(() => {
160
- if (defined)
161
- return;
162
- setTimeout(() => {
163
- try {
164
- if (!isTemplateAuditEnabled() || defined || registry.get(tag))
165
- return;
166
- diag('N101', `<${tag}> is used in a template but never defined (customElements.get returned ` +
167
- `undefined after grace) — at ${site}. If this tag is a lazily-loaded island, ` +
168
- `suppress with a leading <!-- nisli-audit allow-undefined: ${tag} --> comment.`);
169
- }
170
- catch { /* environment torn down during grace — nothing to report */ }
171
- }, 0);
172
- });
173
- }
174
- /** N102/N103 — event-name and modifier checks for one `@event.mods` attribute. */
175
- function checkEvent(el, attrName, site) {
176
- const parts = attrName.slice(1).split('.');
177
- const eventName = parts[0] ?? '';
178
- const modifiers = parts.slice(1);
179
- const isNative = `on${eventName}` in el || NATIVE_EVENTS_WITHOUT_IDL.has(eventName);
180
- const isComponentEvent = COMPONENT_EVENT_PREFIXES.some(p => eventName.startsWith(p));
181
- if (eventName && !isNative && !isComponentEvent) {
182
- diag('N102', `@${eventName} on <${el.tagName.toLowerCase()}> is not a known native event ` +
183
- `(and not an allowlisted ${COMPONENT_EVENT_PREFIXES.join('/')} component event) — at ${site}`);
184
- }
185
- for (const mod of modifiers) {
186
- if (!KNOWN_MODIFIERS.has(mod)) {
187
- diag('N103', `unknown event modifier ".${mod}" in "${attrName}" — known: ` +
188
- `${[...KNOWN_MODIFIERS].join(', ')} — at ${site}`);
189
- }
190
- }
191
- }
192
- /** N104 — undeclared attribute on a component that DECLARES attributes. */
193
- function checkComponentAttr(tag, name, observed, site) {
194
- if (name.startsWith('data-') || name.startsWith('aria-'))
195
- return;
196
- if (GLOBAL_ATTRS.has(name) || observed.includes(name))
197
- return;
198
- diag('N104', `<${tag}> declares attributes [${observed.join(', ')}] but the template sets ` +
199
- `unknown "${name}" — at ${site}. Undeclared names route through _setProp and are ` +
200
- `silently dead as attributes.`);
201
- }
202
- /**
203
- * Run the one-time static audit over a freshly parsed template. Called by
204
- * template.ts's parse-once cache on cache miss; idempotent per template
205
- * identity, no-op when the audit is disabled. Read-only over the cached
206
- * template element — mounting state is never touched.
207
- */
208
- export function auditTemplate(strings, template) {
209
- if (!isTemplateAuditEnabled() || audited.has(strings))
210
- return;
211
- audited.add(strings);
212
- const site = callsites.get(strings) ?? '(unknown callsite)';
213
- const content = template.content;
214
- const directives = parseDirectives(content);
215
- if (directives.off)
216
- return;
217
- for (const el of content.querySelectorAll('*')) {
218
- const tag = el.tagName.toLowerCase();
219
- const isDashTag = tag.includes('-');
220
- if (isDashTag && !directives.allowUndefined.has(tag)) {
221
- checkDashTag(tag, site);
222
- }
223
- // Attribute audit ONLY for components with declared attrs (§8): a
224
- // non-empty static observedAttributes is the single pre-T3 truth source.
225
- let observed;
226
- if (isDashTag) {
227
- const ctor = customElements.get(tag);
228
- const list = ctor?.observedAttributes;
229
- if (Array.isArray(list) && list.length > 0)
230
- observed = list;
231
- }
232
- for (const attr of [...el.attributes]) {
233
- const name = attr.name;
234
- if (name.startsWith('@')) {
235
- checkEvent(el, name, site);
236
- continue;
237
- }
238
- // Directive positions with their own semantics — never attributes.
239
- if (name.startsWith('class:') || name === 'ref' || name === 'html:inner')
240
- continue;
241
- if (observed)
242
- checkComponentAttr(tag, name, observed, site);
243
- }
244
- }
245
- }
246
- //# sourceMappingURL=template-audit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template-audit.js","sourceRoot":"","sources":["../src/template-audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,uEAAuE;AACvE,sEAAsE;AACtE,mEAAmE;AACnE,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE3D,IAAI,eAAe,GAAmB,IAAI,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAuB;IAC7D,eAAe,GAAG,OAAO,CAAC;AAC5B,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,sBAAsB;IACpC,OAAO,eAAe,IAAI,KAAK,EAAE,CAAC;AACpC,CAAC;AAED,gFAAgF;AAChF,MAAM,U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