@g9tm/lynxcontrols-foundation 1.4.7 → 1.5.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.
Files changed (52) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/culture/strings.d.ts +2 -0
  3. package/dist/culture/strings.d.ts.map +1 -1
  4. package/dist/culture/strings.js +8 -4
  5. package/dist/culture/strings.js.map +1 -1
  6. package/dist/enums/index.d.ts +5 -1
  7. package/dist/enums/index.d.ts.map +1 -1
  8. package/dist/enums/index.js +2 -1
  9. package/dist/enums/index.js.map +1 -1
  10. package/dist/icons/generated/glyph-svg.js.map +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/route/address.d.ts +68 -0
  15. package/dist/route/address.d.ts.map +1 -0
  16. package/dist/route/address.js +282 -0
  17. package/dist/route/address.js.map +1 -0
  18. package/dist/route/catalogue.d.ts +131 -0
  19. package/dist/route/catalogue.d.ts.map +1 -0
  20. package/dist/route/catalogue.js +236 -0
  21. package/dist/route/catalogue.js.map +1 -0
  22. package/dist/route/index.d.ts +7 -0
  23. package/dist/route/index.d.ts.map +1 -0
  24. package/dist/route/index.js +6 -0
  25. package/dist/route/journey.d.ts +147 -0
  26. package/dist/route/journey.d.ts.map +1 -0
  27. package/dist/route/journey.js +345 -0
  28. package/dist/route/journey.js.map +1 -0
  29. package/dist/route/resolve.d.ts +43 -0
  30. package/dist/route/resolve.d.ts.map +1 -0
  31. package/dist/route/resolve.js +116 -0
  32. package/dist/route/resolve.js.map +1 -0
  33. package/dist/route/sink.d.ts +62 -0
  34. package/dist/route/sink.d.ts.map +1 -0
  35. package/dist/route/sink.js +11 -0
  36. package/dist/route/sink.js.map +1 -0
  37. package/dist/route/view.d.ts +60 -0
  38. package/dist/route/view.d.ts.map +1 -0
  39. package/dist/route/view.js +104 -0
  40. package/dist/route/view.js.map +1 -0
  41. package/dist/services/contracts.d.ts +6 -0
  42. package/dist/services/contracts.d.ts.map +1 -1
  43. package/dist/services/contracts.js.map +1 -1
  44. package/dist/tokens/generated/metrics.d.ts +4 -0
  45. package/dist/tokens/generated/metrics.d.ts.map +1 -1
  46. package/dist/tokens/generated/metrics.js +8 -0
  47. package/dist/tokens/generated/metrics.js.map +1 -1
  48. package/dist/tokens/generated/palettes.js.map +1 -1
  49. package/docs/api.md +72 -1
  50. package/docs/migration/Core.Controls.Shared.md +5 -0
  51. package/docs/migration/Core.Localization.md +1 -0
  52. package/package.json +6 -1
package/docs/api.md CHANGED
@@ -250,7 +250,7 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
250
250
  | `G9ButtonVariant` | enum | Colour role of a button-like control (MAUI `G9ButtonVariant`). Default for buttons: `'primary'`. |
251
251
  | `G9CascadeDirection` | enum | Direction a cascade (drill-down) panel moves in (MAUI `G9CascadeDirection`); `'auto'` follows the direction. |
252
252
  | `G9CascadeTransition` | enum | How the next cascade level appears (MAUI `G9CascadeTransition`): over the current one, or pushing it out. |
253
- | `G9ChipGroupLayoutMode` | enum | Layout of a chip group (MAUI `G9ChipGroupLayoutMode`): wrapping rows or one horizontally scrolling line. |
253
+ | `G9ChipGroupLayoutMode` | enum | Layout of a chip group (MAUI `G9ChipGroupLayoutMode`): wrapping rows, one horizontally scrolling line, or (1.4.9) segmented — equal cells that share each row (`segmentColumns` per row), for short exclusive choices. |
254
254
  | `G9ChipGroupSelectionMode` | enum | Selection behaviour of a chip group (MAUI `G9ChipGroupSelectionMode`). |
255
255
  | `G9ControlSize` | enum | Size step of a control (MAUI `G9ControlSize`). Default for controls: `'medium'`. |
256
256
  | `G9DateTimeDisplayFormat` | enum | How a picked date/time is displayed (MAUI `G9DateTimeDisplayFormat`); `'custom'` uses the caller's pattern. |
@@ -362,6 +362,77 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
362
362
  | `G9SoftInputMode` | type | Android soft-input policy while a flow needs it (MAUI `G9KeyboardHelper.UseAndroidPanSoftInputMode`). |
363
363
  | `G9SpeechToTextResult` | type | How a dictation session ended. Expected outcomes are results, not errors (specs/03 §7). |
364
364
 
365
+ ## `@g9tm/lynxcontrols-foundation/route`
366
+
367
+ | Export | Kind | Summary |
368
+ | --- | --- | --- |
369
+ | `catalogueManifest` | function | The catalogue as data (JSON-safe), in one language. |
370
+ | `compareLivePlaces` | function | Bottom-to-top order of open places. |
371
+ | `confirmSeconds` | function | The countdown of one confirmation (whole seconds, ≥ 1). |
372
+ | `createCatalogue` | function | Builds a catalogue and validates it: unique kinds, names in the grammar, known parents, a `defaultParent` that is a parent and leads to the root through singletons, no cycles. The generic kinds are added. |
373
+ | `formatAddress` | function | The canonical text of an address: parameters sorted by name, hex escapes upper case, no trailing "/". Two addresses are the same address when their canonical texts are equal (ids are normalised by the catalogue, not here). |
374
+ | `g9PatternCodec` | function | A codec from a pattern (and an optional normaliser; default: the id as it is). |
375
+ | `generalOf` | function | The general form: kinds and variants only (no ids, parameters or target). |
376
+ | `journeyAuthority` | function | The source policy (plan §11.3). `navigate` covers go / show / say / wait; `fill` covers fill and select (a form value, never a save); `press` reads the anchor's risk. An app may only make it stricter. |
377
+ | `matchesAddress` | function | Whether an address matches a pattern of kinds: `/tasks/task.sampling/**​/package`. A token is `kind`, `kind.variant`, either with `:*` (an id is required), `*` (exactly one segment) or `**` (any number, also none). |
378
+ | `parseAddress` | function | Parses an address strictly. |
379
+ | `parseSnapshot` | function | The snapshot in untrusted data (stored preferences, a QA command), or null when it is not a valid one. |
380
+ | `planNavigation` | function | The plan from what is open to a target path (pure). The kept prefix must END on an open place (a made-up ancestor is kept only when an open place below the divergence holds it): leaving the sampling map for its own task overview closes the map mode and opens the overview, it does not keep a task that was never open. Closed: every open place of the current path past the kept prefix, and every overlay (sheet, popup) above it; never a root place (opening a sibling root replaces it). |
381
+ | `resolvePath` | function | The logical path of what is open. |
382
+ | `sameSegment` | function | Same kind, variant and id (parameters are view state, not identity). |
383
+ | `sameSegmentState` | function | Same kind, variant, id AND parameters. |
384
+ | `seg` | function | Builds a segment, leaving out what is null or empty. |
385
+ | `snapshotRefusal` | function | Why a snapshot may not be applied now, or null when it may. |
386
+ | `textIn` | function | A text in the person's language. |
387
+ | `toScrollMark` | function | A scroll mark from untrusted data, clamped; null when it is not one. |
388
+ | `toSegment` | function | A `G9SegmentInput` as a segment. |
389
+ | `tryParseAddress` | function | `parseAddress` without throwing. |
390
+ | `validateJourney` | function | Validates untrusted JSON as a journey: unknown keys, bad texts, addresses or ids are refused. |
391
+ | `g9AddressLimits` | constant | The bounds of an address (each one a refusal past it). |
392
+ | `g9ConfirmTimingDefaults` | constant | The default countdowns: 5 s for a save, 10 s for a delete, +3 s from a link, ×2 when undescribed. |
393
+ | `g9GenericKinds` | constant | The kinds the library adds to every catalogue: an undeclared sheet, map mode or page stays visible in the address. |
394
+ | `g9GuidCodec` | constant | A GUID, canonical in lower case. |
395
+ | `g9JourneyLimits` | constant | The bounds of a journey. |
396
+ | `g9PlaceLayers` | constant | Every layer, bottom to top. |
397
+ | `G9AddressError` | class | A refused address. `code` is stable; `message` is for developers (not shown to users). |
398
+ | `G9CatalogueError` | class | A catalogue that cannot work (a developer error: raised at start-up, never at run time). |
399
+ | `G9Address` | interface | A parsed address: the path of places (root first) and an optional focused anchor. |
400
+ | `G9BilingualText` | interface | Text in both languages (the catalogue's descriptions, journeys). |
401
+ | `G9Catalogue` | interface | The places of an app, validated: definitions, parents, made-up ancestors, structural checks of an address. |
402
+ | `G9CatalogueManifestEntry` | interface | One kind as a manifest lists it (an assistant's or a QA tool's view of the catalogue). |
403
+ | `G9ChangeLine` | interface | One change a write would make, as a person reads it (the confirmation before a guided save lists these). |
404
+ | `G9ConfirmTiming` | interface | Countdown lengths of the confirmation (seconds). |
405
+ | `G9Entry` | interface | How a PERSON reaches a place from its parent: the control to tap there. |
406
+ | `G9IdCodec` | interface | How the ids of one kind look. |
407
+ | `G9Journey` | interface | A journey: validated JSON steps a guide runs on screen. |
408
+ | `G9LivePlace` | interface | One open place as the resolver sees it. |
409
+ | `G9NavigationPlan` | interface | What going to a target path changes. |
410
+ | `G9ParamDef` | interface | One view parameter of a place (`;q=…`, `;sort=due.desc`). |
411
+ | `G9PlaceDeclaration` | interface | A place that is open right now, as it declares itself. |
412
+ | `G9PlaceDef` | interface | One kind of place. `Ctx` is what the app hands every callback (its session, services…). |
413
+ | `G9PlaceHandle` | interface | The handle of one declaration. |
414
+ | `G9ResolvedPath` | interface | The logical path and how each step is held. |
415
+ | `G9RouteSink` | interface | The router as places see it (`G9Capabilities.route`). |
416
+ | `G9Segment` | interface | One place in an address. Values are DECODED text; `formatAddress` encodes them. |
417
+ | `G9SegmentView` | interface | The view state of one segment of a snapshot. |
418
+ | `G9Snapshot` | interface | Everything open, as data (JSON). |
419
+ | `G9WaitFor` | interface | What a wait step waits for (any one of them). |
420
+ | `G9AddressCheck` | type | A structural check of one address against the catalogue. |
421
+ | `G9AddressErrorCode` | type | Why an address was refused. |
422
+ | `G9AnchorRisk` | type | What pressing a control does to data. |
423
+ | `G9GoFailure` | type | Why going to an address failed (or why a check refused it). |
424
+ | `G9GuardResult` | type | What a place's guard answers. `message` is shown to the person (their language). |
425
+ | `G9GuideEffectSpec` | type | One visual effect of a journey step (JSON-safe; the guide draws it). |
426
+ | `G9JourneySource` | type | Who authored a journey. The runner uses the CALLER's source, never the journey's own claim. |
427
+ | `G9JourneyStep` | type | One step of a journey. |
428
+ | `G9PlaceLayer` | type | Where a place is drawn: decides which open place is on top. Bottom to top. |
429
+ | `G9ScrollMark` | type | What is first in view in one scroller. |
430
+ | `G9SegmentInput` | type | A segment, or just its kind. |
431
+ | `G9StepAuthority` | type | Who carries a step out: the engine, the engine after the person's countdown confirmation, or the person. |
432
+ | `G9Text` | type | Text in one language or both. |
433
+ | `G9Until` | type | When a show / say step moves on. |
434
+ | `G9ViewApplied` | type | How exactly a view was put back. |
435
+
365
436
  ## `@g9tm/lynxcontrols-foundation`
366
437
 
367
438
  | Export | Kind | Summary |
@@ -151,6 +151,9 @@ Values are numbers (logical pixels, milliseconds for `…Ms`, plain numbers for
151
151
  | `G9Metrics.ChipFontSize` | `G9Metrics.ChipFontSize` = 13; CSS `--g9-metric-chip-font-size` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
152
152
  | `G9Metrics.ChipIconSize` | `G9Metrics.ChipIconSize` = 16; CSS `--g9-metric-chip-icon-size` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
153
153
  | `G9Metrics.ChipSpacing` | `G9Metrics.ChipSpacing` = 6; CSS `--g9-metric-chip-spacing` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
154
+ | `G9Metrics.SegmentHeight` | `G9Metrics.SegmentHeight` = 44 (1.4.9); CSS `--g9-metric-segment-height` (px) | preserved | tokens.test.ts "reproduces all 175 values in declaration order"; toggle.test.tsx "segmented (MAUI 1.4.9)…" |
155
+ | `G9Metrics.SegmentFontSize` | `G9Metrics.SegmentFontSize` = 14 (1.4.9); CSS `--g9-metric-segment-font-size` (px) | preserved | tokens.test.ts "reproduces all 175 values in declaration order"; toggle.test.tsx "segmented (MAUI 1.4.9)…" |
156
+ | `G9Metrics.SegmentCornerRadius` | `G9Metrics.SegmentCornerRadius` = 10 (1.4.9); CSS `--g9-metric-segment-corner-radius` (px) | preserved | tokens.test.ts "reproduces all 175 values in declaration order"; toggle.test.tsx "segmented (MAUI 1.4.9)…" |
154
157
  | `G9Metrics.ChipSelectionAnimationMs` | `G9Metrics.ChipSelectionAnimationMs` = 140; CSS `--g9-metric-chip-selection-animation-ms` (ms) | preserved | tokens.test.ts "reproduces all 171 values…" |
155
158
  | `G9Metrics.ChipCheckmarkAnimationMs` | `G9Metrics.ChipCheckmarkAnimationMs` = 120; CSS `--g9-metric-chip-checkmark-animation-ms` (ms) | preserved | tokens.test.ts "reproduces all 171 values…" |
156
159
  | `G9Metrics.TabBarHeight` | `G9Metrics.TabBarHeight` = 52; CSS `--g9-metric-tab-bar-height` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
@@ -175,6 +178,7 @@ Values are numbers (logical pixels, milliseconds for `…Ms`, plain numbers for
175
178
  | `G9Metrics.DrumSelectedFontSize` | `G9Metrics.DrumSelectedFontSize` = 17; CSS `--g9-metric-drum-selected-font-size` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
176
179
  | `G9Metrics.DrumUnselectedFontSize` | `G9Metrics.DrumUnselectedFontSize` = 16; CSS `--g9-metric-drum-unselected-font-size` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
177
180
  | `G9Metrics.SelectionRowHeight` | `G9Metrics.SelectionRowHeight` = 52; CSS `--g9-metric-selection-row-height` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
181
+ | `G9Metrics.SelectionAvatarSize` | `G9Metrics.SelectionAvatarSize` = 28 (1.4.10); CSS `--g9-metric-selection-avatar-size` (px) | preserved | tokens.test.ts "reproduces all 175 values in declaration order"; selection.test.tsx "an avatar is a round 28 px picture…" |
178
182
  | `G9Metrics.SelectionRowHorizontalPadding` | `G9Metrics.SelectionRowHorizontalPadding` = 16; CSS `--g9-metric-selection-row-horizontal-padding` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
179
183
  | `G9Metrics.SelectionMaxHeight` | `G9Metrics.SelectionMaxHeight` = 520; CSS `--g9-metric-selection-max-height` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
180
184
  | `G9Metrics.SelectionMinHeight` | `G9Metrics.SelectionMinHeight` = 220; CSS `--g9-metric-selection-min-height` (px) | preserved | tokens.test.ts "reproduces all 171 values…" |
@@ -333,6 +337,7 @@ Durations travel as milliseconds (specs/03 §2): `daysToMs`, `msToWholeDays` (tr
333
337
  | MAUI | Lynx | Disposition | Tests |
334
338
  | --- | --- | --- | --- |
335
339
  | `G9ChipGroupLayoutMode.Wrap` | `G9ChipGroupLayoutMode.Wrap` (`'wrap'`) | preserved | enums.test.ts "G9ChipGroupLayoutMode has every member in MAUI order with camelCase values" |
340
+ | `G9ChipGroupLayoutMode.Segmented` | `G9ChipGroupLayoutMode.Segmented` (`'segmented'`, 1.4.9) | preserved | enums.test.ts "G9ChipGroupLayoutMode has every member in MAUI order with camelCase values"; toggle.test.tsx "segmented (MAUI 1.4.9)…" |
336
341
  | `G9ChipGroupLayoutMode.SingleLineScroll` | `G9ChipGroupLayoutMode.SingleLineScroll` (`'singleLineScroll'`) | preserved | enums.test.ts "G9ChipGroupLayoutMode has every member in MAUI order with camelCase values" |
337
342
 
338
343
  ## `G9ChipGroupSelectionMode`
@@ -116,3 +116,4 @@ lists them in declaration order.
116
116
  | `G9StringKey.Checked` | `G9StringKey.Checked` (`'checked'`) | preserved | strings.test.ts "has every MAUI member, in order, with camelCase values"; "reproduces G9Strings.Get for en-US, fa-IR and ar with no host override" |
117
117
  | `G9StringKey.NotChecked` | `G9StringKey.NotChecked` (`'notChecked'`) | preserved | strings.test.ts "has every MAUI member, in order, with camelCase values"; "reproduces G9Strings.Get for en-US, fa-IR and ar with no host override" |
118
118
  | `G9StringKey.PartiallyChecked` | `G9StringKey.PartiallyChecked` (`'partiallyChecked'`) | preserved | strings.test.ts "has every MAUI member, in order, with camelCase values"; "reproduces G9Strings.Get for en-US, fa-IR and ar with no host override" |
119
+ | `G9StringKey.MoreResultsFormat` | `G9StringKey.MoreResultsFormat` (`'moreResultsFormat'`) — the selection sheet's «N more» footer (1.4.8); Persian and Arabic in the bundled tables | preserved | strings.test.ts "has every MAUI member, in order, with camelCase values"; "reproduces G9Strings.Get for en-US, fa-IR and ar with no host override"; selection.test.tsx "a long list builds only its window and counts the rest" |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g9tm/lynxcontrols-foundation",
3
- "version": "1.4.7",
3
+ "version": "1.5.0",
4
4
  "description": "Pure TypeScript core: design tokens, theme model, culture (strings, digits, calendars, relative time, durations), icon model, safe execution, diagnostics, preference and capability contracts. No React, no UI.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,6 +45,11 @@
45
45
  "source": "./src/services/index.ts",
46
46
  "types": "./dist/services/index.d.ts",
47
47
  "default": "./dist/services/index.js"
48
+ },
49
+ "./route": {
50
+ "source": "./src/route/index.ts",
51
+ "types": "./dist/route/index.d.ts",
52
+ "default": "./dist/route/index.js"
48
53
  }
49
54
  },
50
55
  "files": [