@rohal12/spindle 0.53.0 → 0.55.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 +3 -1
- package/dist/pkg/format.js +1 -1
- package/dist/pkg/headless.js +10058 -2075
- package/dist/pkg/macro-registry.json +4 -4
- package/dist/pkg/story-variables.js +10197 -1925
- package/dist/pkg/tooling.js +15 -1
- package/package.json +3 -1
- package/src/code-check.ts +314 -0
- package/src/components/Passage.tsx +3 -3
- package/src/components/PassageDialog.tsx +2 -4
- package/src/components/StoryInterface.tsx +2 -4
- package/src/components/macros/Do.tsx +1 -1
- package/src/components/macros/Goto.tsx +19 -8
- package/src/components/macros/Include.tsx +23 -11
- package/src/components/macros/Set.tsx +1 -1
- package/src/components/macros/VarDisplay.tsx +1 -1
- package/src/components/macros/Widget.tsx +5 -33
- package/src/components/macros/macro-args.ts +16 -7
- package/src/define-macro.ts +2 -0
- package/src/expression.ts +25 -20
- package/src/index.tsx +63 -37
- package/src/interpolation.ts +4 -5
- package/src/js-lexer.ts +981 -1342
- package/src/markup/ast.ts +11 -226
- package/src/markup/code-attributes.ts +3 -3
- package/src/markup/code-end.ts +121 -0
- package/src/markup/parse.ts +118 -0
- package/src/markup/render.tsx +1 -1
- package/src/markup/spindle.d.peggy.ts +24 -0
- package/src/markup/spindle.peggy +463 -0
- package/src/markup/tokens.ts +95 -0
- package/src/markup/validate.ts +281 -0
- package/src/parser.ts +19 -4
- package/src/registry.ts +49 -14
- package/src/runtime-errors.ts +10 -0
- package/src/store.ts +8 -2
- package/src/story-init.ts +3 -5
- package/src/story-variables.ts +49 -8
- package/src/tooling.ts +58 -0
- package/src/types-drift-check.ts +28 -1
- package/src/widgets/widget-def.ts +60 -0
- package/types/index.d.ts +7 -3
- package/types/tooling.d.ts +53 -3
- package/src/markup/tokenizer.ts +0 -1112
package/README.md
CHANGED
|
@@ -93,7 +93,9 @@ the job and extend it; most fixes then land in one place. The shared modules:
|
|
|
93
93
|
| Macro arguments: declared `parameters`, `ctx.args` | `src/components/macros/macro-args.ts` |
|
|
94
94
|
| Quoting, splitting, string scanning | `src/components/macros/arg-utils.ts` |
|
|
95
95
|
| JavaScript scanning (`findCodeEnd`, `lexJs`) | `src/js-lexer.ts` |
|
|
96
|
-
| Sigils and scopes (`SIGIL_SCOPES`, `SCOPE_SIGILS`) | `src/markup/
|
|
96
|
+
| Sigils and scopes (`SIGIL_SCOPES`, `SCOPE_SIGILS`) | `src/markup/tokens.ts` |
|
|
97
|
+
| Passage markup (`parseMarkup`, `tokenizeMarkup`) | `src/markup/parse.ts` (grammar: `src/markup/spindle.peggy`) |
|
|
98
|
+
| Where code in `{…}` ends (`closeBrace`, `rawBodyEnd`) | `src/markup/code-end.ts` |
|
|
97
99
|
| Reading story state / render contexts in components | `src/hooks/use-story-fields.ts`, `src/hooks/use-render-options.ts` |
|
|
98
100
|
| Save storage operations | `src/saves/storage.ts` (`createBackend`) |
|
|
99
101
|
|