@spintax/core 0.7.0 → 0.8.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 +361 -0
- package/README.md +7 -2
- package/dist/index.cjs +847 -282
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +847 -282
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -25,8 +25,12 @@
|
|
|
25
25
|
* 3 — `EnumerationNode` and `PermutationNode` gained `raw`, the body a direct `%var%` reference
|
|
26
26
|
* is spliced into at render time. An `Ast` cached by version 2 carries no `raw`, so rendering it
|
|
27
27
|
* would silently keep a pipe-joined value as ONE option — the defect 0.7.0 fixed.
|
|
28
|
+
*
|
|
29
|
+
* 4 — `raw` is kept on more constructs: one holding a `{?…}` conditional, and a permutation with a
|
|
30
|
+
* reference anywhere in its `<config>` (#80). The shape is 3's, but an `Ast` cached by version 3
|
|
31
|
+
* lacks `raw` exactly where the new rule needs it, and would render `[{?f?a|b|x}|c]` with a raw `|`.
|
|
28
32
|
*/
|
|
29
|
-
declare const AST_VERSION =
|
|
33
|
+
declare const AST_VERSION = 4;
|
|
30
34
|
/** Opaque public handle (re-exported as `Ast` from the package index). */
|
|
31
35
|
interface Ast {
|
|
32
36
|
readonly astVersion: typeof AST_VERSION;
|
|
@@ -46,10 +50,11 @@ interface Ast {
|
|
|
46
50
|
* - conditionals test truthiness against the raw var map; plurals resolve the
|
|
47
51
|
* count (vars already expanded) then pick the bucket, lenient fullwidth
|
|
48
52
|
* fallback (Stage 6d, after vars).
|
|
49
|
-
* - a `%var%` that sits DIRECTLY in an enumeration/permutation body
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
+
* - a `%var%` or a `{?…}` that sits DIRECTLY in an enumeration/permutation body, or a
|
|
54
|
+
* reference anywhere in a permutation's `<config>`, makes the construct re-read as
|
|
55
|
+
* TEXT (spliceConstruct; 0.7.0, widened for #80): a `|` inside such a value or taken
|
|
56
|
+
* branch separates options, exactly as in the plugin, whose conditionals and expansion
|
|
57
|
+
* run before any bracket is read. Every other construct keeps the tree it was parsed into.
|
|
53
58
|
* - #include (post-tree string pass) and post-process are later PRs.
|
|
54
59
|
*
|
|
55
60
|
* RNG note: cross-engine RNG-sequence parity is a non-goal (§3.2). Enumerations
|
package/dist/index.d.ts
CHANGED
|
@@ -25,8 +25,12 @@
|
|
|
25
25
|
* 3 — `EnumerationNode` and `PermutationNode` gained `raw`, the body a direct `%var%` reference
|
|
26
26
|
* is spliced into at render time. An `Ast` cached by version 2 carries no `raw`, so rendering it
|
|
27
27
|
* would silently keep a pipe-joined value as ONE option — the defect 0.7.0 fixed.
|
|
28
|
+
*
|
|
29
|
+
* 4 — `raw` is kept on more constructs: one holding a `{?…}` conditional, and a permutation with a
|
|
30
|
+
* reference anywhere in its `<config>` (#80). The shape is 3's, but an `Ast` cached by version 3
|
|
31
|
+
* lacks `raw` exactly where the new rule needs it, and would render `[{?f?a|b|x}|c]` with a raw `|`.
|
|
28
32
|
*/
|
|
29
|
-
declare const AST_VERSION =
|
|
33
|
+
declare const AST_VERSION = 4;
|
|
30
34
|
/** Opaque public handle (re-exported as `Ast` from the package index). */
|
|
31
35
|
interface Ast {
|
|
32
36
|
readonly astVersion: typeof AST_VERSION;
|
|
@@ -46,10 +50,11 @@ interface Ast {
|
|
|
46
50
|
* - conditionals test truthiness against the raw var map; plurals resolve the
|
|
47
51
|
* count (vars already expanded) then pick the bucket, lenient fullwidth
|
|
48
52
|
* fallback (Stage 6d, after vars).
|
|
49
|
-
* - a `%var%` that sits DIRECTLY in an enumeration/permutation body
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
+
* - a `%var%` or a `{?…}` that sits DIRECTLY in an enumeration/permutation body, or a
|
|
54
|
+
* reference anywhere in a permutation's `<config>`, makes the construct re-read as
|
|
55
|
+
* TEXT (spliceConstruct; 0.7.0, widened for #80): a `|` inside such a value or taken
|
|
56
|
+
* branch separates options, exactly as in the plugin, whose conditionals and expansion
|
|
57
|
+
* run before any bracket is read. Every other construct keeps the tree it was parsed into.
|
|
53
58
|
* - #include (post-tree string pass) and post-process are later PRs.
|
|
54
59
|
*
|
|
55
60
|
* RNG note: cross-engine RNG-sequence parity is a non-goal (§3.2). Enumerations
|