@hyperfixi/types-browser 4.6.0 → 4.7.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 +87 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,91 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.7.0] - 2026-10-16
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`@lokascript/framework`: the matcher's skeleton, `MatchSkeleton`** (domains rethink Phase 4.3), with
|
|
15
|
+
its seam (`ValueReader`, `MatchView`, `RoleSlot`) and the `ConfidenceModel` / `ConfidenceContext` /
|
|
16
|
+
`ConfidenceBreakdown` interfaces, all exported. It is the skeleton semantic's hyperscript matcher runs:
|
|
17
|
+
`@lokascript/semantic`'s `PatternMatcher` now extends it and passes `HyperscriptValueReader`, and its
|
|
18
|
+
confidence types are framework's narrowed to hyperscript's names. Framework's pattern types take the
|
|
19
|
+
fields semantic's carried alone (`LanguagePattern.parseOnly`, `LiteralPatternToken.renderSuppress`,
|
|
20
|
+
`RolePatternToken.valueShape`, `GroupPatternToken.renderRequired`, `ExtractionRule.valueIsExpression`,
|
|
21
|
+
`PatternMatchResult.roleStarts` / `eventSource`). `createMultilingualDSL` still uses its own matcher.
|
|
22
|
+
Every hyperscript parse is unchanged (27,194 checked); semantic's browser bundles grew ~150 bytes
|
|
23
|
+
gzipped.
|
|
24
|
+
- **`@lokascript/framework`: `createSchemaPatternGenerator`** (domains rethink Phase 4.4), the pattern
|
|
25
|
+
generator semantic's hyperscript parser runs, moved from `@lokascript/semantic`: the main pattern per
|
|
26
|
+
command and language and its variants (simple, omit-role, widened-type, required-role, SOV verb-first,
|
|
27
|
+
value-prefix-literal), with the grammar's hook `positionOrder` (`'ascending'`: hyperscript's 1-based
|
|
28
|
+
positions; `'descending'`: a domain's, as framework's `generatePattern` reads them). Also exported:
|
|
29
|
+
`withoutVariantOnlyRoles`, `resolveMarkerForRole`, `schemaMarkerAlternatives`,
|
|
30
|
+
`legacyMarkerAlternatives`. semantic's `generatePattern` / `generatePatternVariants` / … keep their
|
|
31
|
+
names and signatures over it; its fused event-handler patterns stay in semantic. Every generated
|
|
32
|
+
pattern in all 24 languages is byte-identical (5,899), and every parse unchanged (27,194).
|
|
33
|
+
- **`@lokascript/framework`: rendering through patterns, and the translation-loss checks** (domains
|
|
34
|
+
rethink Phase 4.5), moved from `@lokascript/semantic`. `selectRenderPattern` scores a language's
|
|
35
|
+
patterns for a node (role coverage, values a pattern pins) and `renderPattern` walks the chosen one;
|
|
36
|
+
a grammar's preferences and its value writing are `PatternRenderHooks`. `findTranslationLoss` runs
|
|
37
|
+
the fail-loud checks in order (unread input, forms nothing writes, a read-back that does not read or
|
|
38
|
+
differs, verbatim values) with a grammar's `TranslationLossRules`; `LossyTranslationError`,
|
|
39
|
+
`TranslationLoss` and `unconsumedSpans` moved with it (semantic re-exports them, so `instanceof`
|
|
40
|
+
holds). semantic's renderer and `translate` run them with hyperscript's hooks and rules; its
|
|
41
|
+
collision rule (`verified-render`) stays in semantic. Every translation of every command-shape case
|
|
42
|
+
in all 24 languages is unchanged, rendered (27,240) and with refusals on (704 refused, the same
|
|
43
|
+
kinds and losses).
|
|
44
|
+
- **`@lokascript/framework/testing/gate`: the round-trip gate kit and the grammar linter** (domains
|
|
45
|
+
rethink Phase 4.6), moved from lokascript-domains: `runRoundTrip` renders every command of a
|
|
46
|
+
grammar in each of its languages and reads it back (`pass` / `refused` / `silent`, plus each render
|
|
47
|
+
with an unknown word after it, which must be refused); `compare` / `listingOf` / `countsOf` keep a
|
|
48
|
+
shrink-only baseline and `snapshotOf` / `snapshotChanges` a parse snapshot; `lintDomain` runs the
|
|
49
|
+
domain-toolkit rules R1–R10, its schema-structure rule on the validator the input passes
|
|
50
|
+
(`validateSchema`; framework cannot import semantic). No test runner needed. On the 8 domains, with
|
|
51
|
+
their own fixtures, it reads 3,488 of 3,488 cases as the domains' gate does, with no drift from
|
|
52
|
+
their baseline.
|
|
53
|
+
- **`@lokascript/framework`: the stock value reader and confidence model for domain grammars** (domains
|
|
54
|
+
rethink Phase 4.7a). `createStockReader()` (`StockValueReader`) is a `ValueReader` for the matcher's
|
|
55
|
+
skeleton: a greedy slot reads up to the next marker its pattern owes (`readGreedy`,
|
|
56
|
+
`greedyStopMarkers`), any other slot one value (`readRoleValue`: a selector, a quoted string, a number,
|
|
57
|
+
a boolean, a duration, a URL, an identifier, or a dotted or called form, checked against the slot's
|
|
58
|
+
types), a required slot never takes the marker its pattern wants next, and an optional one may be
|
|
59
|
+
skipped for it. `stockConfidenceModel` scores as the old matcher did. Both are the old matcher's code,
|
|
60
|
+
moved: `createMultilingualDSL`'s matcher calls them, and the domain gate on this build moves no case
|
|
61
|
+
and no parse. `createSchemaPatternGenerator` also takes a domain schema's `greedy`, its
|
|
62
|
+
post-verb `sovSlot` and its `markerPosition` (hyperscript's patterns: unchanged, 5,899).
|
|
63
|
+
- **`@lokascript/framework`: `engine: 'core'`, a domain DSL on the core** (domains rethink Phase 4.7b):
|
|
64
|
+
a `DSLConfig` option. `createMultilingualDSL({ ...config, engine: 'core' })` returns the same
|
|
65
|
+
`MultilingualDSL`, read by the core semantic's hyperscript parser runs: patterns from
|
|
66
|
+
`createSchemaPatternGenerator` (positions descending), matched by `MatchSkeleton` with the stock
|
|
67
|
+
reader and confidence model, and rendered through those patterns where the domain's own renderer
|
|
68
|
+
declines. Parsing's whole-input rule, the refusals, translation's read-back, compile, explicit syntax
|
|
69
|
+
and extensions are shared with the default, `engine: 'classic'`, which is unchanged; any other engine
|
|
70
|
+
name throws. The stock reader also gives a required slot back the value an optional, marker-less slot
|
|
71
|
+
just before it read (the old matcher's backtrack). Measured on the 8 domains, each on the core
|
|
72
|
+
(the domain gate on a packed build): 0 cases worse, 30 better (behaviorspec 306 → 336
|
|
73
|
+
round trips), no case silent that was not before.
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
|
|
77
|
+
- **`@lokascript/intent`: one schema type for every grammar** (domains rethink Phase 4.1). `RoleSpec` and
|
|
78
|
+
`CommandSchema` now hold the fields hyperscript's schemas use as well as the domains' (`valueShape`,
|
|
79
|
+
`variantOnly`, `markerOptional`, `markerLegacy`, `valuePrefixLiteral`; `bareKeyword`, `structuralOnly`
|
|
80
|
+
and the `omitRoleVariants` / `widenTypeVariants` / `rolePrefixLiteralVariants` / `requiredRoleVariants`
|
|
81
|
+
lists), each documented with the code that reads it, and take type parameters for a grammar's action,
|
|
82
|
+
role, value and category names. The parameters default to today's types, so a domain schema reads as
|
|
83
|
+
before; framework's `docs/API_SURFACE.md` prints them spelled out. `@lokascript/semantic`'s `RoleSpec`
|
|
84
|
+
is this type with hyperscript's names, and its `CommandSchema` extends it with the fields only its AST
|
|
85
|
+
builder and error docs read (`ast`, `errorCodes`, `preconditions`, `recoveryHints`). One field keeps two
|
|
86
|
+
meanings for now: framework's generator sorts `svoPosition` / `sovPosition` descending (higher =
|
|
87
|
+
earlier), semantic's ascending; the field doc says so.
|
|
88
|
+
- **`@lokascript/semantic`: the pattern matcher reads every value through a seam** (domains rethink
|
|
89
|
+
Phase 4.2). The matcher is now a grammar-neutral skeleton (`parser/match-skeleton.ts`: literals,
|
|
90
|
+
groups and their rollback, the speculative skip of an optional slot, spans, ranking, confidence) and
|
|
91
|
+
hyperscript's `HyperscriptValueReader`, which reads each role slot and answers the skeleton's grammar
|
|
92
|
+
hooks (`parser/value-reader.ts`). `PatternMatcher` keeps its constructor, methods and import path. Every
|
|
93
|
+
parse is unchanged (27,194 checked).
|
|
94
|
+
|
|
10
95
|
## [4.6.0] - 2026-10-15
|
|
11
96
|
|
|
12
97
|
### Added
|
|
@@ -1736,7 +1821,8 @@ _Synchronized version release. See git history for details._
|
|
|
1736
1821
|
- npm access token stored in GitHub Secrets
|
|
1737
1822
|
- 2FA recommended for npm organization
|
|
1738
1823
|
|
|
1739
|
-
[Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v4.
|
|
1824
|
+
[Unreleased]: https://github.com/codetalcott/hyperfixi/compare/v4.7.0...HEAD
|
|
1825
|
+
[4.7.0]: https://github.com/codetalcott/hyperfixi/compare/v4.6.0...v4.7.0
|
|
1740
1826
|
[4.6.0]: https://github.com/codetalcott/hyperfixi/compare/v4.5.0...v4.6.0
|
|
1741
1827
|
[4.5.0]: https://github.com/codetalcott/hyperfixi/compare/v4.4.0...v4.5.0
|
|
1742
1828
|
[4.4.0]: https://github.com/codetalcott/hyperfixi/compare/v4.3.0...v4.4.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperfixi/types-browser",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
4
4
|
"description": "TypeScript definitions for the hyperfixi browser globals: window.hyperfixi / window._hyperscript (the engine), LokaScriptSemantic, LokaScriptI18n",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"author": "LokaScript Contributors",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@hyperfixi/engine": "^4.
|
|
33
|
+
"@hyperfixi/engine": "^4.7.0",
|
|
34
34
|
"typescript": "^5.8.3"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|