domflax 0.1.2 → 0.2.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 (49) hide show
  1. package/README.md +66 -31
  2. package/dist/chunk-EYQXQQQH.js +336 -0
  3. package/dist/chunk-EYQXQQQH.js.map +1 -0
  4. package/dist/{chunk-DNHOGPYV.js → chunk-FPT4EJ6Q.js} +1100 -1551
  5. package/dist/chunk-FPT4EJ6Q.js.map +1 -0
  6. package/dist/chunk-JBM3MJRM.js +382 -0
  7. package/dist/chunk-JBM3MJRM.js.map +1 -0
  8. package/dist/{chunk-DWLB7FRR.js → chunk-TTJEXWAC.js} +322 -9
  9. package/dist/chunk-TTJEXWAC.js.map +1 -0
  10. package/dist/{chunk-6WVVF6AD.js → chunk-U5GOONKV.js} +5 -2
  11. package/dist/{chunk-6WVVF6AD.js.map → chunk-U5GOONKV.js.map} +1 -1
  12. package/dist/cli.cjs +3010 -2789
  13. package/dist/cli.cjs.map +1 -1
  14. package/dist/cli.js +268 -232
  15. package/dist/cli.js.map +1 -1
  16. package/dist/index.cjs +1684 -1649
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +255 -498
  19. package/dist/index.d.ts +255 -498
  20. package/dist/index.js +17 -37
  21. package/dist/{pattern-F5xBtIE-.d.cts → pattern-DotR_dHs.d.cts} +1 -1
  22. package/dist/pattern-kit.cjs +60 -1
  23. package/dist/pattern-kit.cjs.map +1 -1
  24. package/dist/pattern-kit.d.cts +2 -2
  25. package/dist/pattern-kit.d.ts +2 -2
  26. package/dist/pattern-kit.js +2 -2
  27. package/dist/{pattern-CV607P87.d.ts → pattern-urm5uuwj.d.ts} +1 -1
  28. package/dist/{resolve-ops-DIwEelH-.d.ts → resolve-ops-D8aQina5.d.cts} +20 -0
  29. package/dist/{resolve-ops-DIwEelH-.d.cts → resolve-ops-D8aQina5.d.ts} +20 -0
  30. package/dist/verify.d.cts +1 -1
  31. package/dist/verify.d.ts +1 -1
  32. package/dist/verify.js +1 -1
  33. package/dist/webpack-loader.cjs +1615 -1633
  34. package/dist/webpack-loader.cjs.map +1 -1
  35. package/dist/webpack-loader.d.cts +8 -2
  36. package/dist/webpack-loader.d.ts +8 -2
  37. package/dist/webpack-loader.js +8 -5
  38. package/dist/webpack-loader.js.map +1 -1
  39. package/dist/worker.cjs +5337 -0
  40. package/dist/worker.cjs.map +1 -0
  41. package/dist/worker.d.cts +2 -0
  42. package/dist/worker.d.ts +2 -0
  43. package/dist/worker.js +72 -0
  44. package/dist/worker.js.map +1 -0
  45. package/package.json +4 -2
  46. package/dist/chunk-DNHOGPYV.js.map +0 -1
  47. package/dist/chunk-DOQEBGWB.js +0 -188
  48. package/dist/chunk-DOQEBGWB.js.map +0 -1
  49. package/dist/chunk-DWLB7FRR.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { d as RewriteOp, e as IRDocument, f as SafetyLevel, c as StyleNormalizer, g as SelectorIndex, h as StyleResolver, I as IRNodeId, P as PatternName, D as DiagnosticCode, i as Diagnostic, F as FileKind, j as SyntheticSink, k as SourceSpan, l as PassPhase, m as PassCategory, n as NodeMeta, o as DeepReadonly, p as IRElement, S as StyleMap, N as NodeLike, E as ElementLike, q as IRNode, r as RewriteFactory, R as RewriteOpDraft, s as Reporter, t as StyleCondition, u as ConditionKey, v as IRNamespace, w as ClassList, x as InlineStyle, A as AttrMap, B as BackrefTable, y as Backref, z as IRComment, G as FrontendKind, H as ExprRef, J as IRExpr, K as ExprRegistry, L as IRFragment, M as IdAllocator, O as IRText, V as Visitor, a as StyleConflictPolicy } from './resolve-ops-DIwEelH-.js';
1
+ import { d as RewriteOp, e as IRDocument, f as SafetyLevel, c as StyleNormalizer, g as SelectorIndex, h as StyleResolver, I as IRNodeId, P as PatternName, D as DiagnosticCode, i as Diagnostic, F as FileKind, j as SyntheticSink, k as SourceSpan, l as PassPhase, m as PassCategory, n as NodeMeta, o as DeepReadonly, p as IRElement, S as StyleMap, N as NodeLike, E as ElementLike, q as IRNode, r as RewriteFactory, R as RewriteOpDraft, s as Reporter, t as StyleCondition, u as ConditionKey, v as IRNamespace, w as ClassList, x as InlineStyle, A as AttrMap, B as BackrefTable, y as Backref, z as IRComment, G as FrontendKind, H as ExprRef, J as IRExpr, K as ExprRegistry, L as IRFragment, M as IdAllocator, O as IRText, V as Visitor, a as StyleConflictPolicy } from './resolve-ops-D8aQina5.js';
2
2
 
3
3
  /**
4
4
  * @domflax/core — type contract, part 3/3: the pattern contract + match/rewrite contexts, the pass
@@ -132,6 +132,17 @@ interface NodeMeta {
132
132
  hasDynamicChildren: boolean;
133
133
  isComponent: boolean;
134
134
  hasDangerousHtml: boolean;
135
+ /**
136
+ * SAFETY (Layer 2): at least one of THIS element's static class tokens could not be resolved by the
137
+ * style provider — a real, non-empty token that yielded no declarations and is not a known no-op
138
+ * utility (e.g. a Tailwind-v4 project the v3 resolver cannot drive, a JS-hook class like `js-toggle`,
139
+ * or a typo). The element's TRUE style is therefore UNKNOWN, so it must be treated as OPAQUE for
140
+ * flatten purposes (never removed/unwrapped as "inert"). Set by the frontends from
141
+ * `ResolveResult.unknown`; distinct from an element that RESOLVED to no paint (all tokens known,
142
+ * collectively non-painting) which stays flatten-eligible. Compress is unaffected — it only rewrites
143
+ * the element's own RESOLVED tokens and preserves unknown ones verbatim.
144
+ */
145
+ hasUnresolvedClasses: boolean;
135
146
  targetedByCombinator: boolean;
136
147
  targetedByStructuralPseudo: boolean;
137
148
  selectorDependents: number;
@@ -143,6 +154,15 @@ interface NodeMeta {
143
154
  declaresCustomProperties: boolean;
144
155
  whitespaceSensitive: boolean;
145
156
  touched: boolean;
157
+ /**
158
+ * A rewrite pass DIRECTLY rewrote THIS element's own computed style (setClassList / mergeStyle onto
159
+ * it / foldInheritedStyles into it). Distinct from {@link touched}, which is ALSO raised when a
160
+ * neighbour op (a child's `unwrap`, a sibling `mergeSiblings`/`moveNode`, an `insert`/`replaceWith`)
161
+ * marks this node as a structural bystander WITHOUT changing its computed. Reverse-emit re-derives
162
+ * class tokens ONLY for `styleDirty` elements, so a bystander keeps its `class` attribute byte-for-
163
+ * byte identical (it can never gain a redundant class it did not already carry).
164
+ */
165
+ styleDirty: boolean;
146
166
  synthetic: boolean;
147
167
  safetyFloor: SafetyLevel;
148
168
  }
@@ -132,6 +132,17 @@ interface NodeMeta {
132
132
  hasDynamicChildren: boolean;
133
133
  isComponent: boolean;
134
134
  hasDangerousHtml: boolean;
135
+ /**
136
+ * SAFETY (Layer 2): at least one of THIS element's static class tokens could not be resolved by the
137
+ * style provider — a real, non-empty token that yielded no declarations and is not a known no-op
138
+ * utility (e.g. a Tailwind-v4 project the v3 resolver cannot drive, a JS-hook class like `js-toggle`,
139
+ * or a typo). The element's TRUE style is therefore UNKNOWN, so it must be treated as OPAQUE for
140
+ * flatten purposes (never removed/unwrapped as "inert"). Set by the frontends from
141
+ * `ResolveResult.unknown`; distinct from an element that RESOLVED to no paint (all tokens known,
142
+ * collectively non-painting) which stays flatten-eligible. Compress is unaffected — it only rewrites
143
+ * the element's own RESOLVED tokens and preserves unknown ones verbatim.
144
+ */
145
+ hasUnresolvedClasses: boolean;
135
146
  targetedByCombinator: boolean;
136
147
  targetedByStructuralPseudo: boolean;
137
148
  selectorDependents: number;
@@ -143,6 +154,15 @@ interface NodeMeta {
143
154
  declaresCustomProperties: boolean;
144
155
  whitespaceSensitive: boolean;
145
156
  touched: boolean;
157
+ /**
158
+ * A rewrite pass DIRECTLY rewrote THIS element's own computed style (setClassList / mergeStyle onto
159
+ * it / foldInheritedStyles into it). Distinct from {@link touched}, which is ALSO raised when a
160
+ * neighbour op (a child's `unwrap`, a sibling `mergeSiblings`/`moveNode`, an `insert`/`replaceWith`)
161
+ * marks this node as a structural bystander WITHOUT changing its computed. Reverse-emit re-derives
162
+ * class tokens ONLY for `styleDirty` elements, so a bystander keeps its `class` attribute byte-for-
163
+ * byte identical (it can never gain a redundant class it did not already carry).
164
+ */
165
+ styleDirty: boolean;
146
166
  synthetic: boolean;
147
167
  safetyFloor: SafetyLevel;
148
168
  }
package/dist/verify.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as Diagnostic } from './resolve-ops-DIwEelH-.cjs';
1
+ import { i as Diagnostic } from './resolve-ops-D8aQina5.cjs';
2
2
 
3
3
  /**
4
4
  * @domflax/verify — public type contract (TYPED STUB)
package/dist/verify.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as Diagnostic } from './resolve-ops-DIwEelH-.js';
1
+ import { i as Diagnostic } from './resolve-ops-D8aQina5.js';
2
2
 
3
3
  /**
4
4
  * @domflax/verify — public type contract (TYPED STUB)
package/dist/verify.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  init_esm_shims
6
- } from "./chunk-6WVVF6AD.js";
6
+ } from "./chunk-U5GOONKV.js";
7
7
 
8
8
  // ../../node_modules/pngjs/lib/chunkstream.js
9
9
  var require_chunkstream = __commonJS({