@hyperfixi/types-browser 3.3.0 → 4.0.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 CHANGED
@@ -7,6 +7,168 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.0.0] - 2026-10-04
11
+
12
+ `@hyperfixi/core`'s own hyperscript engine is gone: its root re-exports `@hyperfixi/engine`, and
13
+ its `hyperfixi.js` is the engine's 34 KB script-tag bundle where core's ~352 KB bundle used to be.
14
+ The engine follows upstream `_hyperscript`'s grammar and is gated by upstream's own test suite, so
15
+ scripts in core-only syntax need upstream's spelling (two additions stay: `new X()` and
16
+ `toggle <element>`). Core's other bundles, its htmx layer, the core-era plugin packages and the
17
+ AOT compiler retire: htmx 4 or fixi supply hypermedia attributes beside the engine, and
18
+ `@lokascript/hyperscript-adapter` runs hyperscript written in other languages. Every package moves
19
+ to 4.0.0 together. Everything under **Removed** is breaking, as is each **Changed** item marked ⚠;
20
+ [MIGRATION.md](MIGRATION.md) names each replacement.
21
+
22
+ ### Removed
23
+
24
+ - **Core's engine and its API** (#1368). These root exports had no engine counterpart:
25
+ `hyperscript` (`compile`, `compileSync`, `compileAsync`, `eval`, `validate`), `lokascript`,
26
+ `Runtime`, `RuntimeBase`, `createContext` and the element-scope helpers, `installPlugin`,
27
+ `getParserExtensionRegistry`, `setGlobal`, `DebugController`, `validatePartialContent` and its
28
+ helpers, `fromCoreAST` / `toCoreAST`. `parse` is now the engine's. The root is ESM-only, like the
29
+ engine: `dist/index.cjs` and the UMD `dist/index.min.js` (`LokaScriptCore`) are gone, though the
30
+ kept subpaths still ship CommonJS.
31
+ - **21 of core's 29 entry points**: `/commands`, `/expressions`, `/parser/*`, `/behaviors`,
32
+ `/bundle-generator`, `/registry/*`, `/lse`, and `/browser/` `hybrid-complete`, `hybrid-hx`,
33
+ `hybrid-hx-v4`, `multilingual`, `modular` (#1343–#1368). Instead of `/commands`, import the
34
+ grammar modules from the root: `import { toggle } from '@hyperfixi/core'`.
35
+ - **Core's browser bundles** (#1348, #1350, #1352, #1368): `hyperfixi-hx.js`,
36
+ `hyperfixi-hx-v4.js`, `hyperfixi-hybrid-complete.js`, `hyperfixi-multilingual.js`,
37
+ `hyperfixi-classic-i18n.js` and the code-split `hyperfixi.mjs`, plus every alias
38
+ (`hyperfixi-browser.js`, `hyperfixi-hybrid-hx.js`, each `lokascript-*.js`). Only
39
+ `hyperfixi.js` remains. CDN URLs pinned to 3.x keep working.
40
+ - **Core's embedded htmx layer** (#1342, #1348, #1350): `hx-*` and fixi `fx-*` on core's runtime,
41
+ `hx-live`, `sse-connect` / `sse-swap`, `ws-connect` / `ws-send`. Load htmx 4 or fixi beside the
42
+ engine. `hx-live` becomes the engine's `live` block, and SSE and WebSockets are htmx 4's
43
+ `hx-sse` / `hx-ws`.
44
+ - **Core-only members of `window.hyperfixi`**: `compile`, `compileSync`, `execute`, `setLocale`,
45
+ `evalLSENode`, `debugControl`, `semanticDebug`, the `hyperfixi:semantic-parse` event,
46
+ `hyperfixi:debug` logging, `_hyperscript.behaviors.resolve`, and the deprecated
47
+ `window.lokascript` (#1352, #1355).
48
+ - **Core-only hyperscript syntax** (#1346, #1363, #1365). The engine rejects `has` / `have`,
49
+ `prepend`, `copy`, `push url` / `replace url`, `process partials`, the `pseudo` keyword, prefix
50
+ `unless`, bare `beep`, `a ? b : c`, core's `swap <strategy> of X with Y`, `set @a to v on X`,
51
+ `.debounce(n)` / `.throttle(n)`, `my?.x` and `tell X to …`. A few forms still parse but no longer
52
+ do what they did, such as `toggle .a on this` and `go forward`. MIGRATION.md gives each form's
53
+ upstream spelling. The multilingual reader still accepts them all.
54
+ - **`@hyperfixi/core/multilingual`'s class API** (#1345, #1368): `MultilingualHyperscript` (with
55
+ `parseToAST`, `getAllTranslations`, …), `getMultilingual`, `multilingual`, `LanguageInfo`,
56
+ `schemaRoleInferrer`. The entry is three async functions: `parse`, `render`, `translate`.
57
+ - **The AOT compiler** (#1364). Its output ran only on a runtime that was never published.
58
+ `@lokascript/compilation-service` loses `compile()`, `POST /compile`, `CompileResponse`, the
59
+ compile cache (`SemanticCache`, `getCacheStats`, `clearCache`, `/cache`), `generateTests`'
60
+ `executionMode` and `generate()`'s `'js'` target. `generate()` now requires `target`
61
+ (`react` | `vue` | `svelte` | `intent-element`). `@hyperfixi/mcp-server` loses
62
+ `compile_hyperscript`, `execute_lse`, `lse_to_hyperscript`'s `compile` option and
63
+ `generate_tests`' `executionMode`, leaving 106 tools. The loop is now `validate_and_compile`
64
+ (name kept), then repair, then the hyperscript as is in `_="…"`.
65
+ - **`@hyperfixi/vite-plugin`'s compile mode** (#1360). `mode: 'compile'` warns and builds the
66
+ engine bundle. The exports `CompiledHandler`, `CompileOptions` and
67
+ `set/clear/hasSemanticParser` are removed.
68
+ - **Smaller removals.** `@hyperfixi/core/reference` loses `availability`, `BundleAvailability`
69
+ and `getCommandsByAvailability` (#1363). `@hyperfixi/speech` loses `speechPlugin`,
70
+ `speakCommand`, `askCommand` and `answerCommand`; the engine has `ask` / `answer` (#1358).
71
+ `@hyperfixi/intent-element` loses its `evalLSENode` fallback (#1356).
72
+ `@hyperfixi/patterns-reference` loses four rows that held only retired htmx attributes, and
73
+ `hx-live-with-mutator` is renamed `live-with-handler` (#1348). Of the never-published VS Code
74
+ extensions, the LokaScript one loses its debugger and the standalone `_hyperscript` one is
75
+ retired (#1361).
76
+
77
+ ### Deprecated
78
+
79
+ - **`@hyperfixi/reactivity`, `@hyperfixi/realtime`, `@hyperfixi/components`**: deprecated on npm,
80
+ last version 3.3.0 (#1358). Use the engine's built-in `live` / `when` / `bind`, htmx 4's
81
+ `hx-sse` / `hx-ws`, and upstream's component extension.
82
+ - **`@hyperfixi/types-browser`'s `LokaScriptCoreAPI`**: a deprecated alias of `HyperfixiAPI`
83
+ (#1356).
84
+
85
+ ### Changed
86
+
87
+ - ⚠ **`@hyperfixi/core` is the engine plus tooling** (#1368). The root is
88
+ `export * from '@hyperfixi/engine'` and `VERSION`: `register`, `everything` and each grammar
89
+ module, `api`, `parse`, `evaluate`, `processNode`, `boot`, and the AST types. The engine stays
90
+ external, so both packages share one grammar. Kept: `/multilingual`, `/ast-utils`,
91
+ `/reference`, `/metadata`, `/lsp-metadata`, `/browser`.
92
+ - ⚠ **`hyperfixi.js` (`@hyperfixi/core/browser`) is the engine's `hyperfixi-hs.js`**, byte for
93
+ byte: 34 KB gzipped instead of ~352 KB (#1355). `window.hyperfixi` is `window._hyperscript`,
94
+ upstream-shaped (`evaluate`, `parse`, `process`, `use`, `config`, `addSourceTransform`). Parse
95
+ errors are a `hyperscript:parse-error` event on the element plus a `console.error` (#1354).
96
+ - ⚠ **Runtime semantics follow upstream** wherever core's differed. `swap #a with #b` exchanges
97
+ the elements; `show` / `hide … with *opacity` honour the strategy; `tell` binds `you`, not `me`;
98
+ `set` on a selector sets every match; and `no ""` is true. MIGRATION.md has the full list.
99
+ - ⚠ **`@hyperfixi/vite-plugin` emits a bundle on `@hyperfixi/engine`** (#1343). There is one
100
+ tier: the grammar modules the scan finds. It weighs 17.9 KB gzipped for three commands (3.x lite:
101
+ 3.9 KB) and 34.4 KB for everything; 3.x fell back to 352 KB on `fetch`. htmx is not bundled.
102
+ Non-English scripts are translated as the engine reads them. `devFallback: 'everything'` is new,
103
+ and `'full'` / `'hybrid-complete'` mean the same. The plugin no longer depends on core.
104
+ - ⚠ **`@hyperfixi/behaviors` runs on the engine** (peer `@hyperfixi/engine`; upstream works too).
105
+ Each behavior is defined with `host.evaluate(source)` and written in upstream's idioms.
106
+ Toggleable's `target` parameter is now `targetEl`. `LokaScriptInstance` / `LokaScriptWindow`
107
+ are now `HyperscriptHost` / `HyperscriptWindow` (#1338).
108
+ - ⚠ **`@hyperfixi/speech` is an engine module** (#1358). Install it with
109
+ `register(...everything, speak)`. It is ESM-only and peers on the engine. `speak` takes
110
+ upstream's syntax (`speak <text> [with voice|rate|pitch|volume <x>]…`) and waits for the
111
+ utterance to end.
112
+ - ⚠ **The localized htmx vocabulary moved** from `@hyperfixi/core/vocab/htmx/{lang}.js` to
113
+ `@lokascript/htmx-adapter/vocab/{lang}.js`; the data is unchanged (#1349).
114
+ - **`@hyperfixi/intent-element`** renders an intent to English with the page's semantic bundle
115
+ and runs it through the host's `evaluate` (`NO_RENDERER` without one). It peers on
116
+ `@hyperfixi/engine` and `@lokascript/semantic` (#1339, #1356).
117
+ - **`@lokascript/semantic` writes upstream's spelling in English** for core-only forms (#1346).
118
+ For example, `has` becomes `matches`, `prepend` becomes `put … at start of`, and swap strategies
119
+ become `put … into` / `before` / `after`. This reaches `translate(…, 'en')`,
120
+ `render(node, 'en')`, both adapters and MCP `translate_to_english`. In `fromSemanticAST`, a
121
+ handler's `then` chain is now its body (#1359).
122
+ - **The language tools read the engine's parse** (#1356, #1359, #1365).
123
+ `@lokascript/language-server` and MCP `validate_hyperscript` report the engine's errors
124
+ (`source: 'engine'`). Hover and symbols come from `@lokascript/semantic`, and some long handlers
125
+ show fewer commands than in 3.x. Hyperscript mode flags exactly `new X()` and `toggle <element>`.
126
+ `@lokascript/compilation-service` rejects natural-language input the engine cannot read
127
+ (`ENGINE_PARSE_ERROR`), and its generated Playwright tests load `hyperfixi-hs.js`. The language
128
+ server, the MCP server and the compilation service now peer on `@hyperfixi/engine`.
129
+ - **MCP**: `get_bundle_config` recommends `hyperfixi-hs.js`, plus an `adapter` field for
130
+ non-English. `analyze_complexity` / `analyze_metrics` no longer count every comparison as a
131
+ decision. The `debug_*` tools point to `log` and `breakpoint`. `UNSUPPORTED_QUERY_LITERAL` is
132
+ gone (#1350, #1352, #1359, #1361, #1364).
133
+ - **`@hyperfixi/core/reference`, `/lsp-metadata`, `/metadata` describe the engine** (#1355,
134
+ #1363). They cover its 53 commands, adding `for`, `ask`, `answer` and `beep!`. Examples are in
135
+ upstream spelling and each is checked to parse; descriptions of core-only semantics (`pick`,
136
+ `beep`, `swap`) are fixed. `FEATURE_KEYWORDS` gains `install`, `when`, `live` and `bind`, and
137
+ `bundleInfo` holds one row.
138
+ - **Dependencies.** `@lokascript/i18n`, `@hyperfixi/testing-framework`, `@hyperfixi/vite-plugin`,
139
+ `@hyperfixi/behaviors`, `@hyperfixi/speech` and `@hyperfixi/intent-element` no longer depend
140
+ on core. Core drops `@lokascript/intent`, morphlex, tslib and its optional peers. Versions are
141
+ lockstep, so upgrade `@hyperfixi/*` and `@lokascript/*` together. `@hyperfixi/mcp-server`,
142
+ `@lokascript/framework` (tests) and `@hyperfixi/server-bridge` (tests) range on
143
+ `@lokascript/domains ^3.0.1`, the first domains release whose peers accept framework,
144
+ semantic and intent 4.x (`^3.1.0 || ^4.0.0`).
145
+
146
+ ### Added
147
+
148
+ - **`@hyperfixi/engine` exports `expr`**, so a grammar module can live in another package
149
+ (#1358).
150
+ - **`@hyperfixi/core/ast-utils`'s `withEnginePositions`** gives interchange nodes the source
151
+ spans of the engine's parse (#1359).
152
+
153
+ ### Fixed
154
+
155
+ - **`@hyperfixi/engine`** accepts upstream's `beep!` command (`beep! a, b`); 3.3.0 rejected it
156
+ (#1362).
157
+ - **`@hyperfixi/types-browser`** types `window.hyperfixi` / `window._hyperscript` as the engine's
158
+ `HyperfixiAPI`. 3.3.0 re-exported a `./globals` it never emitted, so `window.hyperfixi` was
159
+ untyped (#1356).
160
+ - **Semantic browser bundles** (#1351). Single-language and regional bundles (es, ja,
161
+ east-asian, …) registered no English, so the hyperscript adapter left scripts untranslated. They
162
+ now register it (+~2.2 KB gzipped) and export `translate`. The lite adapter finds any
163
+ `LokaScriptSemantic*` global.
164
+ - **`@lokascript/semantic`** (#1338, #1343, #1347). `/core` plus a language module no longer
165
+ throws "No patterns registered". `on click from (x or me)` parses in th and zh. A `js … end`
166
+ block no longer ends its handler in ja / ko / hi / tr / qu / bn. An options object's `}` is no
167
+ longer read as an SOV event name.
168
+ - **Language server and MCP** (#1359, #1363, #1365). `beep!` has hover docs. `set X to`
169
+ completions offer values. Hyperscript-mode errors land on the form, not line 0. Hover no longer
170
+ shows a second `on click`.
171
+
10
172
  ## [3.3.0] - 2026-10-02
11
173
 
12
174
  The first publication of `@hyperfixi/engine`, the hyperscript engine meant to replace the one
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # @lokascript/types-browser
1
+ # @hyperfixi/types-browser
2
2
 
3
- TypeScript type definitions for LokaScript browser globals.
3
+ TypeScript type definitions for the hyperfixi browser globals.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install --save-dev @lokascript/types-browser
8
+ npm install --save-dev @hyperfixi/types-browser
9
9
  ```
10
10
 
11
11
  ## Usage
@@ -15,17 +15,16 @@ Add to your `tsconfig.json`:
15
15
  ```json
16
16
  {
17
17
  "compilerOptions": {
18
- "types": ["@lokascript/types-browser"]
18
+ "types": ["@hyperfixi/types-browser"]
19
19
  }
20
20
  }
21
21
  ```
22
22
 
23
- Now you get full TypeScript autocomplete for browser globals:
23
+ The globals are then typed:
24
24
 
25
25
  ```typescript
26
- // Full IDE autocomplete and type safety!
27
- window.lokascript.execute('toggle .active', document.body);
28
- window._hyperscript.compile('on click add .highlight');
26
+ window.hyperfixi.evaluate('toggle .active on me', { me: button });
27
+ window._hyperscript.parse('on click add .highlight').errors; // []
29
28
 
30
29
  window.LokaScriptSemantic.parse('トグル .active', 'ja');
31
30
  window.LokaScriptSemantic.translate('toggle .active', 'en', 'ko');
@@ -35,24 +34,36 @@ window.LokaScriptI18n.getProfile('ja');
35
34
 
36
35
  ## Provided Types
37
36
 
38
- ### window.lokascript / window.\_hyperscript
39
-
40
- Core LokaScript API (from `lokascript-browser.js` or `lokascript-multilingual.js`):
41
-
42
- - `compile(source, options?)` - Compile hyperscript to AST
43
- - `execute(source, element?, context?)` - Execute hyperscript
44
- - `parse(source)` - Parse to AST
45
- - `processNode(node)` - Process single DOM node
46
- - `process(root?)` - Process entire document
47
- - `createContext(element?, options?)` - Create execution context
48
- - `isValidHyperscript(source)` - Validate syntax
49
- - `version` - Get version string
50
- - `createRuntime(options?)` - Create runtime instance
37
+ ### window.hyperfixi / window.\_hyperscript
38
+
39
+ One object, `HyperfixiAPI`: the public API of `@hyperfixi/engine`, which its `hyperfixi-hs.js`
40
+ installs (and `@hyperfixi/core`'s `hyperfixi.js`, the same file). It is shaped like upstream
41
+ `_hyperscript`'s:
42
+
43
+ - `hyperfixi(source, context?)` / `evaluate(source, context?)` — run commands, features or an
44
+ expression; `context.me` is the element `me` refers to
45
+ - `parse(source)` — parse without running; grammar errors are in `.errors`
46
+ - `process(node)` / `processNode(node)` — initialise the scripted elements under a node
47
+ - `cleanup(element)` — remove what an element's script installed
48
+ - `config` — settings, and the `as <Name>` conversion table
49
+ - `use(plugin)`, `addBeforeProcessHook(hook)`, `addAfterProcessHook(hook)` — upstream's plugin API
50
+ - `addSourceTransform(transform)` — not in upstream: rewrite a script as it is read
51
+ - `version`
52
+
53
+ The package's typecheck checks the engine's own `api` against `HyperfixiAPI`, so the two cannot
54
+ drift apart.
55
+
56
+ > **4.0:** until then `window.hyperfixi` was typed as `@hyperfixi/core`'s own API (`compile`,
57
+ > `compileSync`, `execute`, `createContext`, `evalHyperScript`, …). `hyperfixi.js` is the engine's
58
+ > file now, and none of those exist on it: `compileSync(code)` → `parse(code).errors`;
59
+ > `execute(code, el)` → `evaluate(code, { me: el })`; `compile(code, { language })` → load
60
+ > `@lokascript/hyperscript-adapter` beside a semantic bundle. `window.lokascript` is gone.
61
+ > `LokaScriptCoreAPI` remains as a deprecated alias of `HyperfixiAPI`. (3.x's published
62
+ > `index.d.ts` also never reached its window augmentation: `globals.d.ts` was not emitted.)
51
63
 
52
64
  ### window.LokaScriptSemantic
53
65
 
54
- Semantic parsing and translation API (from `@lokascript/semantic`'s
55
- `dist/browser.global.js`):
66
+ Semantic parsing and translation API (from `@lokascript/semantic`'s browser bundles):
56
67
 
57
68
  - `parse(source, language)` - Parse in any of 24 languages
58
69
  - `translate(source, fromLang, toLang)` - Translate between languages
@@ -76,16 +87,12 @@ Language vocabulary API (from `lokascript-i18n.min.js`):
76
87
  ## Browser Bundle Loading
77
88
 
78
89
  ```html
79
- <!-- Load LokaScript browser bundles -->
80
- <script src="https://cdn.jsdelivr.net/npm/@hyperfixi/core/dist/hyperfixi.js"></script>
90
+ <script src="https://cdn.jsdelivr.net/npm/@hyperfixi/engine/dist/hyperfixi-hs.js"></script>
81
91
  <script src="https://cdn.jsdelivr.net/npm/@lokascript/semantic/dist/browser.global.js"></script>
82
92
  <script src="https://cdn.jsdelivr.net/npm/@lokascript/i18n/dist/lokascript-i18n.min.js"></script>
83
93
 
84
- <!-- Now use with full TypeScript support -->
85
94
  <script>
86
- // TypeScript knows about these globals!
87
- window.lokascript.execute('toggle .active');
88
- window.LokaScriptSemantic.parse('トグル .active', 'ja');
95
+ window.hyperfixi.evaluate('add .ready to me', { me: document.body });
89
96
  window.LokaScriptSemantic.translate('toggle .active', 'en', 'ja');
90
97
  </script>
91
98
  ```
@@ -1,213 +1,124 @@
1
1
  /**
2
- * Type definitions for HyperFixi Core browser API
2
+ * Type definitions for the hyperscript host on `window.hyperfixi` and `window._hyperscript`.
3
+ *
4
+ * Both globals are one object: `@hyperfixi/engine`'s public API, which the engine's
5
+ * `hyperfixi-hs.js` installs, and which `@hyperfixi/core` ships as `hyperfixi.js` (the same
6
+ * file, since Phase C3 of the engine cutover). It is shaped like upstream `_hyperscript`'s
7
+ * public object, so upstream plugins can use it, plus one hook upstream lacks
8
+ * (`addSourceTransform`). `test/engine-api.check.ts` checks the engine's own `api` against
9
+ * this interface, so the two cannot drift apart.
10
+ *
11
+ * (Until then `hyperfixi.js` was core's own bundle, and `window.hyperfixi` had core's API:
12
+ * `compile`, `compileSync`, `execute`, `createContext`, `evalHyperScript`, … — none of which
13
+ * the engine has. Those types are gone; see `HyperfixiAPI` for what replaced each.)
3
14
  */
4
- /**
5
- * HyperFixi core API exposed on window.hyperfixi
6
- */
7
- export interface LokaScriptCoreAPI {
8
- /**
9
- * Synchronously compile hyperscript code to AST (API v2).
10
- * @since API v2
11
- */
12
- compileSync(code: string, options?: NewCompileOptions): CompileResult;
13
- /**
14
- * Asynchronously compile hyperscript code (handles all 13 languages) (API v2).
15
- * @since API v2
16
- */
17
- compile(code: string, options?: NewCompileOptions): Promise<CompileResult>;
18
- /**
19
- * Compile and execute hyperscript in one step (API v2).
20
- * @since API v2
21
- */
22
- eval(code: string, contextOrElement?: any): Promise<any>;
23
- /**
24
- * Validate hyperscript syntax and return detailed errors (API v2).
25
- * @since API v2
26
- */
27
- validate(code: string, options?: NewCompileOptions): Promise<ValidateResult>;
28
- /**
29
- * Create execution context with optional parent (unified signature, API v2).
30
- * @since API v2
31
- */
32
- createContext(element?: Element | null, parent?: any): any;
33
- /**
34
- * Evaluate hyperscript string directly
35
- */
36
- evalHyperScript(code: string, element?: Element): any;
37
- /**
38
- * Async evaluation of hyperscript
39
- */
40
- evalHyperScriptAsync(code: string, element?: Element): Promise<any>;
41
- /**
42
- * Smart evaluation with automatic context detection
43
- */
44
- evalHyperScriptSmart(code: string): Promise<any>;
45
- /**
46
- * Compile multilingual hyperscript code
47
- * @deprecated Use compile() with options.language instead
48
- */
49
- compileMultilingual(code: string, language: string, options?: CompileOptions): CompilationResult;
50
- /**
51
- * Execute hyperscript code
52
- */
53
- execute(code: string, element?: Element, options?: ExecuteOptions): Promise<any>;
54
- /**
55
- * Run hyperscript code (alias for execute)
56
- * @deprecated Use eval() instead
57
- */
58
- run(code: string, element?: Element, options?: ExecuteOptions): Promise<any>;
59
- /**
60
- * Create child execution context
61
- * @deprecated Use createContext(element, parent) instead
62
- */
63
- createChildContext(parent: any, element?: Element): any;
64
- /**
65
- * Validate hyperscript syntax (returns boolean)
66
- * @deprecated Use validate() instead (returns detailed result)
67
- */
68
- isValidHyperscript(code: string): boolean;
69
- /**
70
- * Create runtime instance
71
- */
72
- createRuntime(options?: RuntimeOptions): any;
73
- /**
74
- * Process DOM node
75
- */
76
- processNode(node: Node): void;
77
- /**
78
- * Process DOM node (alias)
79
- */
80
- process(node: Node): void;
81
- /**
82
- * Tokenize hyperscript code
83
- */
84
- tokenize(code: string): any[];
85
- /**
86
- * Low-level parser access
87
- */
88
- Parser: any;
89
- /**
90
- * Low-level runtime access
91
- */
92
- Runtime: any;
93
- /**
94
- * Attribute processor
95
- */
96
- attributeProcessor: any;
97
- /**
98
- * Debug utilities
99
- */
100
- debug: {
101
- enableDebugLogging(): void;
102
- disableDebugLogging(): void;
103
- };
104
- /**
105
- * Style batcher utility
106
- */
107
- styleBatcher: any;
108
- /**
109
- * Object pool utility
110
- */
111
- ObjectPool: any;
112
- /**
113
- * Semantic parsing utilities
114
- */
115
- semantic?: {
116
- parse(code: string, language: string): any;
117
- translate(code: string, fromLang: string, toLang: string): string | null;
118
- buildAST(node: any): any;
119
- };
120
- /**
121
- * Semantic debug utilities
122
- */
123
- semanticDebug?: any;
124
- /**
125
- * Version string
126
- */
127
- version: string;
128
- }
129
- export interface CompileOptions {
130
- language?: string;
131
- strict?: boolean;
132
- [key: string]: any;
15
+ /** The context `evaluate` runs its source in. Every field is optional. */
16
+ export interface HyperscriptContext {
17
+ /** What `me` / `my` / `I` refer to (default: `document.body`). */
18
+ me?: unknown;
19
+ you?: unknown;
20
+ /** `it` / `result`. */
21
+ result?: unknown;
22
+ event?: unknown;
23
+ target?: unknown;
24
+ detail?: unknown;
25
+ sender?: unknown;
26
+ body?: unknown;
27
+ /** Local variables, by name. */
28
+ locals?: Record<string, unknown>;
133
29
  }
134
- export interface CompilationResult {
135
- success: boolean;
136
- code?: any;
137
- error?: Error;
138
- [key: string]: any;
139
- }
140
- export interface ExecuteOptions {
141
- context?: any;
142
- element?: Element;
143
- [key: string]: any;
30
+ /** The token a parse error points at. */
31
+ export interface HyperscriptToken {
32
+ type: string;
33
+ value: string;
34
+ /** Offsets into the source. */
35
+ start: number;
36
+ end: number;
37
+ /** 1-based line, 0-based column. */
38
+ line: number;
39
+ column: number;
144
40
  }
145
- export interface ContextOptions {
146
- element?: Element;
147
- globals?: Record<string, any>;
148
- [key: string]: any;
41
+ /** A grammar error, as `parse` reports it and as the `hyperscript:parse-error` event carries it. */
42
+ export interface HyperscriptParseError {
43
+ message: string;
44
+ token: HyperscriptToken;
45
+ source: string;
46
+ /** The words the parser would have accepted, when it knows. */
47
+ expected?: string[];
48
+ /** What the author wrote, when a source transform rewrote the script before it was parsed. */
49
+ written?: string;
149
50
  }
150
- export interface RuntimeOptions {
151
- [key: string]: any;
51
+ /** `parse`'s result: the parsed node in upstream's shape, with its `errors` (empty when it parsed). */
52
+ export interface HyperscriptParseResult {
53
+ errors: HyperscriptParseError[];
152
54
  }
153
- export type EvalHyperScriptFunction = (code: string, element?: Element) => any;
154
- export type EvalHyperScriptAsyncFunction = (code: string, element?: Element) => Promise<any>;
155
- export type EvalHyperScriptSmartFunction = (code: string) => Promise<any>;
55
+ /** A root `processNode` initialises: hooks receive it before and after. */
56
+ export type HyperscriptProcessRoot = Element | Document | DocumentFragment;
156
57
  /**
157
- * Compilation result (API v2)
58
+ * A plugin's rewrite of a script, applied as the script is read; the element keeps the text its
59
+ * author wrote. Return nothing to leave the script as it is.
158
60
  */
159
- export interface CompileResult {
160
- /** Whether compilation succeeded */
161
- ok: boolean;
162
- /** Compiled AST (only present if ok=true) */
163
- ast?: any;
164
- /** Compilation errors (only present if ok=false) */
165
- errors?: CompileError[];
166
- /** Compilation metadata */
167
- meta: {
168
- /** Parser used: semantic or traditional */
169
- parser: 'semantic' | 'traditional';
170
- /** Confidence score (0-1) if semantic parser was used */
171
- confidence?: number;
172
- /** Language code */
173
- language: string;
174
- /** Compilation time in milliseconds */
175
- timeMs: number;
176
- /** Whether direct path was taken (no fallback) */
177
- directPath?: boolean;
61
+ export type HyperscriptSourceTransform = (source: string, element: Element) => string | null | undefined;
62
+ /** `config`: upstream's settings, and the table `as <Name>` conversions read. */
63
+ export interface HyperscriptConfig {
64
+ /** Attributes that hold a script (default `'_, script, data-script'`). */
65
+ attributes: string;
66
+ defaultTransition: string;
67
+ disableSelector: string;
68
+ /** The strategy `hide` / `show` / `toggle` use when none is named (`display` if unset). */
69
+ defaultHideShowStrategy?: string;
70
+ /** Extra strategies, by name. */
71
+ hideShowStrategies: Record<string, (op: 'hide' | 'show' | 'toggle', elt: HTMLElement, arg?: string) => void>;
72
+ /** `fetch` throws when the response status matches one of these. */
73
+ fetchThrowsOn: RegExp[];
74
+ /** `as <Name>` conversions, by name; `dynamicResolvers` handle names with arguments. */
75
+ conversions: Record<string, (value: unknown) => unknown> & {
76
+ dynamicResolvers: ((name: string, value: unknown) => unknown)[];
178
77
  };
179
78
  }
180
79
  /**
181
- * Compilation error (API v2)
182
- */
183
- export interface CompileError {
184
- /** Error message */
185
- message: string;
186
- /** Line number where error occurred */
187
- line: number;
188
- /** Column number where error occurred */
189
- column: number;
190
- /** Optional suggestion for fixing the error */
191
- suggestion?: string;
192
- }
193
- /**
194
- * Compilation options (API v2)
80
+ * `window.hyperfixi` / `window._hyperscript`. Callable: `hyperfixi(source, context?)` is
81
+ * `hyperfixi.evaluate(source, context?)`.
82
+ *
83
+ * Replacing core 3.x's API: `compileSync(code)` → `parse(code).errors`;
84
+ * `eval(code, element)` / `execute(code, element)` → `evaluate(code, { me: element })`;
85
+ * `processNode(node)` is unchanged; `compile(code, { language })` → load
86
+ * `@lokascript/hyperscript-adapter` beside a semantic bundle, which translates each script as
87
+ * the engine reads it.
195
88
  */
196
- export interface NewCompileOptions {
197
- /** Language code (default: 'en') */
198
- language?: string;
199
- /** Minimum confidence for semantic parsing (0-1, default: 0.5) */
200
- confidenceThreshold?: number;
201
- /** Force traditional parser, skip semantic analysis */
202
- traditional?: boolean;
203
- }
204
- /**
205
- * Validation result (API v2)
206
- */
207
- export interface ValidateResult {
208
- /** Whether code is valid */
209
- valid: boolean;
210
- /** Validation errors (only present if valid=false) */
211
- errors?: CompileError[];
89
+ export interface HyperfixiAPI {
90
+ (source: string, context?: HyperscriptContext): unknown;
91
+ /**
92
+ * Run source: commands, features (installed on `document.body`) or one expression.
93
+ * Synchronous unless the source itself waits on something; then it returns a promise.
94
+ * A parse error throws.
95
+ */
96
+ evaluate(source: string, context?: HyperscriptContext): unknown;
97
+ /** Parse without running. A grammar error is reported in `errors`; a tokenizer error throws. */
98
+ parse(source: string): HyperscriptParseResult;
99
+ /** Initialise every scripted element under a node; elements already initialised are skipped. */
100
+ process(node: unknown): void;
101
+ /** Upstream's older name for `process`. */
102
+ processNode(node: unknown): void;
103
+ /** Remove everything an element's script installed: listeners, observers, timers, state. */
104
+ cleanup(element: Element): void;
105
+ config: HyperscriptConfig;
106
+ /** `use(plugin)`: the plugin receives this object (upstream's plugin API). */
107
+ use(plugin: (hyperscript: unknown) => void): void;
108
+ addBeforeProcessHook(hook: (root: HyperscriptProcessRoot) => void): void;
109
+ addAfterProcessHook(hook: (root: HyperscriptProcessRoot) => void): void;
110
+ /** Not in upstream: rewrite a script as it is read, leaving the attribute as written. */
111
+ addSourceTransform(transform: HyperscriptSourceTransform): void;
112
+ /** The part of upstream's `internals` that pages and tests reach for. */
113
+ internals: {
114
+ runtime: {
115
+ cleanup(element: Element): void;
116
+ processNode(node: unknown): void;
117
+ };
118
+ };
119
+ /** The engine's package version (`'dev'` when built from source without one). */
120
+ version: string;
212
121
  }
122
+ /** @deprecated The 3.x name; `window.hyperfixi` is a {@link HyperfixiAPI} since 4.0. */
123
+ export type LokaScriptCoreAPI = HyperfixiAPI;
213
124
  //# sourceMappingURL=core-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-api.d.ts","sourceRoot":"","sources":["../src/core-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAGhC;;;OAGG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAAC;IAEtE;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAi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