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.
- package/README.md +66 -31
- package/dist/chunk-EYQXQQQH.js +336 -0
- package/dist/chunk-EYQXQQQH.js.map +1 -0
- package/dist/{chunk-DNHOGPYV.js → chunk-FPT4EJ6Q.js} +1100 -1551
- package/dist/chunk-FPT4EJ6Q.js.map +1 -0
- package/dist/chunk-JBM3MJRM.js +382 -0
- package/dist/chunk-JBM3MJRM.js.map +1 -0
- package/dist/{chunk-DWLB7FRR.js → chunk-TTJEXWAC.js} +322 -9
- package/dist/chunk-TTJEXWAC.js.map +1 -0
- package/dist/{chunk-6WVVF6AD.js → chunk-U5GOONKV.js} +5 -2
- package/dist/{chunk-6WVVF6AD.js.map → chunk-U5GOONKV.js.map} +1 -1
- package/dist/cli.cjs +3010 -2789
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +268 -232
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1684 -1649
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +255 -498
- package/dist/index.d.ts +255 -498
- package/dist/index.js +17 -37
- package/dist/{pattern-F5xBtIE-.d.cts → pattern-DotR_dHs.d.cts} +1 -1
- package/dist/pattern-kit.cjs +60 -1
- package/dist/pattern-kit.cjs.map +1 -1
- package/dist/pattern-kit.d.cts +2 -2
- package/dist/pattern-kit.d.ts +2 -2
- package/dist/pattern-kit.js +2 -2
- package/dist/{pattern-CV607P87.d.ts → pattern-urm5uuwj.d.ts} +1 -1
- package/dist/{resolve-ops-DIwEelH-.d.ts → resolve-ops-D8aQina5.d.cts} +20 -0
- package/dist/{resolve-ops-DIwEelH-.d.cts → resolve-ops-D8aQina5.d.ts} +20 -0
- package/dist/verify.d.cts +1 -1
- package/dist/verify.d.ts +1 -1
- package/dist/verify.js +1 -1
- package/dist/webpack-loader.cjs +1615 -1633
- package/dist/webpack-loader.cjs.map +1 -1
- package/dist/webpack-loader.d.cts +8 -2
- package/dist/webpack-loader.d.ts +8 -2
- package/dist/webpack-loader.js +8 -5
- package/dist/webpack-loader.js.map +1 -1
- package/dist/worker.cjs +5337 -0
- package/dist/worker.cjs.map +1 -0
- package/dist/worker.d.cts +2 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.js +72 -0
- package/dist/worker.js.map +1 -0
- package/package.json +4 -2
- package/dist/chunk-DNHOGPYV.js.map +0 -1
- package/dist/chunk-DOQEBGWB.js +0 -188
- package/dist/chunk-DOQEBGWB.js.map +0 -1
- 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-
|
|
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
package/dist/verify.d.ts
CHANGED