@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
@@ -1 +1 @@
1
- {"version":3,"file":"icons/generated/glyph-svg.js","sources":["../../../src/icons/generated/glyph-svg.ts"],"sourcesContent":["// GENERATED by scripts/gen-glyphs.mjs from plan/golden/glyphs.json — do not edit; run `npm run gen:glyphs`.\n// Golden source: G9GlyphDrawable (recorded) (https://github.com/ImanKari/G9MAUIControls/blob/1e5db3fb19209406865434b48a4890651dbbd66a/G9MAUIControls/Icons/G9GlyphDrawable.cs).\n\n/** Stroke width of the built-in glyphs in 24 × 24 design-box units at weight 1 (MAUI `G9GlyphDrawable.StrokeUnits`). */\nexport const g9GlyphStrokeUnits = 2;\n\n/**\n * Every built-in glyph as the SVG document the original MAUI drawing code produced (24 × 24 box, stroke\n * `g9GlyphStrokeUnits`, round caps and joins, colour `currentColor`), keyed by the `G9Glyph` value, in MAUI declaration\n * order. Render through `svgForGlyph`, which substitutes the colour and the weight.\n */\nexport const g9GlyphSvg = {\n chevronDown:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 5.5 L16 12 L9.5 18.5\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(90) translate(-12 -12)\"/></svg>',\n chevronUp:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 5.5 L16 12 L9.5 18.5\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(270) translate(-12 -12)\"/></svg>',\n chevronLeft:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 5.5 L16 12 L9.5 18.5\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(180) translate(-12 -12)\"/></svg>',\n chevronRight:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 5.5 L16 12 L9.5 18.5\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(0) translate(-12 -12)\"/></svg>',\n arrowBack:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"5\" y1=\"12\" x2=\"18.5\" y2=\"12\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(180) translate(-12 -12)\"/><path d=\"M12.5 6 L18.5 12 L12.5 18\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(180) translate(-12 -12)\"/></svg>',\n arrowForward:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"5\" y1=\"12\" x2=\"18.5\" y2=\"12\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(0) translate(-12 -12)\"/><path d=\"M12.5 6 L18.5 12 L12.5 18\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(0) translate(-12 -12)\"/></svg>',\n close:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n search:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10.5\" cy=\"10.5\" r=\"5.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"14.6\" y1=\"14.6\" x2=\"19\" y2=\"19\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n language:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"8.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"3.5\" y1=\"12\" x2=\"20.5\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/><path d=\"M12 3.5 C16.2 7.4 16.2 16.6 12 20.5 C7.8 16.6 7.8 7.4 12 3.5\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n cloudOff:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7.5 17.5 C4.6 17.5 3 15.6 3 13.4 C3 11.3 4.5 9.7 6.5 9.4 C7.2 6.7 9.6 5 12.2 5 C15.2 5 17.7 7.2 18.1 10.1 C20.1 10.5 21 12.1 21 13.7 C21 15.8 19.4 17.5 17.2 17.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4\" y1=\"4\" x2=\"20\" y2=\"20\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n scanCode:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"4.5\" y1=\"8.1\" x2=\"4.5\" y2=\"4.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.5\" y1=\"4.5\" x2=\"8.1\" y2=\"4.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"15.9\" y1=\"4.5\" x2=\"19.5\" y2=\"4.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"19.5\" y1=\"4.5\" x2=\"19.5\" y2=\"8.1\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.5\" y1=\"15.9\" x2=\"4.5\" y2=\"19.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.5\" y1=\"19.5\" x2=\"8.1\" y2=\"19.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"15.9\" y1=\"19.5\" x2=\"19.5\" y2=\"19.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"19.5\" y1=\"19.5\" x2=\"19.5\" y2=\"15.9\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"5.9\" y1=\"12\" x2=\"18.1\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n eye: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M2.6 12 Q12 3.6 21.4 12 Q12 20.4 2.6 12 Z\" transform=\"translate(0 0) scale(1 1)\"/><circle cx=\"12\" cy=\"12\" r=\"3.1\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n eyeOff:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M2.6 12 Q12 3.6 21.4 12 Q12 20.4 2.6 12 Z\" transform=\"translate(0 0) scale(1 1)\"/><circle cx=\"12\" cy=\"12\" r=\"3.1\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.4\" y1=\"20.2\" x2=\"19.6\" y2=\"3.8\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n check:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12.8 L9.6 17.4 L19 7\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n checkCircle:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"7.8\" y1=\"12.3\" x2=\"10.6\" y2=\"15.1\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"10.6\" y1=\"15.1\" x2=\"16.2\" y2=\"9.3\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n warning:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3.6 L21.6 20.4 L2.4 20.4 Z\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"9.4\" x2=\"12\" y2=\"14.6\" transform=\"translate(0 0) scale(1 1)\"/><circle cx=\"12\" cy=\"17.6\" r=\"1.24\" fill=\"currentColor\" stroke=\"none\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n errorCircle:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"8.8\" y1=\"8.8\" x2=\"15.2\" y2=\"15.2\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"15.2\" y1=\"8.8\" x2=\"8.8\" y2=\"15.2\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n info: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"11\" x2=\"12\" y2=\"16.4\" transform=\"translate(0 0) scale(1 1)\"/><circle cx=\"12\" cy=\"7.8\" r=\"1.24\" fill=\"currentColor\" stroke=\"none\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n calendar:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3.4\" y=\"5.4\" width=\"17.2\" height=\"15.2\" rx=\"2.4\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"3.4\" y1=\"10\" x2=\"20.6\" y2=\"10\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"8.2\" y1=\"3\" x2=\"8.2\" y2=\"6.4\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"15.8\" y1=\"3\" x2=\"15.8\" y2=\"6.4\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n clock:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"8.8\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"7.2\" x2=\"12\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"12\" x2=\"15.6\" y2=\"14.2\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n mic: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9.2\" y=\"2.6\" width=\"5.6\" height=\"11.4\" rx=\"2.8\" transform=\"translate(0 0) scale(1 1)\"/><path d=\"M5.4 11 Q5.4 18.2 12 18.2 Q18.6 18.2 18.6 11\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"18.2\" x2=\"12\" y2=\"21.4\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n micOff:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9.2\" y=\"2.6\" width=\"5.6\" height=\"11.4\" rx=\"2.8\" transform=\"translate(0 0) scale(1 1)\"/><path d=\"M5.4 11 Q5.4 18.2 12 18.2 Q18.6 18.2 18.6 11\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"18.2\" x2=\"12\" y2=\"21.4\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.4\" y1=\"20.2\" x2=\"19.6\" y2=\"3.8\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n plus: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n minus:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n menu: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"4\" y1=\"7\" x2=\"20\" y2=\"7\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4\" y1=\"17\" x2=\"20\" y2=\"17\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n refresh:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16.818 5.1191 A8.4 8.4 0 1 1 6.6006 5.5652\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"3.7\" y1=\"4.8\" x2=\"8.3\" y2=\"4.2\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"8.3\" y1=\"4.2\" x2=\"6.9\" y2=\"8.5\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n delete:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"4\" y1=\"7\" x2=\"20\" y2=\"7\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"9.6\" y1=\"7\" x2=\"10.2\" y2=\"4.2\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"10.2\" y1=\"4.2\" x2=\"13.8\" y2=\"4.2\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"13.8\" y1=\"4.2\" x2=\"14.4\" y2=\"7\" transform=\"translate(0 0) scale(1 1)\"/><path d=\"M6 7 L7.2 20.4 L16.8 20.4 L18 7\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"10.2\" y1=\"10.6\" x2=\"10.6\" y2=\"17\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"13.8\" y1=\"10.6\" x2=\"13.4\" y2=\"17\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n} as const;\n"],"names":["g9GlyphStrokeUnits","g9GlyphSvg"],"mappings":"AAIO,MAAMA,qBAAqB;AAO3B,MAAMC,aAAa;IACxB,aACE;IACF,WACE;IACF,aACE;IACF,cACE;IACF,WACE;IACF,cACE;IACF,OACE;IACF,QACE;IACF,UACE;IACF,UACE;IACF,UACE;IACF,KAAK;IACL,QACE;IACF,OACE;IACF,aACE;IACF,SACE;IACF,aACE;IACF,MAAM;IACN,UACE;IACF,OACE;IACF,KAAK;IACL,QACE;IACF,MAAM;IACN,OACE;IACF,MAAM;IACN,SACE;IACF,QACE;AACJ"}
1
+ {"version":3,"file":"icons/generated/glyph-svg.js","sources":["../../../src/icons/generated/glyph-svg.ts"],"sourcesContent":["// GENERATED by scripts/gen-glyphs.mjs from plan/golden/glyphs.json — do not edit; run `npm run gen:glyphs`.\n// Golden source: G9GlyphDrawable (recorded) (https://github.com/ImanKari/G9MAUIControls/blob/f0603d40e5d50609a15b88104faff6b2066f30b6/G9MAUIControls/Icons/G9GlyphDrawable.cs).\n\n/** Stroke width of the built-in glyphs in 24 × 24 design-box units at weight 1 (MAUI `G9GlyphDrawable.StrokeUnits`). */\nexport const g9GlyphStrokeUnits = 2;\n\n/**\n * Every built-in glyph as the SVG document the original MAUI drawing code produced (24 × 24 box, stroke\n * `g9GlyphStrokeUnits`, round caps and joins, colour `currentColor`), keyed by the `G9Glyph` value, in MAUI declaration\n * order. Render through `svgForGlyph`, which substitutes the colour and the weight.\n */\nexport const g9GlyphSvg = {\n chevronDown:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 5.5 L16 12 L9.5 18.5\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(90) translate(-12 -12)\"/></svg>',\n chevronUp:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 5.5 L16 12 L9.5 18.5\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(270) translate(-12 -12)\"/></svg>',\n chevronLeft:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 5.5 L16 12 L9.5 18.5\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(180) translate(-12 -12)\"/></svg>',\n chevronRight:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9.5 5.5 L16 12 L9.5 18.5\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(0) translate(-12 -12)\"/></svg>',\n arrowBack:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"5\" y1=\"12\" x2=\"18.5\" y2=\"12\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(180) translate(-12 -12)\"/><path d=\"M12.5 6 L18.5 12 L12.5 18\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(180) translate(-12 -12)\"/></svg>',\n arrowForward:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"5\" y1=\"12\" x2=\"18.5\" y2=\"12\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(0) translate(-12 -12)\"/><path d=\"M12.5 6 L18.5 12 L12.5 18\" transform=\"translate(0 0) scale(1 1) translate(12 12) rotate(0) translate(-12 -12)\"/></svg>',\n close:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n search:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10.5\" cy=\"10.5\" r=\"5.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"14.6\" y1=\"14.6\" x2=\"19\" y2=\"19\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n language:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"8.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"3.5\" y1=\"12\" x2=\"20.5\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/><path d=\"M12 3.5 C16.2 7.4 16.2 16.6 12 20.5 C7.8 16.6 7.8 7.4 12 3.5\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n cloudOff:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7.5 17.5 C4.6 17.5 3 15.6 3 13.4 C3 11.3 4.5 9.7 6.5 9.4 C7.2 6.7 9.6 5 12.2 5 C15.2 5 17.7 7.2 18.1 10.1 C20.1 10.5 21 12.1 21 13.7 C21 15.8 19.4 17.5 17.2 17.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4\" y1=\"4\" x2=\"20\" y2=\"20\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n scanCode:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"4.5\" y1=\"8.1\" x2=\"4.5\" y2=\"4.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.5\" y1=\"4.5\" x2=\"8.1\" y2=\"4.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"15.9\" y1=\"4.5\" x2=\"19.5\" y2=\"4.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"19.5\" y1=\"4.5\" x2=\"19.5\" y2=\"8.1\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.5\" y1=\"15.9\" x2=\"4.5\" y2=\"19.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.5\" y1=\"19.5\" x2=\"8.1\" y2=\"19.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"15.9\" y1=\"19.5\" x2=\"19.5\" y2=\"19.5\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"19.5\" y1=\"19.5\" x2=\"19.5\" y2=\"15.9\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"5.9\" y1=\"12\" x2=\"18.1\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n eye: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M2.6 12 Q12 3.6 21.4 12 Q12 20.4 2.6 12 Z\" transform=\"translate(0 0) scale(1 1)\"/><circle cx=\"12\" cy=\"12\" r=\"3.1\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n eyeOff:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M2.6 12 Q12 3.6 21.4 12 Q12 20.4 2.6 12 Z\" transform=\"translate(0 0) scale(1 1)\"/><circle cx=\"12\" cy=\"12\" r=\"3.1\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.4\" y1=\"20.2\" x2=\"19.6\" y2=\"3.8\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n check:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12.8 L9.6 17.4 L19 7\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n checkCircle:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"7.8\" y1=\"12.3\" x2=\"10.6\" y2=\"15.1\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"10.6\" y1=\"15.1\" x2=\"16.2\" y2=\"9.3\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n warning:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3.6 L21.6 20.4 L2.4 20.4 Z\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"9.4\" x2=\"12\" y2=\"14.6\" transform=\"translate(0 0) scale(1 1)\"/><circle cx=\"12\" cy=\"17.6\" r=\"1.24\" fill=\"currentColor\" stroke=\"none\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n errorCircle:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"8.8\" y1=\"8.8\" x2=\"15.2\" y2=\"15.2\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"15.2\" y1=\"8.8\" x2=\"8.8\" y2=\"15.2\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n info: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"9\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"11\" x2=\"12\" y2=\"16.4\" transform=\"translate(0 0) scale(1 1)\"/><circle cx=\"12\" cy=\"7.8\" r=\"1.24\" fill=\"currentColor\" stroke=\"none\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n calendar:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3.4\" y=\"5.4\" width=\"17.2\" height=\"15.2\" rx=\"2.4\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"3.4\" y1=\"10\" x2=\"20.6\" y2=\"10\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"8.2\" y1=\"3\" x2=\"8.2\" y2=\"6.4\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"15.8\" y1=\"3\" x2=\"15.8\" y2=\"6.4\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n clock:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"8.8\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"7.2\" x2=\"12\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"12\" x2=\"15.6\" y2=\"14.2\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n mic: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9.2\" y=\"2.6\" width=\"5.6\" height=\"11.4\" rx=\"2.8\" transform=\"translate(0 0) scale(1 1)\"/><path d=\"M5.4 11 Q5.4 18.2 12 18.2 Q18.6 18.2 18.6 11\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"18.2\" x2=\"12\" y2=\"21.4\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n micOff:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9.2\" y=\"2.6\" width=\"5.6\" height=\"11.4\" rx=\"2.8\" transform=\"translate(0 0) scale(1 1)\"/><path d=\"M5.4 11 Q5.4 18.2 12 18.2 Q18.6 18.2 18.6 11\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"12\" y1=\"18.2\" x2=\"12\" y2=\"21.4\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4.4\" y1=\"20.2\" x2=\"19.6\" y2=\"3.8\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n plus: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n minus:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n menu: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"4\" y1=\"7\" x2=\"20\" y2=\"7\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"4\" y1=\"17\" x2=\"20\" y2=\"17\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n refresh:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16.818 5.1191 A8.4 8.4 0 1 1 6.6006 5.5652\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"3.7\" y1=\"4.8\" x2=\"8.3\" y2=\"4.2\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"8.3\" y1=\"4.2\" x2=\"6.9\" y2=\"8.5\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n delete:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"4\" y1=\"7\" x2=\"20\" y2=\"7\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"9.6\" y1=\"7\" x2=\"10.2\" y2=\"4.2\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"10.2\" y1=\"4.2\" x2=\"13.8\" y2=\"4.2\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"13.8\" y1=\"4.2\" x2=\"14.4\" y2=\"7\" transform=\"translate(0 0) scale(1 1)\"/><path d=\"M6 7 L7.2 20.4 L16.8 20.4 L18 7\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"10.2\" y1=\"10.6\" x2=\"10.6\" y2=\"17\" transform=\"translate(0 0) scale(1 1)\"/><line x1=\"13.8\" y1=\"10.6\" x2=\"13.4\" y2=\"17\" transform=\"translate(0 0) scale(1 1)\"/></svg>',\n} as const;\n"],"names":["g9GlyphStrokeUnits","g9GlyphSvg"],"mappings":"AAIO,MAAMA,qBAAqB;AAO3B,MAAMC,aAAa;IACxB,aACE;IACF,WACE;IACF,aACE;IACF,cACE;IACF,WACE;IACF,cACE;IACF,OACE;IACF,QACE;IACF,UACE;IACF,UACE;IACF,UACE;IACF,KAAK;IACL,QACE;IACF,OACE;IACF,aACE;IACF,SACE;IACF,aACE;IACF,MAAM;IACN,UACE;IACF,OACE;IACF,KAAK;IACL,QACE;IACF,MAAM;IACN,OACE;IACF,MAAM;IACN,SACE;IACF,QACE;AACJ"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './enums/index.js';
4
4
  export { G9Error } from './errors.js';
5
5
  export * from './exec/index.js';
6
6
  export * from './icons/index.js';
7
+ export * from './route/index.js';
7
8
  export * from './services/index.js';
8
9
  export * from './theme/index.js';
9
10
  export * from './tokens/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjF,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjF,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export * from "./culture/index.js";
2
2
  export * from "./enums/index.js";
3
3
  export * from "./exec/index.js";
4
4
  export * from "./icons/index.js";
5
+ export * from "./route/index.js";
5
6
  export * from "./services/index.js";
6
7
  export * from "./theme/index.js";
7
8
  export * from "./tokens/index.js";
@@ -0,0 +1,68 @@
1
+ import { G9Error } from '../errors.js';
2
+ /** One place in an address. Values are DECODED text; `formatAddress` encodes them. */
3
+ export interface G9Segment {
4
+ readonly kind: string;
5
+ readonly variant?: string;
6
+ readonly id?: string;
7
+ readonly params?: Readonly<Record<string, string>>;
8
+ }
9
+ /** A parsed address: the path of places (root first) and an optional focused anchor. */
10
+ export interface G9Address {
11
+ readonly segments: readonly G9Segment[];
12
+ /** An anchor id to bring into view and focus (the `#…` part). */
13
+ readonly target?: string;
14
+ }
15
+ /** A segment, or just its kind. */
16
+ export type G9SegmentInput = G9Segment | string;
17
+ /** Why an address was refused. */
18
+ export type G9AddressErrorCode = 'not-absolute' | 'too-long' | 'too-deep' | 'empty-segment' | 'bad-char' | 'bad-escape' | 'bad-name' | 'bad-param' | 'dup-param' | 'too-many-params';
19
+ /** A refused address. `code` is stable; `message` is for developers (not shown to users). */
20
+ export declare class G9AddressError extends G9Error {
21
+ readonly code: G9AddressErrorCode;
22
+ constructor(code: G9AddressErrorCode, message: string);
23
+ }
24
+ /** The bounds of an address (each one a refusal past it). */
25
+ export declare const g9AddressLimits: Readonly<{
26
+ length: 2048;
27
+ depth: 16;
28
+ params: 8;
29
+ kind: 32;
30
+ id: 96;
31
+ paramName: 24;
32
+ paramValue: 256;
33
+ target: 128;
34
+ }>;
35
+ /** Builds a segment, leaving out what is null or empty. */
36
+ export declare function seg(kind: string, id?: string | null, variant?: string | null, params?: Readonly<Record<string, string | null | undefined>> | null): G9Segment;
37
+ /** A {@link G9SegmentInput} as a segment. */
38
+ export declare function toSegment(input: G9SegmentInput): G9Segment;
39
+ /**
40
+ * Parses an address strictly.
41
+ * @throws {G9AddressError} for anything outside the grammar or its bounds ({@link g9AddressLimits}).
42
+ */
43
+ export declare function parseAddress(text: string): G9Address;
44
+ /** {@link parseAddress} without throwing. */
45
+ export declare function tryParseAddress(text: string): {
46
+ readonly ok: true;
47
+ readonly address: G9Address;
48
+ } | {
49
+ readonly ok: false;
50
+ readonly error: G9AddressError;
51
+ };
52
+ /**
53
+ * The canonical text of an address: parameters sorted by name, hex escapes upper case, no trailing "/". Two addresses
54
+ * are the same address when their canonical texts are equal (ids are normalised by the catalogue, not here).
55
+ */
56
+ export declare function formatAddress(address: G9Address | readonly G9Segment[]): string;
57
+ /** The general form: kinds and variants only (no ids, parameters or target). */
58
+ export declare function generalOf(address: G9Address | string): string;
59
+ /** Same kind, variant and id (parameters are view state, not identity). */
60
+ export declare function sameSegment(a: G9Segment, b: G9Segment): boolean;
61
+ /** Same kind, variant, id AND parameters. */
62
+ export declare function sameSegmentState(a: G9Segment, b: G9Segment): boolean;
63
+ /**
64
+ * Whether an address matches a pattern of kinds: `/tasks/task.sampling/**​/package`. A token is `kind`,
65
+ * `kind.variant`, either with `:*` (an id is required), `*` (exactly one segment) or `**` (any number, also none).
66
+ */
67
+ export declare function matchesAddress(address: G9Address | string, pattern: string): boolean;
68
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/route/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,sFAAsF;AACtF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACpD;AAED,wFAAwF;AACxF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,SAAS,EAAE,CAAC;IACxC,iEAAiE;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,mCAAmC;AACnC,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AAEhD,kCAAkC;AAClC,MAAM,MAAM,kBAAkB,GAC1B,cAAc,GACd,UAAU,GACV,UAAU,GACV,eAAe,GACf,UAAU,GACV,YAAY,GACZ,UAAU,GACV,WAAW,GACX,WAAW,GACX,iBAAiB,CAAC;AAEtB,6FAA6F;AAC7F,qBAAa,cAAe,SAAQ,OAAO;IACzC,SAAkB,IAAI,EAAE,kBAAkB,CAAC;gBAE/B,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM;CAKtD;AAED,6DAA6D;AAC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AAM,GAAG,OAAO,CAEpF"}
@@ -0,0 +1,282 @@
1
+ import { G9Error } from "../errors.js";
2
+ function _define_property(obj, key, value) {
3
+ if (key in obj) Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ else obj[key] = value;
10
+ return obj;
11
+ }
12
+ class G9AddressError extends G9Error {
13
+ constructor(code, message){
14
+ super(code, message), _define_property(this, "code", void 0);
15
+ this.name = 'G9AddressError';
16
+ this.code = code;
17
+ }
18
+ }
19
+ const g9AddressLimits = Object.freeze({
20
+ length: 2048,
21
+ depth: 16,
22
+ params: 8,
23
+ kind: 32,
24
+ id: 96,
25
+ paramName: 24,
26
+ paramValue: 256,
27
+ target: 128
28
+ });
29
+ const NAME = /^[a-z][a-z0-9-]*$/;
30
+ const RAW_ID = /^[A-Za-z0-9\-_~%]+$/;
31
+ const RAW_VALUE = /^[A-Za-z0-9\-_~.,%]*$/;
32
+ const RAW_TARGET = /^[A-Za-z0-9._\-%]+$/;
33
+ const SAFE_ID = /^[A-Za-z0-9\-_~]$/;
34
+ const SAFE_VALUE = /^[A-Za-z0-9\-_~.,]$/;
35
+ const SAFE_TARGET = /^[A-Za-z0-9._-]$/;
36
+ const CONTROL = /[\u0000-\u001f\u007f-\u009f]/;
37
+ const ESCAPE = /%[0-9A-Fa-f]{2}/;
38
+ const BAD_ESCAPE = /%(?![0-9A-Fa-f]{2})/;
39
+ function fail(code, message) {
40
+ throw new G9AddressError(code, message);
41
+ }
42
+ function decode(raw, what) {
43
+ if (BAD_ESCAPE.test(raw)) fail('bad-escape', `${what}: a "%" must start a two-digit hex escape.`);
44
+ let text;
45
+ try {
46
+ text = decodeURIComponent(raw);
47
+ } catch {
48
+ return fail('bad-escape', `${what}: the escapes are not UTF-8.`);
49
+ }
50
+ if (ESCAPE.test(text)) fail('bad-escape', `${what}: an escape decodes to another escape.`);
51
+ if (CONTROL.test(text)) fail('bad-char', `${what}: control characters are not allowed.`);
52
+ return text;
53
+ }
54
+ function hex2(code) {
55
+ const h = code.toString(16).toUpperCase();
56
+ return 1 === h.length ? `0${h}` : h;
57
+ }
58
+ function encode(text, safe) {
59
+ let out = '';
60
+ for (const ch of text){
61
+ if (safe.test(ch)) {
62
+ out += ch;
63
+ continue;
64
+ }
65
+ let e;
66
+ try {
67
+ e = encodeURIComponent(ch);
68
+ } catch {
69
+ return fail('bad-char', 'A lone surrogate cannot be encoded.');
70
+ }
71
+ out += e === ch ? `%${hex2(ch.charCodeAt(0))}` : e;
72
+ }
73
+ return out;
74
+ }
75
+ function checkName(name, what, max) {
76
+ if (name.length > max || !NAME.test(name)) fail('bad-name', `${what} "${name}" must match [a-z][a-z0-9-]* (≤ ${max}).`);
77
+ }
78
+ function parseSegment(text, index) {
79
+ var _parts_;
80
+ const parts = text.split(';');
81
+ const head = null != (_parts_ = parts[0]) ? _parts_ : '';
82
+ if ('' === head) fail('empty-segment', `Segment ${index} has no kind.`);
83
+ const colon = head.indexOf(':');
84
+ const name = colon < 0 ? head : head.slice(0, colon);
85
+ const dot = name.indexOf('.');
86
+ const kind = dot < 0 ? name : name.slice(0, dot);
87
+ checkName(kind, 'A kind', g9AddressLimits.kind);
88
+ let variant;
89
+ if (dot >= 0) {
90
+ variant = name.slice(dot + 1);
91
+ checkName(variant, 'A variant', g9AddressLimits.kind);
92
+ }
93
+ let id;
94
+ if (colon >= 0) {
95
+ const raw = head.slice(colon + 1);
96
+ if ('' === raw || raw.length > 3 * g9AddressLimits.id || !RAW_ID.test(raw)) fail('bad-char', `Segment ${index}: the id has characters outside [A-Za-z0-9-_~] and escapes.`);
97
+ id = decode(raw, `Segment ${index} id`);
98
+ if (id.length > g9AddressLimits.id) fail('too-long', `Segment ${index}: the id is longer than ${g9AddressLimits.id}.`);
99
+ }
100
+ let params;
101
+ if (parts.length > 1) {
102
+ if (parts.length - 1 > g9AddressLimits.params) fail('too-many-params', `Segment ${index} has more than ${g9AddressLimits.params} parameters.`);
103
+ params = {};
104
+ const seen = new Set();
105
+ for(let i = 1; i < parts.length; i++){
106
+ var _parts_i;
107
+ const p = null != (_parts_i = parts[i]) ? _parts_i : '';
108
+ const eq = p.indexOf('=');
109
+ if (eq <= 0) fail('bad-param', `Segment ${index}: "${p}" is not name=value.`);
110
+ const pname = p.slice(0, eq);
111
+ checkName(pname, 'A parameter name', g9AddressLimits.paramName);
112
+ const raw = p.slice(eq + 1);
113
+ if ('' === raw || !RAW_VALUE.test(raw)) fail('bad-param', `Segment ${index}: parameter "${pname}" has an empty or invalid value.`);
114
+ if (seen.has(pname)) fail('dup-param', `Segment ${index}: parameter "${pname}" twice.`);
115
+ seen.add(pname);
116
+ const value = decode(raw, `Parameter ${pname}`);
117
+ if (value.length > g9AddressLimits.paramValue) fail('too-long', `Parameter ${pname} is longer than ${g9AddressLimits.paramValue}.`);
118
+ params[pname] = value;
119
+ }
120
+ }
121
+ return seg(kind, id, variant, params);
122
+ }
123
+ function seg(kind, id, variant, params) {
124
+ const out = {
125
+ kind
126
+ };
127
+ if (variant) out.variant = variant;
128
+ if (id) out.id = id;
129
+ if (params) {
130
+ const kept = {};
131
+ let any = false;
132
+ for (const key of Object.keys(params)){
133
+ const value = params[key];
134
+ if (null != value && '' !== value) {
135
+ kept[key] = value;
136
+ any = true;
137
+ }
138
+ }
139
+ if (any) out.params = kept;
140
+ }
141
+ return out;
142
+ }
143
+ function toSegment(input) {
144
+ return 'string' == typeof input ? {
145
+ kind: input
146
+ } : input;
147
+ }
148
+ function parseAddress(text) {
149
+ if ('string' != typeof text || '/' !== text.charAt(0)) fail('not-absolute', 'An address starts with "/".');
150
+ if (text.length > g9AddressLimits.length) fail('too-long', `An address is at most ${g9AddressLimits.length} characters.`);
151
+ const hash = text.indexOf('#');
152
+ const path = hash < 0 ? text : text.slice(0, hash);
153
+ let target;
154
+ if (hash >= 0) {
155
+ const raw = text.slice(hash + 1);
156
+ if ('' === raw || !RAW_TARGET.test(raw)) fail('bad-char', 'The target has characters outside [A-Za-z0-9._-] and escapes.');
157
+ target = decode(raw, 'The target');
158
+ if (target.length > g9AddressLimits.target) fail('too-long', `The target is longer than ${g9AddressLimits.target}.`);
159
+ }
160
+ const body = path.slice(1);
161
+ const parts = '' === body ? [] : body.split('/');
162
+ if (parts.length > g9AddressLimits.depth) fail('too-deep', `An address has at most ${g9AddressLimits.depth} segments.`);
163
+ const segments = parts.map((p, i)=>{
164
+ if ('' === p) fail('empty-segment', `Segment ${i} is empty ("//" or a trailing "/").`);
165
+ return parseSegment(p, i);
166
+ });
167
+ return void 0 === target ? {
168
+ segments
169
+ } : {
170
+ segments,
171
+ target
172
+ };
173
+ }
174
+ function tryParseAddress(text) {
175
+ try {
176
+ return {
177
+ ok: true,
178
+ address: parseAddress(text)
179
+ };
180
+ } catch (error) {
181
+ if (error instanceof G9AddressError) return {
182
+ ok: false,
183
+ error
184
+ };
185
+ throw error;
186
+ }
187
+ }
188
+ function formatSegment(s) {
189
+ let out = s.kind + (s.variant ? `.${s.variant}` : '');
190
+ if (s.id) out += `:${encode(s.id, SAFE_ID)}`;
191
+ if (s.params) for (const name of Object.keys(s.params).sort()){
192
+ const value = s.params[name];
193
+ if (value) out += `;${name}=${encode(value, SAFE_VALUE)}`;
194
+ }
195
+ return out;
196
+ }
197
+ function formatAddress(address) {
198
+ const a = isAddress(address) ? address : {
199
+ segments: address
200
+ };
201
+ const path = `/${a.segments.map(formatSegment).join('/')}`;
202
+ return a.target ? `${path}#${encode(a.target, SAFE_TARGET)}` : path;
203
+ }
204
+ function isAddress(x) {
205
+ return !Array.isArray(x);
206
+ }
207
+ function asAddress(address) {
208
+ return 'string' == typeof address ? parseAddress(address) : address;
209
+ }
210
+ function generalOf(address) {
211
+ return formatAddress(asAddress(address).segments.map((s)=>{
212
+ var _s_variant;
213
+ return seg(s.kind, null, null != (_s_variant = s.variant) ? _s_variant : null);
214
+ }));
215
+ }
216
+ function sameSegment(a, b) {
217
+ var _a_variant, _b_variant, _a_id, _b_id;
218
+ return a.kind === b.kind && (null != (_a_variant = a.variant) ? _a_variant : '') === (null != (_b_variant = b.variant) ? _b_variant : '') && (null != (_a_id = a.id) ? _a_id : '') === (null != (_b_id = b.id) ? _b_id : '');
219
+ }
220
+ function sameSegmentState(a, b) {
221
+ var _a_params, _b_params;
222
+ if (!sameSegment(a, b)) return false;
223
+ const pa = null != (_a_params = a.params) ? _a_params : {};
224
+ const pb = null != (_b_params = b.params) ? _b_params : {};
225
+ const ka = Object.keys(pa);
226
+ if (ka.length !== Object.keys(pb).length) return false;
227
+ return ka.every((k)=>pa[k] === pb[k]);
228
+ }
229
+ function patternTokens(pattern) {
230
+ const body = '/' === pattern.charAt(0) ? pattern.slice(1) : pattern;
231
+ if ('' === body) return [];
232
+ return body.split('/').map((t)=>{
233
+ if ('**' === t) return {
234
+ any: 'many',
235
+ needsId: false
236
+ };
237
+ if ('*' === t) return {
238
+ any: 'one',
239
+ needsId: false
240
+ };
241
+ const needsId = ':*' === t.slice(-2);
242
+ const name = needsId ? t.slice(0, -2) : t;
243
+ const dot = name.indexOf('.');
244
+ const kind = dot < 0 ? name : name.slice(0, dot);
245
+ checkName(kind, 'A pattern kind', g9AddressLimits.kind);
246
+ if (dot < 0) return {
247
+ any: null,
248
+ kind,
249
+ needsId
250
+ };
251
+ const variant = name.slice(dot + 1);
252
+ checkName(variant, 'A pattern variant', g9AddressLimits.kind);
253
+ return {
254
+ any: null,
255
+ kind,
256
+ variant,
257
+ needsId
258
+ };
259
+ });
260
+ }
261
+ function tokenMatches(t, s) {
262
+ if ('one' === t.any) return true;
263
+ if (t.kind !== s.kind) return false;
264
+ if (void 0 !== t.variant && t.variant !== s.variant) return false;
265
+ return !t.needsId || !!s.id;
266
+ }
267
+ function matchFrom(tokens, ti, segments, si) {
268
+ if (ti === tokens.length) return si === segments.length;
269
+ const t = tokens[ti];
270
+ if ('many' === t.any) {
271
+ for(let k = si; k <= segments.length; k++)if (matchFrom(tokens, ti + 1, segments, k)) return true;
272
+ return false;
273
+ }
274
+ const s = segments[si];
275
+ return !!s && tokenMatches(t, s) && matchFrom(tokens, ti + 1, segments, si + 1);
276
+ }
277
+ function matchesAddress(address, pattern) {
278
+ return matchFrom(patternTokens(pattern), 0, asAddress(address).segments, 0);
279
+ }
280
+ export { G9AddressError, formatAddress, g9AddressLimits, generalOf, matchesAddress, parseAddress, sameSegment, sameSegmentState, seg, toSegment, tryParseAddress };
281
+
282
+ //# sourceMappingURL=address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route/address.js","sources":["../../src/route/address.ts"],"sourcesContent":["import { G9Error } from '../errors';\n\n// The navigation address grammar (route): where a place of the app is, as text an automation, a tester report, a link\n// or an assistant can carry. Structure only — which kinds exist, their parents and ids belong to the catalogue.\n//\n// address = \"/\" [ segment *( \"/\" segment ) ] [ \"#\" target ]\n// segment = kind [ \".\" variant ] [ \":\" id ] *( \";\" name \"=\" value )\n//\n// A UNIQUE address names entities (`/tasks/task.sampling:9f3a…/sampling:71c2…/packages/package:9b10…`); its GENERAL\n// form keeps only the kinds (`/tasks/task.sampling/sampling/packages/package`). Parsing is strict and bounded: an\n// address may come from outside the app (a link), so anything outside the grammar is refused with a typed error.\n\n/** One place in an address. Values are DECODED text; `formatAddress` encodes them. */\nexport interface G9Segment {\n readonly kind: string;\n readonly variant?: string;\n readonly id?: string;\n readonly params?: Readonly<Record<string, string>>;\n}\n\n/** A parsed address: the path of places (root first) and an optional focused anchor. */\nexport interface G9Address {\n readonly segments: readonly G9Segment[];\n /** An anchor id to bring into view and focus (the `#…` part). */\n readonly target?: string;\n}\n\n/** A segment, or just its kind. */\nexport type G9SegmentInput = G9Segment | string;\n\n/** Why an address was refused. */\nexport type G9AddressErrorCode =\n | 'not-absolute'\n | 'too-long'\n | 'too-deep'\n | 'empty-segment'\n | 'bad-char'\n | 'bad-escape'\n | 'bad-name'\n | 'bad-param'\n | 'dup-param'\n | 'too-many-params';\n\n/** A refused address. `code` is stable; `message` is for developers (not shown to users). */\nexport class G9AddressError extends G9Error {\n override readonly code: G9AddressErrorCode;\n\n constructor(code: G9AddressErrorCode, message: string) {\n super(code, message);\n this.name = 'G9AddressError';\n this.code = code;\n }\n}\n\n/** The bounds of an address (each one a refusal past it). */\nexport const g9AddressLimits = Object.freeze({\n length: 2048,\n depth: 16,\n params: 8,\n kind: 32,\n id: 96,\n paramName: 24,\n paramValue: 256,\n target: 128,\n});\n\nconst NAME = /^[a-z][a-z0-9-]*$/;\nconst RAW_ID = /^[A-Za-z0-9\\-_~%]+$/;\nconst RAW_VALUE = /^[A-Za-z0-9\\-_~.,%]*$/;\nconst RAW_TARGET = /^[A-Za-z0-9._\\-%]+$/;\nconst SAFE_ID = /^[A-Za-z0-9\\-_~]$/;\nconst SAFE_VALUE = /^[A-Za-z0-9\\-_~.,]$/;\nconst SAFE_TARGET = /^[A-Za-z0-9._-]$/;\n// biome-ignore lint/suspicious/noControlCharactersInRegex: control characters are what this refuses\nconst CONTROL = /[\\u0000-\\u001f\\u007f-\\u009f]/;\nconst ESCAPE = /%[0-9A-Fa-f]{2}/;\nconst BAD_ESCAPE = /%(?![0-9A-Fa-f]{2})/;\n\nfunction fail(code: G9AddressErrorCode, message: string): never {\n throw new G9AddressError(code, message);\n}\n\nfunction decode(raw: string, what: string): string {\n if (BAD_ESCAPE.test(raw)) fail('bad-escape', `${what}: a \"%\" must start a two-digit hex escape.`);\n let text: string;\n try {\n text = decodeURIComponent(raw);\n } catch {\n return fail('bad-escape', `${what}: the escapes are not UTF-8.`);\n }\n // Decoded exactly once: text that still holds an escape would mean something else to a second decoder.\n if (ESCAPE.test(text)) fail('bad-escape', `${what}: an escape decodes to another escape.`);\n if (CONTROL.test(text)) fail('bad-char', `${what}: control characters are not allowed.`);\n return text;\n}\n\nfunction hex2(code: number): string {\n const h = code.toString(16).toUpperCase();\n return h.length === 1 ? `0${h}` : h;\n}\n\nfunction encode(text: string, safe: RegExp): string {\n let out = '';\n for (const ch of text) {\n if (safe.test(ch)) {\n out += ch;\n continue;\n }\n let e: string;\n try {\n e = encodeURIComponent(ch);\n } catch {\n return fail('bad-char', 'A lone surrogate cannot be encoded.');\n }\n // encodeURIComponent leaves . ! * ' ( ) as they are; outside our safe set they are escaped too.\n out += e === ch ? `%${hex2(ch.charCodeAt(0))}` : e;\n }\n return out;\n}\n\nfunction checkName(name: string, what: string, max: number): void {\n if (name.length > max || !NAME.test(name))\n fail('bad-name', `${what} \"${name}\" must match [a-z][a-z0-9-]* (≤ ${max}).`);\n}\n\nfunction parseSegment(text: string, index: number): G9Segment {\n const parts = text.split(';');\n const head = parts[0] ?? '';\n if (head === '') fail('empty-segment', `Segment ${index} has no kind.`);\n const colon = head.indexOf(':');\n const name = colon < 0 ? head : head.slice(0, colon);\n const dot = name.indexOf('.');\n const kind = dot < 0 ? name : name.slice(0, dot);\n checkName(kind, 'A kind', g9AddressLimits.kind);\n let variant: string | undefined;\n if (dot >= 0) {\n variant = name.slice(dot + 1);\n checkName(variant, 'A variant', g9AddressLimits.kind);\n }\n let id: string | undefined;\n if (colon >= 0) {\n const raw = head.slice(colon + 1);\n if (raw === '' || raw.length > g9AddressLimits.id * 3 || !RAW_ID.test(raw))\n fail('bad-char', `Segment ${index}: the id has characters outside [A-Za-z0-9-_~] and escapes.`);\n id = decode(raw, `Segment ${index} id`);\n if (id.length > g9AddressLimits.id)\n fail('too-long', `Segment ${index}: the id is longer than ${g9AddressLimits.id}.`);\n }\n let params: Record<string, string> | undefined;\n if (parts.length > 1) {\n if (parts.length - 1 > g9AddressLimits.params)\n fail('too-many-params', `Segment ${index} has more than ${g9AddressLimits.params} parameters.`);\n params = {};\n const seen = new Set<string>();\n for (let i = 1; i < parts.length; i++) {\n const p = parts[i] ?? '';\n const eq = p.indexOf('=');\n if (eq <= 0) fail('bad-param', `Segment ${index}: \"${p}\" is not name=value.`);\n const pname = p.slice(0, eq);\n checkName(pname, 'A parameter name', g9AddressLimits.paramName);\n const raw = p.slice(eq + 1);\n if (raw === '' || !RAW_VALUE.test(raw))\n fail('bad-param', `Segment ${index}: parameter \"${pname}\" has an empty or invalid value.`);\n if (seen.has(pname)) fail('dup-param', `Segment ${index}: parameter \"${pname}\" twice.`);\n seen.add(pname);\n const value = decode(raw, `Parameter ${pname}`);\n if (value.length > g9AddressLimits.paramValue)\n fail('too-long', `Parameter ${pname} is longer than ${g9AddressLimits.paramValue}.`);\n params[pname] = value;\n }\n }\n return seg(kind, id, variant, params);\n}\n\n/** Builds a segment, leaving out what is null or empty. */\nexport function seg(\n kind: string,\n id?: string | null,\n variant?: string | null,\n params?: Readonly<Record<string, string | null | undefined>> | null,\n): G9Segment {\n const out: { kind: string; variant?: string; id?: string; params?: Record<string, string> } = { kind };\n if (variant) out.variant = variant;\n if (id) out.id = id;\n if (params) {\n const kept: Record<string, string> = {};\n let any = false;\n for (const key of Object.keys(params)) {\n const value = params[key];\n if (value === null || value === undefined || value === '') continue;\n kept[key] = value;\n any = true;\n }\n if (any) out.params = kept;\n }\n return out;\n}\n\n/** A {@link G9SegmentInput} as a segment. */\nexport function toSegment(input: G9SegmentInput): G9Segment {\n return typeof input === 'string' ? { kind: input } : input;\n}\n\n/**\n * Parses an address strictly.\n * @throws {G9AddressError} for anything outside the grammar or its bounds ({@link g9AddressLimits}).\n */\nexport function parseAddress(text: string): G9Address {\n if (typeof text !== 'string' || text.charAt(0) !== '/') fail('not-absolute', 'An address starts with \"/\".');\n if (text.length > g9AddressLimits.length)\n fail('too-long', `An address is at most ${g9AddressLimits.length} characters.`);\n const hash = text.indexOf('#');\n const path = hash < 0 ? text : text.slice(0, hash);\n let target: string | undefined;\n if (hash >= 0) {\n const raw = text.slice(hash + 1);\n if (raw === '' || !RAW_TARGET.test(raw))\n fail('bad-char', 'The target has characters outside [A-Za-z0-9._-] and escapes.');\n target = decode(raw, 'The target');\n if (target.length > g9AddressLimits.target)\n fail('too-long', `The target is longer than ${g9AddressLimits.target}.`);\n }\n const body = path.slice(1);\n const parts = body === '' ? [] : body.split('/');\n if (parts.length > g9AddressLimits.depth)\n fail('too-deep', `An address has at most ${g9AddressLimits.depth} segments.`);\n const segments = parts.map((p, i) => {\n if (p === '') fail('empty-segment', `Segment ${i} is empty (\"//\" or a trailing \"/\").`);\n return parseSegment(p, i);\n });\n return target === undefined ? { segments } : { segments, target };\n}\n\n/** {@link parseAddress} without throwing. */\nexport function tryParseAddress(\n text: string,\n): { readonly ok: true; readonly address: G9Address } | { readonly ok: false; readonly error: G9AddressError } {\n try {\n return { ok: true, address: parseAddress(text) };\n } catch (error) {\n if (error instanceof G9AddressError) return { ok: false, error };\n throw error;\n }\n}\n\nfunction formatSegment(s: G9Segment): string {\n let out = s.kind + (s.variant ? `.${s.variant}` : '');\n if (s.id) out += `:${encode(s.id, SAFE_ID)}`;\n if (s.params) {\n for (const name of Object.keys(s.params).sort()) {\n const value = s.params[name];\n if (value) out += `;${name}=${encode(value, SAFE_VALUE)}`;\n }\n }\n return out;\n}\n\n/**\n * The canonical text of an address: parameters sorted by name, hex escapes upper case, no trailing \"/\". Two addresses\n * are the same address when their canonical texts are equal (ids are normalised by the catalogue, not here).\n */\nexport function formatAddress(address: G9Address | readonly G9Segment[]): string {\n const a: G9Address = isAddress(address) ? address : { segments: address };\n const path = `/${a.segments.map(formatSegment).join('/')}`;\n return a.target ? `${path}#${encode(a.target, SAFE_TARGET)}` : path;\n}\n\nfunction isAddress(x: G9Address | readonly G9Segment[]): x is G9Address {\n return !Array.isArray(x);\n}\n\nfunction asAddress(address: G9Address | string): G9Address {\n return typeof address === 'string' ? parseAddress(address) : address;\n}\n\n/** The general form: kinds and variants only (no ids, parameters or target). */\nexport function generalOf(address: G9Address | string): string {\n return formatAddress(asAddress(address).segments.map((s) => seg(s.kind, null, s.variant ?? null)));\n}\n\n/** Same kind, variant and id (parameters are view state, not identity). */\nexport function sameSegment(a: G9Segment, b: G9Segment): boolean {\n return a.kind === b.kind && (a.variant ?? '') === (b.variant ?? '') && (a.id ?? '') === (b.id ?? '');\n}\n\n/** Same kind, variant, id AND parameters. */\nexport function sameSegmentState(a: G9Segment, b: G9Segment): boolean {\n if (!sameSegment(a, b)) return false;\n const pa = a.params ?? {};\n const pb = b.params ?? {};\n const ka = Object.keys(pa);\n if (ka.length !== Object.keys(pb).length) return false;\n return ka.every((k) => pa[k] === pb[k]);\n}\n\ninterface PatternToken {\n readonly any: 'one' | 'many' | null;\n readonly kind?: string;\n readonly variant?: string;\n readonly needsId: boolean;\n}\n\nfunction patternTokens(pattern: string): PatternToken[] {\n const body = pattern.charAt(0) === '/' ? pattern.slice(1) : pattern;\n if (body === '') return [];\n return body.split('/').map((t) => {\n if (t === '**') return { any: 'many', needsId: false };\n if (t === '*') return { any: 'one', needsId: false };\n const needsId = t.slice(-2) === ':*';\n const name = needsId ? t.slice(0, -2) : t;\n const dot = name.indexOf('.');\n const kind = dot < 0 ? name : name.slice(0, dot);\n checkName(kind, 'A pattern kind', g9AddressLimits.kind);\n if (dot < 0) return { any: null, kind, needsId };\n const variant = name.slice(dot + 1);\n checkName(variant, 'A pattern variant', g9AddressLimits.kind);\n return { any: null, kind, variant, needsId };\n });\n}\n\nfunction tokenMatches(t: PatternToken, s: G9Segment): boolean {\n if (t.any === 'one') return true;\n if (t.kind !== s.kind) return false;\n if (t.variant !== undefined && t.variant !== s.variant) return false;\n return !t.needsId || !!s.id;\n}\n\nfunction matchFrom(tokens: readonly PatternToken[], ti: number, segments: readonly G9Segment[], si: number): boolean {\n if (ti === tokens.length) return si === segments.length;\n const t = tokens[ti] as PatternToken;\n if (t.any === 'many') {\n for (let k = si; k <= segments.length; k++) if (matchFrom(tokens, ti + 1, segments, k)) return true;\n return false;\n }\n const s = segments[si];\n return !!s && tokenMatches(t, s) && matchFrom(tokens, ti + 1, segments, si + 1);\n}\n\n/**\n * Whether an address matches a pattern of kinds: `/tasks/task.sampling/**​/package`. A token is `kind`,\n * `kind.variant`, either with `:*` (an id is required), `*` (exactly one segment) or `**` (any number, also none).\n */\nexport function matchesAddress(address: G9Address | string, pattern: string): boolean {\n return matchFrom(patternTokens(pattern), 0, asAddress(address).segments, 0);\n}\n"],"names":["G9AddressError","G9Error","code","message","g9AddressLimits","Object","NAME","RAW_ID","RAW_VALUE","RAW_TARGET","SAFE_ID","SAFE_VALUE","SAFE_TARGET","CONTROL","ESCAPE","BAD_ESCAPE","fail","decode","raw","what","text","decodeURIComponent","hex2","h","encode","safe","out","ch","e","encodeURIComponent","checkName","name","max","parseSegment","index","_parts_","parts","head","colon","dot","kind","variant","id","params","seen","Set","i","_parts_i","p","eq","pname","value","seg","kept","any","key","toSegment","input","parseAddress","hash","path","target","body","segments","undefined","tryParseAddress","error","formatSegment","s","formatAddress","address","a","isAddress","x","Array","asAddress","generalOf","_s_variant","sameSegment","b","_a_variant","_b_variant","_a_id","_b_id","sameSegmentState","_a_params","_b_params","pa","pb","ka","k","patternTokens","pattern","t","needsId","tokenMatches","matchFrom","tokens","ti","si","matchesAddress"],"mappings":";;;;;;;;;;;AA4CO,MAAMA,uBAAuBC;IAGlC,YAAYC,IAAwB,EAAEC,OAAe,CAAE;QACrD,KAAK,CAACD,MAAMC,UAHd,uBAAkB,QAAlB;QAIE,IAAI,CAAC,IAAI,GAAG;QACZ,IAAI,CAAC,IAAI,GAAGD;IACd;AACF;AAGO,MAAME,kBAAkBC,OAAO,MAAM,CAAC;IAC3C,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,IAAI;IACJ,WAAW;IACX,YAAY;IACZ,QAAQ;AACV;AAEA,MAAMC,OAAO;AACb,MAAMC,SAAS;AACf,MAAMC,YAAY;AAClB,MAAMC,aAAa;AACnB,MAAMC,UAAU;AAChB,MAAMC,aAAa;AACnB,MAAMC,cAAc;AAEpB,MAAMC,UAAU;AAChB,MAAMC,SAAS;AACf,MAAMC,aAAa;AAEnB,SAASC,KAAKd,IAAwB,EAAEC,OAAe;IACrD,MAAM,IAAIH,eAAeE,MAAMC;AACjC;AAEA,SAASc,OAAOC,GAAW,EAAEC,IAAY;IACvC,IAAIJ,WAAW,IAAI,CAACG,MAAMF,K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