@invinite-org/chartlang-core 1.1.0 → 1.1.1

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 (75) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/alert/alert.d.ts +1 -1
  3. package/dist/alert/alert.js +1 -1
  4. package/dist/alert/alert.js.map +1 -1
  5. package/dist/alert/index.js.map +1 -1
  6. package/dist/color/colorHelpers.js.map +1 -1
  7. package/dist/color/index.js.map +1 -1
  8. package/dist/color/parseColor.js.map +1 -1
  9. package/dist/define/defineAlert.js.map +1 -1
  10. package/dist/define/defineAlertCondition.js.map +1 -1
  11. package/dist/define/defineDrawing.d.ts +2 -2
  12. package/dist/define/defineDrawing.js +2 -2
  13. package/dist/define/defineDrawing.js.map +1 -1
  14. package/dist/define/defineIndicator.js.map +1 -1
  15. package/dist/define/depAccessorSentinel.js.map +1 -1
  16. package/dist/define/dependency.js.map +1 -1
  17. package/dist/define/index.js.map +1 -1
  18. package/dist/define/overrides.js.map +1 -1
  19. package/dist/draw/buckets.js.map +1 -1
  20. package/dist/draw/draw.d.ts +2 -3
  21. package/dist/draw/draw.d.ts.map +1 -1
  22. package/dist/draw/draw.js +1 -2
  23. package/dist/draw/draw.js.map +1 -1
  24. package/dist/draw/drawingKind.d.ts +1 -1
  25. package/dist/draw/drawingKind.js.map +1 -1
  26. package/dist/draw/drawingState.d.ts +5 -5
  27. package/dist/draw/drawingState.js.map +1 -1
  28. package/dist/draw/drawingStyle.d.ts +1 -1
  29. package/dist/draw/drawingStyle.js.map +1 -1
  30. package/dist/draw/handle.js.map +1 -1
  31. package/dist/draw/index.js.map +1 -1
  32. package/dist/draw/table.d.ts +1 -1
  33. package/dist/draw/table.js.map +1 -1
  34. package/dist/draw/worldPoint.js.map +1 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/input/index.js.map +1 -1
  37. package/dist/input/input.js.map +1 -1
  38. package/dist/input/inputDescriptor.js.map +1 -1
  39. package/dist/interval/intervalToSeconds.js.map +1 -1
  40. package/dist/plot/index.js.map +1 -1
  41. package/dist/plot/plot.d.ts +1 -1
  42. package/dist/plot/plot.js +1 -1
  43. package/dist/plot/plot.js.map +1 -1
  44. package/dist/request/index.js.map +1 -1
  45. package/dist/request/request.js.map +1 -1
  46. package/dist/runtime/index.js.map +1 -1
  47. package/dist/runtime/runtime.js.map +1 -1
  48. package/dist/state/index.js.map +1 -1
  49. package/dist/state/mutableSlot.js.map +1 -1
  50. package/dist/state/snapshot.d.ts +5 -5
  51. package/dist/state/snapshot.js.map +1 -1
  52. package/dist/state/state.js.map +1 -1
  53. package/dist/statefulPrimitives.d.ts +1 -1
  54. package/dist/statefulPrimitives.js +1 -1
  55. package/dist/statefulPrimitives.js.map +1 -1
  56. package/dist/ta/index.js.map +1 -1
  57. package/dist/ta/ta.d.ts +41 -41
  58. package/dist/ta/ta.js.map +1 -1
  59. package/dist/time/_lib/dateTimeFormatCache.js.map +1 -1
  60. package/dist/time/index.js.map +1 -1
  61. package/dist/time/nyDayKey.js +2 -2
  62. package/dist/time/nyDayKey.js.map +1 -1
  63. package/dist/time/session.js.map +1 -1
  64. package/dist/time/sessionBoundaries.js +2 -2
  65. package/dist/time/sessionBoundaries.js.map +1 -1
  66. package/dist/time/types.js.map +1 -1
  67. package/dist/time/weekKey.js.map +1 -1
  68. package/dist/time/weekday.js.map +1 -1
  69. package/dist/types.d.ts +1 -1
  70. package/dist/types.js.map +1 -1
  71. package/dist/views/barstate.js.map +1 -1
  72. package/dist/views/index.js.map +1 -1
  73. package/dist/views/syminfo.js.map +1 -1
  74. package/dist/views/timeframe.js.map +1 -1
  75. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"drawingState.js","sourceRoot":"","sources":["../../src/draw/drawingState.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
1
+ {"version":3,"file":"drawingState.js","sourceRoot":"","sources":["../../src/draw/drawingState.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Color, JsonValue, Price, Time } from \"../types.js\";\nimport type {\n ArrowMarkerOpts,\n ArrowOpts,\n BrushStyle,\n FibOpts,\n FrameOpts,\n HighlighterStyle,\n LineDrawStyle,\n PathOpts,\n RegressionTrendOpts,\n ShapeStyle,\n TextOpts,\n} from \"./drawingStyle.js\";\nimport type { TableCell, TablePosition } from \"./table.js\";\nimport type {\n AnchorHept,\n AnchorPair,\n AnchorQuad,\n AnchorQuint,\n AnchorTriple,\n WorldPoint,\n} from \"./worldPoint.js\";\n\n/**\n * Script-mutable metadata fields every {@link DrawingState} variant\n * carries. `name` surfaces in the editor layer; `visible: false` hides\n * the drawing without removing it.\n *\n * @formula N/A — metadata only, no geometry\n * @anchors N/A — script-author metadata\n * @since 0.3\n * @stable\n * @example\n * const m: DrawingMeta = { name: \"Support\", visible: true };\n * void m;\n */\nexport type DrawingMeta = {\n readonly name?: string;\n readonly visible?: boolean;\n};\n\n/**\n * `line` — two-anchor straight line. Carries `extendLeft` /\n * `extendRight` flags so the invinite `ray` / `extended-line` tools\n * collapse into this single kind.\n *\n * @formula identity — segment between `anchors[0]` and `anchors[1]`\n * @anchors anchors: [from, to]\n * @since 0.3\n * @stable\n * @example\n * const s: LineState = {\n * kind: \"line\",\n * anchors: [{ time: 1, price: 1 }, { time: 2, price: 2 }],\n * style: {},\n * };\n * void s;\n */\nexport type LineState = DrawingMeta & {\n readonly kind: \"line\";\n readonly anchors: AnchorPair;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `horizontal-line` — single-price line extending across the chart.\n *\n * @formula identity — horizontal line at `price`\n * @anchors price\n * @since 0.3\n * @stable\n * @example\n * const s: HorizontalLineState = {\n * kind: \"horizontal-line\",\n * price: 100,\n * style: { color: \"#3b82f6\" },\n * };\n * void s;\n */\nexport type HorizontalLineState = DrawingMeta & {\n readonly kind: \"horizontal-line\";\n readonly price: Price;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `horizontal-ray` — single-price ray anchored at a starting time.\n *\n * @formula identity — ray from `anchor` extending right at constant price\n * @anchors anchor\n * @since 0.3\n * @stable\n * @example\n * const s: HorizontalRayState = {\n * kind: \"horizontal-ray\",\n * anchor: { time: 1, price: 100 },\n * style: {},\n * };\n * void s;\n */\nexport type HorizontalRayState = DrawingMeta & {\n readonly kind: \"horizontal-ray\";\n readonly anchor: WorldPoint;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `vertical-line` — single-time line extending across the price axis.\n *\n * @formula identity — vertical line at `time`\n * @anchors time\n * @since 0.3\n * @stable\n * @example\n * const s: VerticalLineState = {\n * kind: \"vertical-line\",\n * time: 1_700_000_000_000,\n * style: {},\n * };\n * void s;\n */\nexport type VerticalLineState = DrawingMeta & {\n readonly kind: \"vertical-line\";\n readonly time: Time;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `cross-line` — orthogonal horizontal + vertical pair through one anchor.\n *\n * @formula identity — crosshair through `anchor`\n * @anchors anchor\n * @since 0.3\n * @stable\n * @example\n * const s: CrossLineState = {\n * kind: \"cross-line\",\n * anchor: { time: 1, price: 1 },\n * style: {},\n * };\n * void s;\n */\nexport type CrossLineState = DrawingMeta & {\n readonly kind: \"cross-line\";\n readonly anchor: WorldPoint;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `trend-angle` — line with an angle annotation read off the two anchors.\n *\n * @formula angle = atan2(Δprice, Δtime)\n * @anchors anchors: [from, to]\n * @since 0.3\n * @stable\n * @example\n * const s: TrendAngleState = {\n * kind: \"trend-angle\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type TrendAngleState = DrawingMeta & {\n readonly kind: \"trend-angle\";\n readonly anchors: AnchorPair;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `rectangle` — axis-aligned filled rectangle defined by two corners.\n *\n * @formula identity — axis-aligned bounding box of `anchors`\n * @anchors anchors: [topLeft, bottomRight] (or any opposite-corner pair)\n * @since 0.3\n * @stable\n * @example\n * const s: RectangleState = {\n * kind: \"rectangle\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type RectangleState = DrawingMeta & {\n readonly kind: \"rectangle\";\n readonly anchors: AnchorPair;\n readonly style: ShapeStyle;\n};\n\n/**\n * `rotated-rectangle` — four-corner rectangle, supports arbitrary rotation.\n *\n * @formula identity — polygon through the four anchor corners\n * @anchors anchors: [c1, c2, c3, c4] (CW or CCW)\n * @since 0.3\n * @stable\n * @example\n * const s: RotatedRectangleState = {\n * kind: \"rotated-rectangle\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0 }, { time: 1, price: -1 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type RotatedRectangleState = DrawingMeta & {\n readonly kind: \"rotated-rectangle\";\n readonly anchors: AnchorQuad;\n readonly style: ShapeStyle;\n};\n\n/**\n * `triangle` — three-vertex polygon.\n *\n * @formula identity — closed polygon through the three anchors\n * @anchors anchors: [v1, v2, v3]\n * @since 0.3\n * @stable\n * @example\n * const s: TriangleState = {\n * kind: \"triangle\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 1 },\n * { time: 2, price: 0 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type TriangleState = DrawingMeta & {\n readonly kind: \"triangle\";\n readonly anchors: AnchorTriple;\n readonly style: ShapeStyle;\n};\n\n/**\n * `polyline` — open polyline of N anchors.\n *\n * @formula identity — N-anchor open polyline\n * @anchors anchors: ReadonlyArray<WorldPoint>\n * @since 0.3\n * @stable\n * @example\n * const s: PolylineState = {\n * kind: \"polyline\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type PolylineState = DrawingMeta & {\n readonly kind: \"polyline\";\n readonly anchors: ReadonlyArray<WorldPoint>;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `circle` — defined by centre + a radius anchor.\n *\n * @formula r = distance(anchors[0], anchors[1])\n * @anchors anchors: [centre, radiusPoint]\n * @since 0.3\n * @stable\n * @example\n * const s: CircleState = {\n * kind: \"circle\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 0 }],\n * style: {},\n * };\n * void s;\n */\nexport type CircleState = DrawingMeta & {\n readonly kind: \"circle\";\n readonly anchors: AnchorPair;\n readonly style: ShapeStyle;\n};\n\n/**\n * `ellipse` — bounding-box anchor pair.\n *\n * @formula ellipse inscribed in the bounding box of `anchors`\n * @anchors anchors: [bboxA, bboxB]\n * @since 0.3\n * @stable\n * @example\n * const s: EllipseState = {\n * kind: \"ellipse\",\n * anchors: [{ time: 0, price: 0 }, { time: 2, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type EllipseState = DrawingMeta & {\n readonly kind: \"ellipse\";\n readonly anchors: AnchorPair;\n readonly style: ShapeStyle;\n};\n\n/**\n * `path` — open or closed polyline with arbitrary anchor count.\n *\n * @formula identity — N-anchor path (closed = `style.closed`)\n * @anchors anchors: ReadonlyArray<WorldPoint>\n * @since 0.3\n * @stable\n * @example\n * const s: PathState = {\n * kind: \"path\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: { closed: true },\n * };\n * void s;\n */\nexport type PathState = DrawingMeta & {\n readonly kind: \"path\";\n readonly anchors: ReadonlyArray<WorldPoint>;\n readonly style: PathOpts;\n};\n\n/**\n * `marker` — single-anchor glyph with optional value label.\n *\n * @formula identity — marker placed at `anchor`\n * @anchors anchor\n * @since 0.3\n * @stable\n * @example\n * const s: MarkerState = {\n * kind: \"marker\",\n * anchor: { time: 1, price: 1 },\n * text: \"B\",\n * style: {},\n * };\n * void s;\n */\nexport type MarkerState = DrawingMeta & {\n readonly kind: \"marker\";\n readonly anchor: WorldPoint;\n readonly text?: string;\n readonly value?: number;\n readonly style: TextOpts;\n};\n\n/**\n * `arc` — three-anchor arc (start / control / end).\n *\n * @formula quadratic Bezier through `anchors`\n * @anchors anchors: [start, control, end]\n * @since 0.3\n * @stable\n * @example\n * const s: ArcState = {\n * kind: \"arc\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 2 },\n * { time: 2, price: 0 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type ArcState = DrawingMeta & {\n readonly kind: \"arc\";\n readonly anchors: AnchorTriple;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `curve` — three-anchor quadratic Bezier.\n *\n * @formula B(t) = (1−t)²·P0 + 2(1−t)t·P1 + t²·P2\n * @anchors anchors: [P0, P1, P2]\n * @since 0.3\n * @stable\n * @example\n * const s: CurveState = {\n * kind: \"curve\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 2 },\n * { time: 2, price: 0 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type CurveState = DrawingMeta & {\n readonly kind: \"curve\";\n readonly anchors: AnchorTriple;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `double-curve` — five-anchor cubic Bezier pair (two stitched curves).\n *\n * @formula two cubic Beziers stitched at `anchors[2]`\n * @anchors anchors: [P0, P1, mid, P3, P4]\n * @since 0.3\n * @stable\n * @example\n * const s: DoubleCurveState = {\n * kind: \"double-curve\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0 }, { time: 3, price: -1 },\n * { time: 4, price: 0 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type DoubleCurveState = DrawingMeta & {\n readonly kind: \"double-curve\";\n readonly anchors: AnchorQuint;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `pen` — freehand polyline.\n *\n * @formula identity — sampled freehand polyline\n * @anchors anchors: ReadonlyArray<WorldPoint>\n * @since 0.3\n * @stable\n * @example\n * const s: PenState = {\n * kind: \"pen\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type PenState = DrawingMeta & {\n readonly kind: \"pen\";\n readonly anchors: ReadonlyArray<WorldPoint>;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `highlighter` — freehand thick translucent stroke.\n *\n * @formula identity — sampled freehand polyline rendered translucent\n * @anchors anchors: ReadonlyArray<WorldPoint>\n * @since 0.3\n * @stable\n * @example\n * const s: HighlighterState = {\n * kind: \"highlighter\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: { color: \"#facc15\", alpha: 0.3 },\n * };\n * void s;\n */\nexport type HighlighterState = DrawingMeta & {\n readonly kind: \"highlighter\";\n readonly anchors: ReadonlyArray<WorldPoint>;\n readonly style: HighlighterStyle;\n};\n\n/**\n * `brush` — freehand stroked-and-filled stroke.\n *\n * @formula identity — sampled freehand polyline rendered stroked + filled\n * @anchors anchors: ReadonlyArray<WorldPoint>\n * @since 0.3\n * @stable\n * @example\n * const s: BrushState = {\n * kind: \"brush\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: { stroke: \"#000\", fill: \"#fff\" },\n * };\n * void s;\n */\nexport type BrushState = DrawingMeta & {\n readonly kind: \"brush\";\n readonly anchors: ReadonlyArray<WorldPoint>;\n readonly style: BrushStyle;\n};\n\n/**\n * `text` — single-anchor text label.\n *\n * @formula identity — `body` rendered at `anchor`\n * @anchors anchor\n * @since 0.3\n * @stable\n * @example\n * const s: TextState = {\n * kind: \"text\",\n * anchor: { time: 1, price: 1 },\n * body: \"Note\",\n * style: {},\n * };\n * void s;\n */\nexport type TextState = DrawingMeta & {\n readonly kind: \"text\";\n readonly anchor: WorldPoint;\n readonly body: string;\n readonly style: TextOpts;\n};\n\n/**\n * `arrow` — two-anchor arrow with optional label.\n *\n * @formula identity — directional arrow from `anchors[0]` → `anchors[1]`\n * @anchors anchors: [tail, head]\n * @since 0.3\n * @stable\n * @example\n * const s: ArrowState = {\n * kind: \"arrow\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type ArrowState = DrawingMeta & {\n readonly kind: \"arrow\";\n readonly anchors: AnchorPair;\n readonly style: ArrowOpts;\n};\n\n/**\n * `arrow-marker` — single-anchor compact arrow + label glyph.\n *\n * @formula identity — arrow glyph at `anchor` with optional text\n * @anchors anchor\n * @since 0.3\n * @stable\n * @example\n * const s: ArrowMarkerState = {\n * kind: \"arrow-marker\",\n * anchor: { time: 1, price: 1 },\n * style: { text: \"B\" },\n * };\n * void s;\n */\nexport type ArrowMarkerState = DrawingMeta & {\n readonly kind: \"arrow-marker\";\n readonly anchor: WorldPoint;\n readonly style: ArrowMarkerOpts;\n};\n\n/**\n * `arrow-mark-up` — bullish marker (typically below the bar).\n *\n * @formula identity — upward marker glyph at `anchor`\n * @anchors anchor\n * @since 0.3\n * @stable\n * @example\n * const s: ArrowMarkUpState = {\n * kind: \"arrow-mark-up\",\n * anchor: { time: 1, price: 1 },\n * style: {},\n * };\n * void s;\n */\nexport type ArrowMarkUpState = DrawingMeta & {\n readonly kind: \"arrow-mark-up\";\n readonly anchor: WorldPoint;\n readonly style: ArrowMarkerOpts;\n};\n\n/**\n * `arrow-mark-down` — bearish marker (typically above the bar).\n *\n * @formula identity — downward marker glyph at `anchor`\n * @anchors anchor\n * @since 0.3\n * @stable\n * @example\n * const s: ArrowMarkDownState = {\n * kind: \"arrow-mark-down\",\n * anchor: { time: 1, price: 1 },\n * style: {},\n * };\n * void s;\n */\nexport type ArrowMarkDownState = DrawingMeta & {\n readonly kind: \"arrow-mark-down\";\n readonly anchor: WorldPoint;\n readonly style: ArrowMarkerOpts;\n};\n\n/**\n * `trend-channel` — two parallel lines defined by three anchors.\n *\n * @formula parallel pair: line(`anchors[0]`, `anchors[1]`) and its\n * translate through `anchors[2]`\n * @anchors anchors: [primaryA, primaryB, parallelHook]\n * @since 0.3\n * @stable\n * @example\n * const s: TrendChannelState = {\n * kind: \"trend-channel\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 1 },\n * { time: 0, price: 1 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type TrendChannelState = DrawingMeta & {\n readonly kind: \"trend-channel\";\n readonly anchors: AnchorTriple;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `flat-top-bottom` — horizontal channel of two parallel flat edges.\n *\n * @formula two horizontal lines at min/max prices from anchors\n * @anchors anchors: [leftEdge, rightEdge, oppositeHook]\n * @since 0.3\n * @stable\n * @example\n * const s: FlatTopBottomState = {\n * kind: \"flat-top-bottom\",\n * anchors: [\n * { time: 0, price: 1 },\n * { time: 1, price: 1 },\n * { time: 0, price: 0 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type FlatTopBottomState = DrawingMeta & {\n readonly kind: \"flat-top-bottom\";\n readonly anchors: AnchorTriple;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `disjoint-channel` — two non-parallel channel edges.\n *\n * @formula two independent line segments — line(A,B) + line(C,D)\n * @anchors anchors: [A, B, C, D]\n * @since 0.3\n * @stable\n * @example\n * const s: DisjointChannelState = {\n * kind: \"disjoint-channel\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 0, price: 2 }, { time: 1, price: 3 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type DisjointChannelState = DrawingMeta & {\n readonly kind: \"disjoint-channel\";\n readonly anchors: AnchorQuad;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `regression-trend` — least-squares fit ± bands across an anchor range.\n *\n * @formula fit = OLS(close[start..end]); bands = fit ± σ·stdevMultiplier\n * @anchors anchors: [start, end]\n * @since 0.3\n * @stable\n * @example\n * const s: RegressionTrendState = {\n * kind: \"regression-trend\",\n * anchors: [{ time: 0, price: 0 }, { time: 100, price: 1 }],\n * style: { source: \"close\", stdevMultiplier: 2 },\n * };\n * void s;\n */\nexport type RegressionTrendState = DrawingMeta & {\n readonly kind: \"regression-trend\";\n readonly anchors: AnchorPair;\n readonly style: RegressionTrendOpts;\n};\n\n/**\n * `fib-retracement` — fib level lines between two pivot anchors.\n *\n * @formula for each level r in `style.levels`: y(r) = A.price + r·(B.price − A.price)\n * @anchors anchors: [swingA, swingB]\n * @since 0.3\n * @stable\n * @example\n * const s: FibRetracementState = {\n * kind: \"fib-retracement\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: { levels: [0.382, 0.5, 0.618] },\n * };\n * void s;\n */\nexport type FibRetracementState = DrawingMeta & {\n readonly kind: \"fib-retracement\";\n readonly anchors: AnchorPair;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-trend-extension` — three-anchor fib extension projection.\n *\n * @formula range r = B−A; projection = C + r·level for level in style.levels\n * @anchors anchors: [A, B, C]\n * @since 0.3\n * @stable\n * @example\n * const s: FibTrendExtensionState = {\n * kind: \"fib-trend-extension\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 1 },\n * { time: 2, price: 0.5 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type FibTrendExtensionState = DrawingMeta & {\n readonly kind: \"fib-trend-extension\";\n readonly anchors: AnchorTriple;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-channel` — fib levels projected as parallel channel lines.\n *\n * @formula parallel translates of line(A,B) at fib-ratio offsets through C\n * @anchors anchors: [A, B, C]\n * @since 0.3\n * @stable\n * @example\n * const s: FibChannelState = {\n * kind: \"fib-channel\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 1 },\n * { time: 0, price: 1 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type FibChannelState = DrawingMeta & {\n readonly kind: \"fib-channel\";\n readonly anchors: AnchorTriple;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-time-zone` — vertical fib zones along the time axis.\n *\n * @formula vertical lines at t = A.time + ratio·(B.time − A.time)\n * @anchors anchors: [A, B]\n * @since 0.3\n * @stable\n * @example\n * const s: FibTimeZoneState = {\n * kind: \"fib-time-zone\",\n * anchors: [{ time: 0, price: 0 }, { time: 100, price: 0 }],\n * style: {},\n * };\n * void s;\n */\nexport type FibTimeZoneState = DrawingMeta & {\n readonly kind: \"fib-time-zone\";\n readonly anchors: AnchorPair;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-wedge` — fib-spaced lines fanned from a single anchor.\n *\n * @formula rays from `anchors[0]` at angles derived from fib ratios\n * @anchors anchors: [pivot, range1, range2]\n * @since 0.3\n * @stable\n * @example\n * const s: FibWedgeState = {\n * kind: \"fib-wedge\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 1 },\n * { time: 1, price: -1 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type FibWedgeState = DrawingMeta & {\n readonly kind: \"fib-wedge\";\n readonly anchors: AnchorTriple;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-speed-fan` — fan of fib-ratio speed lines from a pivot.\n *\n * @formula rays from A with slopes = fib-ratio · slope(line(A,B))\n * @anchors anchors: [A, B]\n * @since 0.3\n * @stable\n * @example\n * const s: FibSpeedFanState = {\n * kind: \"fib-speed-fan\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type FibSpeedFanState = DrawingMeta & {\n readonly kind: \"fib-speed-fan\";\n readonly anchors: AnchorPair;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-speed-arcs` — concentric arcs at fib radii.\n *\n * @formula for each level r in `style.levels`: arc of radius r·|AB| centred at A\n * @anchors anchors: [centre, edge]\n * @since 0.3\n * @stable\n * @example\n * const s: FibSpeedArcsState = {\n * kind: \"fib-speed-arcs\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 0 }],\n * style: {},\n * };\n * void s;\n */\nexport type FibSpeedArcsState = DrawingMeta & {\n readonly kind: \"fib-speed-arcs\";\n readonly anchors: AnchorPair;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-spiral` — fib-ratio logarithmic spiral.\n *\n * @formula r(θ) = a · φ^(θ/π/2) where φ = (1+√5)/2\n * @anchors anchors: [centre, edge]\n * @since 0.3\n * @stable\n * @example\n * const s: FibSpiralState = {\n * kind: \"fib-spiral\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 0 }],\n * style: {},\n * };\n * void s;\n */\nexport type FibSpiralState = DrawingMeta & {\n readonly kind: \"fib-spiral\";\n readonly anchors: AnchorPair;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-circles` — concentric circles at fib radii.\n *\n * @formula for each level r in `style.levels`: circle of radius r·|AB| centred at A\n * @anchors anchors: [centre, edge]\n * @since 0.3\n * @stable\n * @example\n * const s: FibCirclesState = {\n * kind: \"fib-circles\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 0 }],\n * style: {},\n * };\n * void s;\n */\nexport type FibCirclesState = DrawingMeta & {\n readonly kind: \"fib-circles\";\n readonly anchors: AnchorPair;\n readonly style: FibOpts;\n};\n\n/**\n * `fib-trend-time` — fib-spaced vertical time projections from a swing.\n *\n * @formula vertical lines at t = C.time + ratio·(B.time − A.time)\n * @anchors anchors: [A, B, C]\n * @since 0.3\n * @stable\n * @example\n * const s: FibTrendTimeState = {\n * kind: \"fib-trend-time\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 1 },\n * { time: 2, price: 0.5 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type FibTrendTimeState = DrawingMeta & {\n readonly kind: \"fib-trend-time\";\n readonly anchors: AnchorTriple;\n readonly style: FibOpts;\n};\n\n/**\n * `gann-box` — gann ratio grid inside an anchor pair.\n *\n * @formula grid of horizontal + vertical lines at 1/8, 2/8, …, 7/8 of |AB|\n * @anchors anchors: [A, B]\n * @since 0.3\n * @stable\n * @example\n * const s: GannBoxState = {\n * kind: \"gann-box\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type GannBoxState = DrawingMeta & {\n readonly kind: \"gann-box\";\n readonly anchors: AnchorPair;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `gann-square-fixed` — square-of-nine fixed-size grid at an anchor.\n *\n * @formula 9×9 grid centred at `anchor` with fixed step\n * @anchors anchor\n * @since 0.3\n * @stable\n * @example\n * const s: GannSquareFixedState = {\n * kind: \"gann-square-fixed\",\n * anchor: { time: 0, price: 0 },\n * style: {},\n * };\n * void s;\n */\nexport type GannSquareFixedState = DrawingMeta & {\n readonly kind: \"gann-square-fixed\";\n readonly anchor: WorldPoint;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `gann-square` — square-of-nine sized by two anchors.\n *\n * @formula 9×9 grid spanning bbox of `anchors`\n * @anchors anchors: [A, B]\n * @since 0.3\n * @stable\n * @example\n * const s: GannSquareState = {\n * kind: \"gann-square\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type GannSquareState = DrawingMeta & {\n readonly kind: \"gann-square\";\n readonly anchors: AnchorPair;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `gann-fan` — fan of gann-angle lines from a pivot.\n *\n * @formula rays from A at slopes 1×1, 1×2, 2×1, 1×3, 3×1, 1×4, 4×1, 1×8, 8×1\n * @anchors anchors: [pivot, reference]\n * @since 0.3\n * @stable\n * @example\n * const s: GannFanState = {\n * kind: \"gann-fan\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type GannFanState = DrawingMeta & {\n readonly kind: \"gann-fan\";\n readonly anchors: AnchorPair;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `pitchfork` — Andrews pitchfork. The `variant` discriminator collapses\n * the four invinite tools (`standard` / `schiff` / `modifiedSchiff` /\n * `inside`) into one kind.\n *\n * @formula median + two parallels through `anchors[1]` / `anchors[2]`\n * @anchors anchors: [pivot, high, low]; variant: \"standard\"|\"schiff\"|\"modifiedSchiff\"|\"inside\"\n * @since 0.3\n * @stable\n * @example\n * const s: PitchforkState = {\n * kind: \"pitchfork\",\n * variant: \"modifiedSchiff\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 1 },\n * { time: 2, price: 0.5 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type PitchforkState = DrawingMeta & {\n readonly kind: \"pitchfork\";\n readonly anchors: AnchorTriple;\n readonly variant: \"standard\" | \"schiff\" | \"modifiedSchiff\" | \"inside\";\n readonly style: LineDrawStyle;\n};\n\n/**\n * `pitchfan` — fan-variant pitchfork (no median line).\n *\n * @formula rays from `anchors[0]` through `anchors[1]` / `anchors[2]`\n * @anchors anchors: [pivot, high, low]\n * @since 0.3\n * @stable\n * @example\n * const s: PitchfanState = {\n * kind: \"pitchfan\",\n * anchors: [\n * { time: 0, price: 0 },\n * { time: 1, price: 1 },\n * { time: 2, price: 0.5 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type PitchfanState = DrawingMeta & {\n readonly kind: \"pitchfan\";\n readonly anchors: AnchorTriple;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `xabcd-pattern` — harmonic pattern over five anchor pivots.\n *\n * @formula five-leg pattern with fib-ratio retracements between adjacent legs\n * @anchors anchors: [X, A, B, C, D]\n * @since 0.3\n * @stable\n * @example\n * const s: XabcdPatternState = {\n * kind: \"xabcd-pattern\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0.5 }, { time: 3, price: 1.5 },\n * { time: 4, price: 1 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type XabcdPatternState = DrawingMeta & {\n readonly kind: \"xabcd-pattern\";\n readonly anchors: AnchorQuint;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `cypher-pattern` — five-anchor harmonic pattern. Has no standalone\n * invinite tool (Task 20's `defineDrawing` is the only emit path).\n *\n * @formula Cypher: XB at 0.382-0.618 of XA, XC at 1.272-1.414 of XA, XD at 0.786 of XC\n * @anchors anchors: [X, A, B, C, D]\n * @since 0.3\n * @stable\n * @example\n * const s: CypherPatternState = {\n * kind: \"cypher-pattern\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0.4 }, { time: 3, price: 1.3 },\n * { time: 4, price: 0.6 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type CypherPatternState = DrawingMeta & {\n readonly kind: \"cypher-pattern\";\n readonly anchors: AnchorQuint;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `head-and-shoulders` — five-pivot reversal pattern.\n *\n * @formula identity — pivot polyline with neckline at min(anchors[0].price, anchors[4].price)\n * @anchors anchors: [leftShoulderHigh, leftLow, headHigh, rightLow, rightShoulderHigh]\n * @since 0.3\n * @stable\n * @example\n * const s: HeadAndShouldersState = {\n * kind: \"head-and-shoulders\",\n * anchors: [\n * { time: 0, price: 1 }, { time: 1, price: 0 },\n * { time: 2, price: 2 }, { time: 3, price: 0 },\n * { time: 4, price: 1 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type HeadAndShouldersState = DrawingMeta & {\n readonly kind: \"head-and-shoulders\";\n readonly anchors: AnchorQuint;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `abcd-pattern` — four-anchor measured-move pattern.\n *\n * @formula CD = AB projected from C (fib ratio 1.0 default)\n * @anchors anchors: [A, B, C, D]\n * @since 0.3\n * @stable\n * @example\n * const s: AbcdPatternState = {\n * kind: \"abcd-pattern\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0.5 }, { time: 3, price: 1.5 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type AbcdPatternState = DrawingMeta & {\n readonly kind: \"abcd-pattern\";\n readonly anchors: AnchorQuad;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `triangle-pattern` — three-anchor triangle pattern (ascending /\n * descending / symmetrical).\n *\n * @formula identity — three-vertex pattern outline\n * @anchors anchors: [apex, baseHigh, baseLow]\n * @since 0.3\n * @stable\n * @example\n * const s: TrianglePatternState = {\n * kind: \"triangle-pattern\",\n * anchors: [\n * { time: 2, price: 0.5 },\n * { time: 0, price: 1 },\n * { time: 0, price: 0 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type TrianglePatternState = DrawingMeta & {\n readonly kind: \"triangle-pattern\";\n readonly anchors: AnchorTriple;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `three-drives-pattern` — six-leg three-drives reversal pattern.\n *\n * @formula three fib-ratio drives + two corrective retracements\n * @anchors anchors: [start, drive1, retr1, drive2, retr2, drive3, end]\n * @since 0.3\n * @stable\n * @example\n * const s: ThreeDrivesPatternState = {\n * kind: \"three-drives-pattern\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0.5 }, { time: 3, price: 1.5 },\n * { time: 4, price: 1 }, { time: 5, price: 2 },\n * { time: 6, price: 1.5 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type ThreeDrivesPatternState = DrawingMeta & {\n readonly kind: \"three-drives-pattern\";\n readonly anchors: AnchorHept;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `elliott-impulse-wave` — five-wave impulse (1-2-3-4-5).\n *\n * @formula identity — five-pivot polyline; per-leg fib invariants validated\n * in the per-category port (Task 16)\n * @anchors anchors: [wave1End, wave2End, wave3End, wave4End, wave5End]; labels?\n * @since 0.3\n * @stable\n * @example\n * const s: ElliottImpulseWaveState = {\n * kind: \"elliott-impulse-wave\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0.5 }, { time: 3, price: 1.5 },\n * { time: 4, price: 1 },\n * ],\n * labels: [\"1\", \"2\", \"3\", \"4\", \"5\"],\n * style: {},\n * };\n * void s;\n */\nexport type ElliottImpulseWaveState = DrawingMeta & {\n readonly kind: \"elliott-impulse-wave\";\n readonly anchors: AnchorQuint;\n readonly labels?: ReadonlyArray<string>;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `elliott-correction-wave` — three-wave A-B-C correction.\n *\n * @formula identity — three-pivot polyline\n * @anchors anchors: [A, B, C]; labels?\n * @since 0.3\n * @stable\n * @example\n * const s: ElliottCorrectionWaveState = {\n * kind: \"elliott-correction-wave\",\n * anchors: [\n * { time: 0, price: 1 },\n * { time: 1, price: 0 },\n * { time: 2, price: 0.5 },\n * ],\n * labels: [\"A\", \"B\", \"C\"],\n * style: {},\n * };\n * void s;\n */\nexport type ElliottCorrectionWaveState = DrawingMeta & {\n readonly kind: \"elliott-correction-wave\";\n readonly anchors: AnchorTriple;\n readonly labels?: ReadonlyArray<string>;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `elliott-triangle-wave` — five-wave triangle correction.\n *\n * @formula identity — five-pivot polyline matching triangle invariants\n * @anchors anchors: [a, b, c, d, e]; labels?\n * @since 0.3\n * @stable\n * @example\n * const s: ElliottTriangleWaveState = {\n * kind: \"elliott-triangle-wave\",\n * anchors: [\n * { time: 0, price: 1 }, { time: 1, price: 0 },\n * { time: 2, price: 0.8 }, { time: 3, price: 0.2 },\n * { time: 4, price: 0.5 },\n * ],\n * labels: [\"a\", \"b\", \"c\", \"d\", \"e\"],\n * style: {},\n * };\n * void s;\n */\nexport type ElliottTriangleWaveState = DrawingMeta & {\n readonly kind: \"elliott-triangle-wave\";\n readonly anchors: AnchorQuint;\n readonly labels?: ReadonlyArray<string>;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `elliott-double-combo` — seven-anchor W-X-Y double-three.\n *\n * @formula identity — seven-pivot polyline: W three-wave + X + Y three-wave\n * @anchors anchors: [start, W-end, x1, X-end, x2, Y-mid, Y-end]; labels?\n * @since 0.3\n * @stable\n * @example\n * const s: ElliottDoubleComboState = {\n * kind: \"elliott-double-combo\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0.5 }, { time: 3, price: 1.5 },\n * { time: 4, price: 1 }, { time: 5, price: 2 },\n * { time: 6, price: 1.5 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type ElliottDoubleComboState = DrawingMeta & {\n readonly kind: \"elliott-double-combo\";\n readonly anchors: AnchorHept;\n readonly labels?: ReadonlyArray<string>;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `elliott-triple-combo` — seven-anchor W-X-Y-X-Z triple-three.\n *\n * @formula identity — seven-pivot polyline: three corrective patterns joined by X waves\n * @anchors anchors: [start, W-end, X1-end, Y-end, X2-end, Z-mid, Z-end]; labels?\n * @since 0.3\n * @stable\n * @example\n * const s: ElliottTripleComboState = {\n * kind: \"elliott-triple-combo\",\n * anchors: [\n * { time: 0, price: 0 }, { time: 1, price: 1 },\n * { time: 2, price: 0.5 }, { time: 3, price: 1.5 },\n * { time: 4, price: 1 }, { time: 5, price: 2 },\n * { time: 6, price: 1.5 },\n * ],\n * style: {},\n * };\n * void s;\n */\nexport type ElliottTripleComboState = DrawingMeta & {\n readonly kind: \"elliott-triple-combo\";\n readonly anchors: AnchorHept;\n readonly labels?: ReadonlyArray<string>;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `cyclic-lines` — equally spaced vertical lines marking cycle periods.\n *\n * @formula vertical lines at t = A.time + n·(B.time − A.time) for n ∈ ℕ\n * @anchors anchors: [cycleStart, cycleEnd]\n * @since 0.3\n * @stable\n * @example\n * const s: CyclicLinesState = {\n * kind: \"cyclic-lines\",\n * anchors: [{ time: 0, price: 0 }, { time: 100, price: 0 }],\n * style: {},\n * };\n * void s;\n */\nexport type CyclicLinesState = DrawingMeta & {\n readonly kind: \"cyclic-lines\";\n readonly anchors: AnchorPair;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `time-cycles` — concentric semicircles measuring time cycles.\n *\n * @formula semicircles of radius n·|AB| centred at A for n ∈ ℕ\n * @anchors anchors: [centre, edge]\n * @since 0.3\n * @stable\n * @example\n * const s: TimeCyclesState = {\n * kind: \"time-cycles\",\n * anchors: [{ time: 0, price: 0 }, { time: 100, price: 0 }],\n * style: {},\n * };\n * void s;\n */\nexport type TimeCyclesState = DrawingMeta & {\n readonly kind: \"time-cycles\";\n readonly anchors: AnchorPair;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `sine-line` — sinusoidal projection fitted between two anchors.\n *\n * @formula y(t) = (A.price + B.price)/2 + ((B.price − A.price)/2)·sin(2π·(t − A.time)/(B.time − A.time))\n * @anchors anchors: [periodStart, periodEnd]\n * @since 0.3\n * @stable\n * @example\n * const s: SineLineState = {\n * kind: \"sine-line\",\n * anchors: [{ time: 0, price: 0 }, { time: 100, price: 1 }],\n * style: {},\n * };\n * void s;\n */\nexport type SineLineState = DrawingMeta & {\n readonly kind: \"sine-line\";\n readonly anchors: AnchorPair;\n readonly style: LineDrawStyle;\n};\n\n/**\n * `group` — logical container for child drawings. Children are\n * referenced by handle id; rendering is delegated to the children.\n *\n * @formula N/A — pure container; rendering passes through to children\n * @anchors N/A — group carries no geometry, only child references\n * @since 0.3\n * @stable\n * @example\n * const s: GroupState = {\n * kind: \"group\",\n * childHandleIds: [\"h1\", \"h2\"],\n * };\n * void s;\n */\nexport type GroupState = DrawingMeta & {\n readonly kind: \"group\";\n readonly childHandleIds: ReadonlyArray<string>;\n readonly meta?: Readonly<Record<string, JsonValue>>;\n};\n\n/**\n * `frame` — labelled rectangle container around child drawings. Carries\n * a background colour + label per {@link FrameOpts}.\n *\n * @formula identity — labelled bounding rectangle around `childHandleIds`\n * @anchors anchors: [topLeft, bottomRight]\n * @since 0.3\n * @stable\n * @example\n * const s: FrameState = {\n * kind: \"frame\",\n * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],\n * childHandleIds: [],\n * style: { label: \"Idea\" },\n * };\n * void s;\n */\nexport type FrameState = DrawingMeta & {\n readonly kind: \"frame\";\n readonly anchors: AnchorPair;\n readonly childHandleIds: ReadonlyArray<string>;\n readonly style: FrameOpts;\n};\n\n/**\n * `table` — CSS-pixel viewport-anchored dashboard/status panel. It\n * deliberately carries no world-space anchors; adapters resolve\n * `position` against the current viewport.\n *\n * @formula N/A — table layout resolved in CSS pixels by adapter\n * @anchors position: CSS viewport anchor\n * @since 0.5\n * @stable\n * @example\n * const s: TableState = {\n * kind: \"table\",\n * position: \"top-right\",\n * cells: [[{ text: \"P&L\" }, { text: \"+12.5%\", textColor: \"#16a34a\" }]],\n * };\n * void s;\n */\nexport type TableState = DrawingMeta & {\n readonly kind: \"table\";\n readonly position: TablePosition;\n readonly cells: ReadonlyArray<ReadonlyArray<TableCell>>;\n readonly borderColor?: Color;\n readonly borderWidth?: number;\n readonly frame?: Readonly<{ color: Color; width: number }>;\n};\n\n/**\n * Per-kind state union — every {@link DrawingKind} maps to exactly one\n * variant. Collab-only fields (Yjs `id`, `layerId`, `createdAt`,\n * `authorId`, `parentGroupId`, `parentFrameId`, `visibleIntervals`)\n * from the invinite source are stripped.\n *\n * The 62 variants here are intentionally minimal shells. Tasks 5–18\n * (per-category ports) refine each variant's geometry + style payload\n * against the invinite source-of-truth. Exhaustiveness is asserted via\n * the `(k satisfies never)` switch in `drawingState.types.test.ts`.\n *\n * @formula discriminated union — switch on `state.kind` to read variant\n * @anchors per-variant — see the individual `*State` declarations above\n * @since 0.3\n * @stable\n * @example\n * const s: DrawingState = {\n * kind: \"horizontal-line\",\n * price: 100,\n * style: { color: \"#3b82f6\" },\n * };\n * void s;\n */\nexport type DrawingState =\n | LineState\n | HorizontalLineState\n | HorizontalRayState\n | VerticalLineState\n | CrossLineState\n | TrendAngleState\n | RectangleState\n | RotatedRectangleState\n | TriangleState\n | PolylineState\n | CircleState\n | EllipseState\n | PathState\n | MarkerState\n | ArcState\n | CurveState\n | DoubleCurveState\n | PenState\n | HighlighterState\n | BrushState\n | TextState\n | ArrowState\n | ArrowMarkerState\n | ArrowMarkUpState\n | ArrowMarkDownState\n | TrendChannelState\n | FlatTopBottomState\n | DisjointChannelState\n | RegressionTrendState\n | FibRetracementState\n | FibTrendExtensionState\n | FibChannelState\n | FibTimeZoneState\n | FibWedgeState\n | FibSpeedFanState\n | FibSpeedArcsState\n | FibSpiralState\n | FibCirclesState\n | FibTrendTimeState\n | GannBoxState\n | GannSquareFixedState\n | GannSquareState\n | GannFanState\n | PitchforkState\n | PitchfanState\n | XabcdPatternState\n | CypherPatternState\n | HeadAndShouldersState\n | AbcdPatternState\n | TrianglePatternState\n | ThreeDrivesPatternState\n | ElliottImpulseWaveState\n | ElliottCorrectionWaveState\n | ElliottTriangleWaveState\n | ElliottDoubleComboState\n | ElliottTripleComboState\n | CyclicLinesState\n | TimeCyclesState\n | SineLineState\n | GroupState\n | FrameState\n | TableState;\n"]}
@@ -2,7 +2,7 @@ import type { Color, LineStyle } from "../types.js";
2
2
  /**
3
3
  * Line / ray / horizontal-line / vertical-line / channel-edge stroke
4
4
  * style. `extendLeft` / `extendRight` collapse the invinite `ray` and
5
- * `extended-line` tools into a single `line` kind (PLAN.md §3.1).
5
+ * `extended-line` tools into a single `line` kind.
6
6
  *
7
7
  * @formula N/A — style bag, no math
8
8
  * @anchors N/A — style fields only
@@ -1 +1 @@
1
- {"version":3,"file":"drawingStyle.js","sourceRoot":"","sources":["../../src/draw/drawingStyle.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
1
+ {"version":3,"file":"drawingStyle.js","sourceRoot":"","sources":["../../src/draw/drawingStyle.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Color, LineStyle } from \"../types.js\";\n\n/**\n * Line / ray / horizontal-line / vertical-line / channel-edge stroke\n * style. `extendLeft` / `extendRight` collapse the invinite `ray` and\n * `extended-line` tools into a single `line` kind.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const s: LineDrawStyle = { color: \"#3b82f6\", lineWidth: 2, lineStyle: \"solid\" };\n * void s;\n */\nexport type LineDrawStyle = {\n readonly color?: Color;\n readonly lineWidth?: number;\n readonly lineStyle?: LineStyle;\n readonly extendLeft?: boolean;\n readonly extendRight?: boolean;\n};\n\n/**\n * Filled-shape style — rectangles, triangles, ellipses, circles. `fill`\n * is paired with `fillAlpha` for the transparent overlay; `stroke` +\n * `lineStyle` paint the outline.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const s: ShapeStyle = {\n * stroke: \"#3b82f6\",\n * fill: \"#dbeafe\",\n * fillAlpha: 0.4,\n * lineWidth: 1,\n * lineStyle: \"solid\",\n * };\n * void s;\n */\nexport type ShapeStyle = {\n readonly stroke?: Color;\n readonly fill?: Color;\n readonly lineWidth?: number;\n readonly lineStyle?: LineStyle;\n readonly fillAlpha?: number;\n};\n\n/**\n * Highlighter style — single colour with a fixed alpha. Used by the\n * `highlighter` freehand kind.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const s: HighlighterStyle = { color: \"#facc15\", alpha: 0.3 };\n * void s;\n */\nexport type HighlighterStyle = {\n readonly color: Color;\n readonly alpha: number;\n};\n\n/**\n * Brush stroke style — stroke + fill pair. Used by the `brush`\n * freehand kind.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const s: BrushStyle = { stroke: \"#000000\", fill: \"#ffffff\" };\n * void s;\n */\nexport type BrushStyle = {\n readonly stroke: Color;\n readonly fill: Color;\n};\n\n/**\n * Text annotation style. Used by the `text` annotation kind and as\n * the base for `marker` / `arrow-mark-up` / `arrow-mark-down` labels.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const t: TextOpts = {\n * color: \"#1e293b\",\n * size: \"normal\",\n * halign: \"center\",\n * valign: \"middle\",\n * bgColor: \"#fef3c7\",\n * };\n * void t;\n */\nexport type TextOpts = {\n readonly color?: Color;\n readonly size?: \"tiny\" | \"small\" | \"normal\" | \"large\" | \"huge\";\n readonly halign?: \"left\" | \"center\" | \"right\";\n readonly valign?: \"top\" | \"middle\" | \"bottom\";\n readonly bgColor?: Color;\n};\n\n/**\n * Arrow annotation style — a `LineDrawStyle` plus an optional label.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const a: ArrowOpts = { color: \"#dc2626\", lineWidth: 2, label: \"Sell\" };\n * void a;\n */\nexport type ArrowOpts = LineDrawStyle & {\n readonly label?: string;\n};\n\n/**\n * Arrow-marker style — used by `arrow-marker` / `arrow-mark-up` /\n * `arrow-mark-down` annotations. Compact glyph + optional one-line\n * text.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const m: ArrowMarkerOpts = { color: \"#10b981\", text: \"Long\" };\n * void m;\n */\nexport type ArrowMarkerOpts = {\n readonly color?: Color;\n readonly text?: string;\n};\n\n/**\n * Path style — open or closed polyline of arbitrary anchor count.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const p: PathOpts = { color: \"#3b82f6\", lineWidth: 1, closed: true };\n * void p;\n */\nexport type PathOpts = LineDrawStyle & {\n readonly closed?: boolean;\n};\n\n/**\n * Fibonacci-family style. `levels` defaults to the canonical\n * 0.236 / 0.382 / 0.5 / 0.618 / 0.786 / 1.0 / 1.272 / 1.618 / 2.618 /\n * 4.236 array when omitted; `showLabels` toggles per-level text.\n * `extendLeft` / `extendRight` apply to the level lines (mirrors the\n * `LineDrawStyle` collapse for parity).\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const f: FibOpts = {\n * levels: [0.382, 0.5, 0.618],\n * showLabels: true,\n * color: \"#facc15\",\n * extendRight: true,\n * };\n * void f;\n */\nexport type FibOpts = {\n readonly levels?: ReadonlyArray<number>;\n readonly showLabels?: boolean;\n readonly color?: Color;\n readonly extendLeft?: boolean;\n readonly extendRight?: boolean;\n};\n\n/**\n * Regression-trend style — a least-squares fit through a price series\n * with optional ±N·σ bands. `source` picks the OHLC derived series.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const r: RegressionTrendOpts = {\n * source: \"close\",\n * stdevMultiplier: 2,\n * showUpperBand: true,\n * showLowerBand: true,\n * color: \"#3b82f6\",\n * };\n * void r;\n */\nexport type RegressionTrendOpts = {\n readonly source?: \"close\" | \"open\" | \"high\" | \"low\" | \"hl2\" | \"hlc3\" | \"ohlc4\" | \"hlcc4\";\n readonly stdevMultiplier?: number;\n readonly showUpperBand?: boolean;\n readonly showLowerBand?: boolean;\n readonly color?: Color;\n};\n\n/**\n * Frame container style — the labelled rectangle that groups child\n * drawings visually. The label appears in the top-left of the frame\n * unless the adapter chooses otherwise.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.3\n * @stable\n * @example\n * const f: FrameOpts = { label: \"Trade idea\", bgColor: \"#f1f5f9\" };\n * void f;\n */\nexport type FrameOpts = {\n readonly label?: string;\n readonly bgColor?: Color;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"handle.js","sourceRoot":"","sources":["../../src/draw/handle.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
1
+ {"version":3,"file":"handle.js","sourceRoot":"","sources":["../../src/draw/handle.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { DrawingState } from \"./drawingState.js\";\n\n/**\n * Script-facing handle returned by every `draw.<kind>(...)` call. The\n * runtime keys handles by `slotId#subId` so a script's `for` loop\n * emitting N drawings gets N stable cross-bar handles — same loop\n * iteration across bars yields the same handle.\n *\n * `update(patch)` re-emits the FULL merged state under `op: \"update\"`\n * (the patch is merged with the handle's current `DrawingState` in the\n * runtime); `remove()` emits one final `op: \"remove\"` with the last\n * known state. The impl lives in\n * `@invinite-org/chartlang-runtime/emit/draw/handle.ts` (Task 3).\n *\n * @formula N/A — handle is an opaque script-facing object\n * @anchors id (slotId#subId), update(patch), remove()\n * @since 0.3\n * @stable\n * @example\n * // Inside a compiled `compute`:\n * // const h = draw.horizontalLine(supportLevel);\n * // h.update({ price: nextLevel });\n * // h.remove();\n * import type { DrawingHandle } from \"@invinite-org/chartlang-core\";\n * const _shape: DrawingHandle | null = null;\n * void _shape;\n */\nexport type DrawingHandle = {\n readonly id: string;\n update(patch: Partial<DrawingState>): void;\n remove(): void;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/draw/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA0FtD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/draw/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA0FtD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nexport { DRAWING_KINDS, KIND_CAMELCASE, KIND_KEBABCASE } from \"./drawingKind.js\";\nexport type { DrawingKind } from \"./drawingKind.js\";\nexport { bucketFor, KIND_BUCKET } from \"./buckets.js\";\nexport type { DrawingBucket } from \"./buckets.js\";\nexport type {\n AnchorHept,\n AnchorPair,\n AnchorQuad,\n AnchorQuint,\n AnchorTriple,\n WorldPoint,\n} from \"./worldPoint.js\";\nexport type {\n ArrowMarkerOpts,\n ArrowOpts,\n BrushStyle,\n FibOpts,\n FrameOpts,\n HighlighterStyle,\n LineDrawStyle,\n PathOpts,\n RegressionTrendOpts,\n ShapeStyle,\n TextOpts,\n} from \"./drawingStyle.js\";\nexport type {\n AbcdPatternState,\n ArcState,\n ArrowMarkDownState,\n ArrowMarkUpState,\n ArrowMarkerState,\n ArrowState,\n BrushState,\n CircleState,\n CrossLineState,\n CurveState,\n CyclicLinesState,\n CypherPatternState,\n DisjointChannelState,\n DoubleCurveState,\n DrawingMeta,\n DrawingState,\n ElliottCorrectionWaveState,\n ElliottDoubleComboState,\n ElliottImpulseWaveState,\n ElliottTripleComboState,\n ElliottTriangleWaveState,\n EllipseState,\n FibChannelState,\n FibCirclesState,\n FibRetracementState,\n FibSpeedArcsState,\n FibSpeedFanState,\n FibSpiralState,\n FibTimeZoneState,\n FibTrendExtensionState,\n FibTrendTimeState,\n FibWedgeState,\n FlatTopBottomState,\n FrameState,\n GannBoxState,\n GannFanState,\n GannSquareFixedState,\n GannSquareState,\n GroupState,\n HeadAndShouldersState,\n HighlighterState,\n HorizontalLineState,\n HorizontalRayState,\n LineState,\n MarkerState,\n PathState,\n PenState,\n PitchfanState,\n PitchforkState,\n PolylineState,\n RectangleState,\n RegressionTrendState,\n RotatedRectangleState,\n SineLineState,\n TableState,\n TextState,\n ThreeDrivesPatternState,\n TimeCyclesState,\n TrendAngleState,\n TrendChannelState,\n TriangleState,\n TrianglePatternState,\n VerticalLineState,\n XabcdPatternState,\n} from \"./drawingState.js\";\nexport type { DrawingHandle } from \"./handle.js\";\nexport { table } from \"./table.js\";\nexport type { TableCell, TableOpts, TablePosition } from \"./table.js\";\nexport { draw } from \"./draw.js\";\nexport type { DrawNamespace } from \"./draw.js\";\n"]}
@@ -3,7 +3,7 @@ import type { DrawingHandle } from "./handle.js";
3
3
  /**
4
4
  * CSS-pixel viewport anchor used by `draw.table`. Tables are status
5
5
  * panels, not world-space drawings, so the position resolves against
6
- * the adapter viewport per PLAN.md §10.2.
6
+ * the adapter viewport.
7
7
  *
8
8
  * @formula N/A — viewport anchor enum
9
9
  * @anchors CSS viewport edge/corner/center
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/draw/table.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AA8E/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,KAAK,CAAC,KAAgB;IAClC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;AAClE,CAAC"}
1
+ {"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/draw/table.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AA8E/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,KAAK,CAAC,KAAgB;IAClC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;AAClE,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Color } from \"../types.js\";\nimport type { DrawingHandle } from \"./handle.js\";\n\n/**\n * CSS-pixel viewport anchor used by `draw.table`. Tables are status\n * panels, not world-space drawings, so the position resolves against\n * the adapter viewport.\n *\n * @formula N/A — viewport anchor enum\n * @anchors CSS viewport edge/corner/center\n * @since 0.5\n * @stable\n * @example\n * const position: TablePosition = \"top-right\";\n * void position;\n */\nexport type TablePosition =\n | \"top-left\"\n | \"top-center\"\n | \"top-right\"\n | \"middle-left\"\n | \"middle-center\"\n | \"middle-right\"\n | \"bottom-left\"\n | \"bottom-center\"\n | \"bottom-right\";\n\n/**\n * One cell in a `draw.table` dashboard. Text is required; styling\n * fields are optional and interpreted by the target adapter.\n *\n * @formula N/A — viewport table cell payload\n * @anchors table grid cell\n * @since 0.5\n * @stable\n * @example\n * const cell: TableCell = {\n * text: \"P&L\",\n * textColor: \"#16a34a\",\n * textHalign: \"right\",\n * };\n * void cell;\n */\nexport type TableCell = Readonly<{\n text: string;\n bgColor?: Color;\n textColor?: Color;\n textHalign?: \"left\" | \"center\" | \"right\";\n textValign?: \"top\" | \"middle\" | \"bottom\";\n textSize?: \"tiny\" | \"small\" | \"normal\" | \"large\" | \"huge\";\n}>;\n\n/**\n * Options accepted by `draw.table`.\n *\n * @formula N/A — viewport table payload\n * @anchors position: CSS viewport anchor; cells: 2D table grid\n * @since 0.5\n * @stable\n * @example\n * const opts: TableOpts = {\n * position: \"top-right\",\n * cells: [[{ text: \"P&L\" }, { text: \"+12.5%\", textColor: \"#16a34a\" }]],\n * borderColor: \"#94a3b8\",\n * borderWidth: 1,\n * };\n * void opts;\n */\nexport type TableOpts = Readonly<{\n position: TablePosition;\n cells: ReadonlyArray<ReadonlyArray<TableCell>>;\n borderColor?: Color;\n borderWidth?: number;\n frame?: Readonly<{ color: Color; width: number }>;\n}>;\n\n/**\n * Compile-time callable hole. The runtime swaps this for the slot-id\n * aware implementation, and the compiler injects the callsite id into\n * every script-side `draw.table(opts)` call.\n *\n * @formula N/A — compiler/runtime primitive seam\n * @anchors position + cells, viewport anchored\n * @since 0.5\n * @stable\n * @example\n * // Inside compute:\n * // const h = draw.table({\n * // position: \"top-right\",\n * // cells: [[{ text: \"P&L\" }, { text: \"+12.5%\", textColor: \"#16a34a\" }]],\n * // });\n */\nexport function table(_opts: TableOpts): DrawingHandle {\n throw new Error(\"draw.table called outside compiled runtime\");\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"worldPoint.js","sourceRoot":"","sources":["../../src/draw/worldPoint.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
1
+ {"version":3,"file":"worldPoint.js","sourceRoot":"","sources":["../../src/draw/worldPoint.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Price, Time } from \"../types.js\";\n\n/**\n * World coordinate — `(time, price)` is the only persisted frame for\n * drawings. The adapter projects to its own pixel space when rendering.\n *\n * @formula identity — no transform; world-space (time, price) tuple\n * @anchors time, price\n * @since 0.3\n * @stable\n * @example\n * const anchor: WorldPoint = { time: 1_700_000_000_000, price: 42.31 };\n * void anchor;\n */\nexport type WorldPoint = {\n readonly time: Time;\n readonly price: Price;\n};\n\n/**\n * Two anchor points — e.g. the two endpoints of a line, the two corners\n * of an axis-aligned rectangle.\n *\n * @formula identity — readonly tuple of two `WorldPoint`s\n * @anchors [WorldPoint, WorldPoint]\n * @since 0.3\n * @stable\n * @example\n * const segment: AnchorPair = [\n * { time: 1_700_000_000_000, price: 100 },\n * { time: 1_700_086_400_000, price: 110 },\n * ];\n * void segment;\n */\nexport type AnchorPair = readonly [WorldPoint, WorldPoint];\n\n/**\n * Three anchor points — e.g. triangle vertices, pitchfork pivot + two\n * extreme highs/lows.\n *\n * @formula identity — readonly tuple of three `WorldPoint`s\n * @anchors [WorldPoint, WorldPoint, WorldPoint]\n * @since 0.3\n * @stable\n * @example\n * const tri: AnchorTriple = [\n * { time: 1, price: 1 },\n * { time: 2, price: 2 },\n * { time: 3, price: 1 },\n * ];\n * void tri;\n */\nexport type AnchorTriple = readonly [WorldPoint, WorldPoint, WorldPoint];\n\n/**\n * Four anchor points — e.g. ABCD harmonic pattern legs, rotated\n * rectangle corners.\n *\n * @formula identity — readonly tuple of four `WorldPoint`s\n * @anchors [WorldPoint × 4]\n * @since 0.3\n * @stable\n * @example\n * const abcd: AnchorQuad = [\n * { time: 1, price: 1 },\n * { time: 2, price: 2 },\n * { time: 3, price: 1.5 },\n * { time: 4, price: 3 },\n * ];\n * void abcd;\n */\nexport type AnchorQuad = readonly [WorldPoint, WorldPoint, WorldPoint, WorldPoint];\n\n/**\n * Five anchor points — e.g. XABCD harmonic pattern legs,\n * head-and-shoulders pivots, Elliott impulse waves.\n *\n * @formula identity — readonly tuple of five `WorldPoint`s\n * @anchors [WorldPoint × 5]\n * @since 0.3\n * @stable\n * @example\n * const xabcd: AnchorQuint = [\n * { time: 1, price: 1 },\n * { time: 2, price: 2 },\n * { time: 3, price: 1.5 },\n * { time: 4, price: 3 },\n * { time: 5, price: 2 },\n * ];\n * void xabcd;\n */\nexport type AnchorQuint = readonly [WorldPoint, WorldPoint, WorldPoint, WorldPoint, WorldPoint];\n\n/**\n * Seven anchor points — e.g. Elliott triple-combo legs, double-curve\n * control points.\n *\n * @formula identity — readonly tuple of seven `WorldPoint`s\n * @anchors [WorldPoint × 7]\n * @since 0.3\n * @stable\n * @example\n * const triple: AnchorHept = [\n * { time: 1, price: 1 }, { time: 2, price: 2 },\n * { time: 3, price: 1.5 }, { time: 4, price: 3 },\n * { time: 5, price: 2 }, { time: 6, price: 4 },\n * { time: 7, price: 3 },\n * ];\n * void triple;\n */\nexport type AnchorHept = readonly [\n WorldPoint,\n WorldPoint,\n WorldPoint,\n WorldPoint,\n WorldPoint,\n WorldPoint,\n WorldPoint,\n];\n"]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AA4B/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EACH,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,eAAe,GAClB,MAAM,mBAAmB,CAAC;AAY3B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAuInC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAmBzC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAQzC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,E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,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EACH,aAAa,EACb,WAAW,EACX,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,GACP,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nexport type {\n AlertSeverity,\n AlertConditionDefinition,\n AlertConditionDescriptor,\n Bar,\n BarViewport,\n CapabilityId,\n Color,\n CompiledScriptBundle,\n CompiledScriptObject,\n ComputeContext,\n ComputeFn,\n DrawingCounts,\n InputSchema,\n IntervalDescriptor,\n JsonValue,\n LineStyle,\n PlotLineStyle,\n PlotOverride,\n PlotSlotDescriptor,\n Price,\n ScriptManifest,\n Series,\n Time,\n Volume,\n} from \"./types.js\";\nexport { isCompiledScriptBundle } from \"./types.js\";\nexport { intervalToSeconds } from \"./interval/intervalToSeconds.js\";\nexport {\n defineAlert,\n defineAlertCondition,\n defineDrawing,\n defineIndicator,\n} from \"./define/index.js\";\nexport type {\n DefineAlertConditionOpts,\n DefineAlertOpts,\n DefineDrawingOpts,\n DefineIndicatorOpts,\n DependencyDeclaration,\n OutputDeclaration,\n ScaleAxis,\n ScriptOverrides,\n ValueFormat,\n} from \"./define/index.js\";\nexport { ta } from \"./ta/index.js\";\nexport type {\n AdlOpts,\n AdrOpts,\n AdxOpts,\n AlmaOpts,\n AnchoredVolumeProfileOpts,\n AnchoredVolumeProfileResult,\n AnchoredVwapOpts,\n AoOpts,\n AroonOpts,\n AroonOscOpts,\n AroonResult,\n AtrOpts,\n BarssinceOpts,\n BbOpts,\n BbPercentBOpts,\n BbResult,\n BbwOpts,\n BopOpts,\n CciOpts,\n ChandeKrollStopOpts,\n ChandeKrollStopResult,\n ChandelierOpts,\n ChaikinOscOpts,\n ChandelierResult,\n ChangeOpts,\n ChopOpts,\n CmfOpts,\n CmoOpts,\n ConnorsRsiOpts,\n CoppockOpts,\n CrossoverOpts,\n CrossunderOpts,\n DemaOpts,\n DmiOpts,\n DmiResult,\n DonchianOpts,\n DonchianResult,\n DpoOpts,\n EmaOpts,\n EomOpts,\n EnvelopeOpts,\n EnvelopeResult,\n FisherOpts,\n FisherResult,\n FixedRangeVolumeProfileOpts,\n FixedRangeVolumeProfileResult,\n HighestOpts,\n HmaOpts,\n HvOpts,\n IchimokuOpts,\n IchimokuResult,\n KamaOpts,\n KeltnerOpts,\n KeltnerResult,\n KlingerOpts,\n KlingerResult,\n KstOpts,\n KstResult,\n LowestOpts,\n LsmaOpts,\n MacdOpts,\n MacdResult,\n MaRibbonOpts,\n MaRibbonResult,\n MassIndexOpts,\n MaTypeNoVolume,\n McginleyOpts,\n MedianOpts,\n MfiOpts,\n MomentumOpts,\n NetVolumeOpts,\n NviOpts,\n ObvOpts,\n PivotsHighLowOpts,\n PivotsHighLowResult,\n PivotsStandardOpts,\n PivotsStandardResult,\n PivotsStandardSystem,\n PmoOpts,\n PmoResult,\n PpoOpts,\n PpoResult,\n PsarOpts,\n PsarResult,\n PviOpts,\n PvoOpts,\n PvoResult,\n PvtOpts,\n RocOpts,\n RsiOpts,\n RvgiOpts,\n RvgiResult,\n RviOpts,\n SessionVolumeProfileOpts,\n SessionVolumeProfileResult,\n SmaOpts,\n SmiOpts,\n SmiResult,\n SmmaOpts,\n StdevOpts,\n StochOpts,\n StochResult,\n StochRsiOpts,\n StochRsiResult,\n SupertrendOpts,\n SupertrendResult,\n TaNamespace,\n TemaOpts,\n TrendStrengthIndexOpts,\n TrixOpts,\n TrixResult,\n TsiOpts,\n TsiResult,\n UlcerIndexOpts,\n UltimateOscOpts,\n ValuewhenOpts,\n VolOpts,\n VolatilityStopOpts,\n VolatilityStopResult,\n VortexOpts,\n VortexResult,\n VisibleRangeVolumeProfileOpts,\n VisibleRangeVolumeProfileResult,\n VwapOpts,\n VwmaOpts,\n WilliamsFractalOpts,\n WilliamsFractalResult,\n WilliamsROpts,\n WmaOpts,\n ZigZagOpts,\n ZigZagResult,\n} from \"./ta/ta.js\";\nexport type { StatefulPrimitiveEntry } from \"./statefulPrimitives.js\";\nexport { input } from \"./input/index.js\";\nexport type {\n BoolDescriptor,\n ColorDescriptor,\n EnumDescriptor,\n ExternalSeriesDescriptor,\n FloatDescriptor,\n InputDescriptor,\n InputKind,\n IntDescriptor,\n IntervalDescriptorInput,\n PriceDescriptor,\n Schema,\n SourceDescriptor,\n SourceField,\n StringDescriptor,\n SymbolDescriptor,\n TimeDescriptor,\n} from \"./input/index.js\";\nexport { state } from \"./state/index.js\";\nexport type { MutableSlot, StateNamespace } from \"./state/index.js\";\nexport type {\n RunnerSnapshot,\n StateSnapshot,\n StateStoreKey,\n StreamSnapshot,\n} from \"./state/index.js\";\nexport { barstate, syminfo, timeframe } from \"./views/index.js\";\nexport type { BarStateView, SymbolType, SymInfoView, TimeframeView } from \"./views/index.js\";\nexport { request } from \"./request/index.js\";\nexport type {\n RequestLowerTfOpts,\n RequestNamespace,\n RequestSecurityOpts,\n SecurityBar,\n} from \"./request/index.js\";\nexport { runtime } from \"./runtime/index.js\";\nexport type { LogLevel, RuntimeNamespace } from \"./runtime/index.js\";\nexport { color, fromGradient, hsl, rgb, withAlpha } from \"./color/index.js\";\nexport type { GradientStop } from \"./color/index.js\";\nexport { hline, plot } from \"./plot/index.js\";\nexport type { HLineOpts, PlotKind, PlotOpts, PlotOptsStyle } from \"./plot/plot.js\";\nexport { alert } from \"./alert/index.js\";\nexport type { AlertOpts } from \"./alert/alert.js\";\nexport { STATEFUL_PRIMITIVES, STATEFUL_PRIMITIVES_BY_NAME } from \"./statefulPrimitives.js\";\nexport {\n DRAWING_KINDS,\n KIND_BUCKET,\n KIND_CAMELCASE,\n KIND_KEBABCASE,\n bucketFor,\n draw,\n} from \"./draw/index.js\";\nexport type {\n AbcdPatternState,\n AnchorHept,\n AnchorPair,\n AnchorQuad,\n AnchorQuint,\n AnchorTriple,\n ArcState,\n ArrowMarkDownState,\n ArrowMarkUpState,\n ArrowMarkerOpts,\n ArrowMarkerState,\n ArrowOpts,\n ArrowState,\n BrushState,\n BrushStyle,\n CircleState,\n CrossLineState,\n CurveState,\n CyclicLinesState,\n CypherPatternState,\n DisjointChannelState,\n DoubleCurveState,\n DrawNamespace,\n DrawingBucket,\n DrawingHandle,\n DrawingKind,\n DrawingMeta,\n DrawingState,\n ElliottCorrectionWaveState,\n ElliottDoubleComboState,\n ElliottImpulseWaveState,\n ElliottTriangleWaveState,\n ElliottTripleComboState,\n EllipseState,\n FibChannelState,\n FibCirclesState,\n FibOpts,\n FibRetracementState,\n FibSpeedArcsState,\n FibSpeedFanState,\n FibSpiralState,\n FibTimeZoneState,\n FibTrendExtensionState,\n FibTrendTimeState,\n FibWedgeState,\n FlatTopBottomState,\n FrameOpts,\n FrameState,\n GannBoxState,\n GannFanState,\n GannSquareFixedState,\n GannSquareState,\n GroupState,\n HeadAndShouldersState,\n HighlighterState,\n HighlighterStyle,\n HorizontalLineState,\n HorizontalRayState,\n LineDrawStyle,\n LineState,\n MarkerState,\n PathOpts,\n PathState,\n PenState,\n PitchfanState,\n PitchforkState,\n PolylineState,\n RectangleState,\n RegressionTrendOpts,\n RegressionTrendState,\n RotatedRectangleState,\n ShapeStyle,\n SineLineState,\n TableCell,\n TableOpts,\n TablePosition,\n TableState,\n TextOpts,\n TextState,\n ThreeDrivesPatternState,\n TimeCyclesState,\n TrendAngleState,\n TrendChannelState,\n TriangleState,\n TrianglePatternState,\n VerticalLineState,\n WorldPoint,\n XabcdPatternState,\n} from \"./draw/index.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/input/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nexport { input } from \"./input.js\";\nexport type {\n BoolDescriptor,\n ColorDescriptor,\n EnumDescriptor,\n ExternalSeriesDescriptor,\n FloatDescriptor,\n InputDescriptor,\n InputKind,\n IntDescriptor,\n IntervalDescriptorInput,\n PriceDescriptor,\n Schema,\n SourceDescriptor,\n SourceField,\n StringDescriptor,\n SymbolDescriptor,\n TimeDescriptor,\n} from \"./inputDescriptor.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/input/input.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAoB/D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/B;;;;;;;;OAQG;IACH,GAAG,CACC,YAAoB,EACpB,IAKC;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAc,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CACD,YAAoB,EACpB,IAKC;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAgB,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,YAAqB,EAAE,IAAkC;QAC1D,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACF,YAAoB,EACpB,IAAgE;QAE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;;;OAQG;IACH,MAAM,CAAC,YAAoB,EAAE,IAAkC;QAC3D,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAiB,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAoB,EAAE,IAAkC;QAC7D,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,UAAmB,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,cAAc,CAAI,IAIjB;QACG,OAAO,MAAM,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,iBAA0B;YAChC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;SAC7D,CAAC,CAAC;IACP,CAAC;CACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Color, Price, Time } from \"../types.js\";\nimport type {\n BoolDescriptor,\n ColorDescriptor,\n EnumDescriptor,\n ExternalSeriesDescriptor,\n FloatDescriptor,\n IntDescriptor,\n IntervalDescriptorInput,\n PriceDescriptor,\n Schema,\n SourceDescriptor,\n SourceField,\n StringDescriptor,\n SymbolDescriptor,\n TimeDescriptor,\n} from \"./inputDescriptor.js\";\n\n/**\n * The `input.*` namespace. Every builder is a compile-time literal: the\n * compiler reads the call expression and serialises the descriptor into\n * `manifest.inputs`.\n *\n * @since 0.4\n * @stable\n * @example\n * import { input } from \"@invinite-org/chartlang-core\";\n * const length = input.int(20, { min: 1, max: 200, title: \"Length\" });\n * void length;\n */\nexport const input = Object.freeze({\n /**\n * Build an integer input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const length = input.int(20, { min: 1, max: 200 });\n * void length;\n */\n int(\n defaultValue: number,\n opts?: {\n readonly min?: number;\n readonly max?: number;\n readonly step?: number;\n readonly title?: string;\n },\n ): IntDescriptor {\n return Object.freeze({ kind: \"int\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a floating-point input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const multiplier = input.float(2.5, { step: 0.5 });\n * void multiplier;\n */\n float(\n defaultValue: number,\n opts?: {\n readonly min?: number;\n readonly max?: number;\n readonly step?: number;\n readonly title?: string;\n },\n ): FloatDescriptor {\n return Object.freeze({ kind: \"float\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a boolean input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const enabled = input.bool(true);\n * void enabled;\n */\n bool(defaultValue: boolean, opts?: { readonly title?: string }): BoolDescriptor {\n return Object.freeze({ kind: \"bool\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a string input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const symbol = input.string(\"AAPL\");\n * void symbol;\n */\n string(\n defaultValue: string,\n opts?: { readonly title?: string; readonly multiline?: boolean },\n ): StringDescriptor {\n return Object.freeze({ kind: \"string\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a string enum input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const mode = input.enum(\"fast\", [\"fast\", \"slow\"]);\n * void mode;\n */\n enum<T extends string>(\n defaultValue: T,\n options: ReadonlyArray<T>,\n opts?: { readonly title?: string },\n ): EnumDescriptor<T> {\n return Object.freeze({\n kind: \"enum\" as const,\n defaultValue,\n options: Object.freeze(options.slice()),\n ...opts,\n });\n },\n\n /**\n * Build a color input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const c = input.color(\"#26a69a\");\n * void c;\n */\n color(defaultValue: Color, opts?: { readonly title?: string }): ColorDescriptor {\n return Object.freeze({ kind: \"color\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a source-field input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const source = input.source(\"close\");\n * void source;\n */\n source(defaultValue: SourceField, opts?: { readonly title?: string }): SourceDescriptor {\n return Object.freeze({ kind: \"source\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a time input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const anchor = input.time(1_700_000_000_000, { pickFromChart: true });\n * void anchor;\n */\n time(\n defaultValue: Time,\n opts?: { readonly title?: string; readonly pickFromChart?: boolean },\n ): TimeDescriptor {\n return Object.freeze({ kind: \"time\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a price input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const level = input.price(101.25);\n * void level;\n */\n price(defaultValue: Price, opts?: { readonly title?: string }): PriceDescriptor {\n return Object.freeze({ kind: \"price\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a symbol input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const ticker = input.symbol(\"AAPL\");\n * void ticker;\n */\n symbol(defaultValue: string, opts?: { readonly title?: string }): SymbolDescriptor {\n return Object.freeze({ kind: \"symbol\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build a main-interval input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const interval = input.interval(\"1D\");\n * void interval;\n */\n interval(defaultValue: string, opts?: { readonly title?: string }): IntervalDescriptorInput {\n return Object.freeze({ kind: \"interval\" as const, defaultValue, ...opts });\n },\n\n /**\n * Build an adapter-supplied external series input descriptor.\n *\n * @since 0.4\n * @stable\n * @example\n * const earnings = input.externalSeries({\n * name: \"earnings\",\n * schema: { kind: \"external-series-schema\" },\n * });\n * void earnings;\n */\n externalSeries<T>(args: {\n readonly name: string;\n readonly schema: Schema<T>;\n readonly title?: string;\n }): ExternalSeriesDescriptor<T> {\n return Object.freeze({\n kind: \"external-series\" as const,\n name: args.name,\n schema: args.schema,\n ...(args.title === undefined ? {} : { title: args.title }),\n });\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"inputDescriptor.js","sourceRoot":"","sources":["../../src/input/inputDescriptor.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
1
+ {"version":3,"file":"inputDescriptor.js","sourceRoot":"","sources":["../../src/input/inputDescriptor.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Color } from \"../types.js\";\n\n/**\n * Wire-tagged discriminator for every `input.*` descriptor. Mirrors the\n * adapter-kit `InputKind` alias; the two live in lockstep.\n *\n * @since 0.4\n * @stable\n * @example\n * const k: InputKind = \"int\";\n * void k;\n */\nexport type InputKind =\n | \"int\"\n | \"float\"\n | \"bool\"\n | \"string\"\n | \"enum\"\n | \"color\"\n | \"source\"\n | \"time\"\n | \"price\"\n | \"symbol\"\n | \"interval\"\n | \"external-series\";\n\n/**\n * Source-field literal for the pre-computed bar sources the runtime\n * populates per close.\n *\n * @since 0.4\n * @stable\n * @example\n * const f: SourceField = \"hlc3\";\n * void f;\n */\nexport type SourceField = \"open\" | \"high\" | \"low\" | \"close\" | \"hl2\" | \"hlc3\" | \"ohlc4\" | \"hlcc4\";\n\n/**\n * Opaque schema wrapper for `input.externalSeries`. Phase 4 ships the type\n * only; runtime validation lands in Phase 5.\n *\n * @since 0.4\n * @stable\n * @example\n * const s: Schema<number> = { kind: \"external-series-schema\" };\n * void s;\n */\nexport type Schema<T> = Readonly<{ kind: \"external-series-schema\"; __brand?: T }>;\n\ntype NumericInputOpts = Readonly<{ min?: number; max?: number; step?: number }>;\n\n/**\n * Typed input descriptor returned by every `input.*` builder. The `kind`\n * discriminator matches {@link InputKind}; remaining fields carry defaults\n * and UI hints.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: InputDescriptor<number> = {\n * kind: \"int\",\n * defaultValue: 14,\n * title: \"Length\",\n * };\n * void d;\n */\nexport type InputDescriptor<T> =\n | IntDescriptor\n | FloatDescriptor\n | BoolDescriptor\n | StringDescriptor\n | EnumDescriptor<string>\n | ColorDescriptor\n | SourceDescriptor\n | TimeDescriptor\n | PriceDescriptor\n | SymbolDescriptor\n | IntervalDescriptorInput\n | ExternalSeriesDescriptor<T>;\n\ntype Common<K extends InputKind, T> = Readonly<{\n kind: K;\n defaultValue: T;\n title?: string;\n}>;\n\n/**\n * Descriptor for `input.int(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: IntDescriptor = { kind: \"int\", defaultValue: 20, min: 1 };\n * void d;\n */\nexport type IntDescriptor = Common<\"int\", number> & NumericInputOpts;\n\n/**\n * Descriptor for `input.float(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: FloatDescriptor = { kind: \"float\", defaultValue: 2.5, step: 0.5 };\n * void d;\n */\nexport type FloatDescriptor = Common<\"float\", number> & NumericInputOpts;\n\n/**\n * Descriptor for `input.bool(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: BoolDescriptor = { kind: \"bool\", defaultValue: true };\n * void d;\n */\nexport type BoolDescriptor = Common<\"bool\", boolean>;\n\n/**\n * Descriptor for `input.string(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: StringDescriptor = { kind: \"string\", defaultValue: \"AAPL\" };\n * void d;\n */\nexport type StringDescriptor = Common<\"string\", string> & Readonly<{ multiline?: boolean }>;\n\n/**\n * Descriptor for `input.enum(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: EnumDescriptor<\"a\" | \"b\"> = {\n * kind: \"enum\",\n * defaultValue: \"a\",\n * options: [\"a\", \"b\"],\n * };\n * void d;\n */\nexport type EnumDescriptor<T extends string> = Common<\"enum\", T> &\n Readonly<{ options: ReadonlyArray<T> }>;\n\n/**\n * Descriptor for `input.color(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: ColorDescriptor = { kind: \"color\", defaultValue: \"#26a69a\" };\n * void d;\n */\nexport type ColorDescriptor = Common<\"color\", Color>;\n\n/**\n * Descriptor for `input.source(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: SourceDescriptor = { kind: \"source\", defaultValue: \"close\" };\n * void d;\n */\nexport type SourceDescriptor = Common<\"source\", SourceField>;\n\n/**\n * Descriptor for `input.time(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: TimeDescriptor = { kind: \"time\", defaultValue: 1_700_000_000_000 };\n * void d;\n */\nexport type TimeDescriptor = Common<\"time\", number> & Readonly<{ pickFromChart?: boolean }>;\n\n/**\n * Descriptor for `input.price(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: PriceDescriptor = { kind: \"price\", defaultValue: 101.25 };\n * void d;\n */\nexport type PriceDescriptor = Common<\"price\", number>;\n\n/**\n * Descriptor for `input.symbol(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: SymbolDescriptor = { kind: \"symbol\", defaultValue: \"AAPL\" };\n * void d;\n */\nexport type SymbolDescriptor = Common<\"symbol\", string>;\n\n/**\n * Descriptor for `input.interval(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: IntervalDescriptorInput = { kind: \"interval\", defaultValue: \"1D\" };\n * void d;\n */\nexport type IntervalDescriptorInput = Common<\"interval\", string>;\n\n/**\n * Descriptor for `input.externalSeries(...)`.\n *\n * @since 0.4\n * @stable\n * @example\n * const d: ExternalSeriesDescriptor<number> = {\n * kind: \"external-series\",\n * name: \"earnings\",\n * schema: { kind: \"external-series-schema\" },\n * };\n * void d;\n */\nexport type ExternalSeriesDescriptor<T> = Readonly<{\n kind: \"external-series\";\n name: string;\n schema: Schema<T>;\n title?: string;\n}>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"intervalToSeconds.js","sourceRoot":"","sources":["../../src/interval/intervalToSeconds.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAI/D,MAAM,WAAW,GAAG,MAAM,CAAC,MA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ACxC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACX,0EAA0E,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CACtG,CAAC;IACN,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAA6B,CAAC;IACpD,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,UAAU,CAAC;AAC1B,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { IntervalDescriptor } from \"../types.js\";\n\nconst MULTIPLIERS = Object.freeze({\n s: 1,\n \"\": 60,\n m: 60,\n H: 3_600,\n h: 3_600,\n D: 86_400,\n W: 604_800,\n M: 2_592_000,\n Y: 31_536_000,\n});\n\n/**\n * Convert an {@link IntervalDescriptor} to its effective second count.\n *\n * The helper prefers `intervalSeconds` when present. Otherwise it parses\n * `value` as `<positive-integer><suffix>`, where no suffix means Pine-style\n * minutes. Month and year suffixes use fixed 30-day and 365-day\n * approximations; adapters that need calendar-exact durations should provide\n * `intervalSeconds`.\n *\n * @throws Error when the override is non-positive / non-finite, or `value`\n * cannot be parsed.\n * @since 0.6\n * @stable\n * @example\n * intervalToSeconds({ value: \"1D\", label: \"1 day\", group: \"day\" });\n * intervalToSeconds({ value: \"custom\", label: \"custom\", group: \"x\", intervalSeconds: 7 });\n */\nexport function intervalToSeconds(d: IntervalDescriptor): number {\n if (d.intervalSeconds !== undefined) {\n if (!Number.isFinite(d.intervalSeconds) || d.intervalSeconds <= 0) {\n throw new Error(\n `intervalToSeconds: intervalSeconds must be a positive finite number; received ${d.intervalSeconds}`,\n );\n }\n return Math.round(d.intervalSeconds);\n }\n\n const match = /^(\\d+)([smHhDWMY]?)$/.exec(d.value);\n if (match === null) {\n throw new Error(\n `intervalToSeconds: cannot parse interval value ${JSON.stringify(d.value)}`,\n );\n }\n\n const n = Number.parseInt(match[1], 10);\n if (!Number.isFinite(n) || n <= 0) {\n throw new Error(\n `intervalToSeconds: numeric prefix must be a positive integer; received ${JSON.stringify(d.value)}`,\n );\n }\n\n const suffix = match[2] as keyof typeof MULTIPLIERS;\n const multiplier = MULTIPLIERS[suffix];\n return n * multiplier;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plot/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plot/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,cAAc,WAAW,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nexport * from \"./plot.js\";\n"]}
@@ -264,7 +264,7 @@ export type HLineOpts = Readonly<{
264
264
  }>;
265
265
  /**
266
266
  * Compile-time callable hole for `plot(value, opts?)`. The compiler rewrites
267
- * every callsite (Task 2) to dispatch to the runtime's `plot` implementation;
267
+ * every callsite to dispatch to the runtime's `plot` implementation;
268
268
  * calling this outside a compiled runtime throws the sentinel.
269
269
  *
270
270
  * Accepts `number | Series<number>` — scalars emit a single bar value;
package/dist/plot/plot.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // See the LICENSE file in the repo root for full license text.
3
3
  /**
4
4
  * Compile-time callable hole for `plot(value, opts?)`. The compiler rewrites
5
- * every callsite (Task 2) to dispatch to the runtime's `plot` implementation;
5
+ * every callsite to dispatch to the runtime's `plot` implementation;
6
6
  * calling this outside a compiled runtime throws the sentinel.
7
7
  *
8
8
  * Accepts `number | Series<number>` — scalars emit a single bar value;
@@ -1 +1 @@
1
- {"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/plot/plot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAiR/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,IAAI,CAAC,MAA+B,EAAE,KAAgB;IAClE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,KAAK,CAAC,MAAc,EAAE,KAAiB;IACnD,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;AAC7D,CAAC"}
1
+ {"version":3,"file":"plot.js","sourceRoot":"","sources":["../../src/plot/plot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAiR/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,IAAI,CAAC,MAA+B,EAAE,KAAgB;IAClE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,KAAK,CAAC,MAAc,EAAE,KAAiB;IACnD,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Color, LineStyle, Series } from \"../types.js\";\n\n/**\n * Rendered-shape discriminator for `plot` emissions reaching the adapter.\n * The full 0.5 inventory is `line`, `step-line`, `horizontal-line`,\n * `histogram`, `area`, `filled-band`, `label`, `marker`,\n * `shape`, `character`, `arrow`, `candle-override`, `bar-override`,\n * `bg-color`, `bar-color`, and `horizontal-histogram`. Every expansion is\n * additive — the `apiVersion: 1` script header stays unchanged.\n *\n * Typical Phase-2 consumers:\n *\n * - `histogram` → volume bars, MACD histogram, momentum-style oscillators.\n * - `area` → filled region under a polyline (BB midline, regression).\n * - `filled-band` → Bollinger / Keltner / Donchian / Ichimoku envelopes.\n * - `label` → text annotations at a world-space anchor (fractal, pivot).\n * - `marker` → discrete glyph (circle / triangle / square / diamond) for\n * fractals / divergence / supertrend flips.\n *\n * @since 0.1\n * @example\n * const k: PlotKind = \"line\";\n * const histogram: PlotKind = \"histogram\";\n * const shape: PlotKind = \"shape\";\n * void k; void histogram; void shape;\n */\nexport type PlotKind =\n | \"line\"\n | \"step-line\"\n | \"horizontal-line\"\n | \"histogram\"\n | \"area\"\n | \"filled-band\"\n | \"label\"\n | \"marker\"\n | \"shape\"\n | \"character\"\n | \"arrow\"\n | \"candle-override\"\n | \"bar-override\"\n | \"bg-color\"\n | \"bar-color\"\n | \"horizontal-histogram\";\n\n/**\n * Marker glyphs shared by Phase 2 `marker` and Phase 5 `shape` plot styles.\n *\n * @since 0.5\n * @stable\n * @example\n * const shape: PlotGlyphShape = \"circle\";\n * void shape;\n */\nexport type PlotGlyphShape = \"circle\" | \"triangle-up\" | \"triangle-down\" | \"square\" | \"diamond\";\n\n/**\n * Full glyph inventory for Phase 5 `shape` plot styles.\n *\n * @since 0.5\n * @stable\n * @example\n * const shape: PlotShapeGlyph = \"flag\";\n * void shape;\n */\nexport type PlotShapeGlyph = PlotGlyphShape | \"cross\" | \"xcross\" | \"flag\";\n\n/**\n * Vertical anchoring mode for glyph-like Phase 5 plot styles.\n *\n * @since 0.5\n * @stable\n * @example\n * const location: PlotLocation = \"above\";\n * void location;\n */\nexport type PlotLocation = \"above\" | \"below\" | \"absolute\";\n\n/**\n * Single row in a Phase 5 horizontal-histogram plot emission.\n *\n * @since 0.5\n * @stable\n * @example\n * const bucket: HorizontalHistogramBucket = { price: 100, volume: 25 };\n * void bucket;\n */\nexport type HorizontalHistogramBucket = Readonly<{\n readonly price: number;\n readonly volume: number;\n readonly color?: Color;\n}>;\n\n/**\n * Script-author selectable plot style. The runtime maps this to the\n * adapter-kit's wire `PlotStyle` discriminated union and fills in defaults\n * from sibling {@link PlotOpts} fields (`lineWidth` / `lineStyle`) for\n * line-like styles.\n *\n * `histogram.baseline` defaults to `0` when omitted.\n *\n * @formula N/A — script-facing style input\n * @since 0.2\n * @stable\n * @example\n * const lineStyle: PlotOptsStyle = { kind: \"line\" };\n * const histStyle: PlotOptsStyle = { kind: \"histogram\", baseline: 0 };\n * void lineStyle; void histStyle;\n */\nexport type PlotOptsStyle =\n | { readonly kind: \"line\" }\n | { readonly kind: \"step-line\" }\n | { readonly kind: \"horizontal-line\" }\n | { readonly kind: \"histogram\"; readonly baseline?: number }\n | {\n readonly kind: \"marker\";\n readonly shape: PlotGlyphShape;\n readonly size: number;\n }\n /**\n * Glyph at world-anchor — Pine's `plotshape`. Location selects vertical\n * anchoring; `size` is in CSS pixels.\n *\n * @since 0.5\n * @stable\n * @example\n * plot(bar.close, { style: { kind: \"shape\", shape: \"triangle-up\", size: 8, location: \"below\" } });\n */\n | {\n readonly kind: \"shape\";\n readonly shape: PlotShapeGlyph;\n readonly size: number;\n readonly location?: PlotLocation;\n }\n /**\n * Text glyph at world-anchor — Pine's `plotchar`. `char` may be any\n * non-empty UTF-8 string; `size` is in CSS pixels.\n *\n * @since 0.5\n * @stable\n * @example\n * plot(bar.close, { style: { kind: \"character\", char: \"▲\", size: 12, location: \"above\" } });\n */\n | {\n readonly kind: \"character\";\n readonly char: string;\n readonly size: number;\n readonly location?: PlotLocation;\n }\n /**\n * Directional marker at world-anchor — Pine's `plotarrow`.\n *\n * @since 0.5\n * @stable\n * @example\n * plot(bar.low, { style: { kind: \"arrow\", direction: \"up\", size: 10 } });\n */\n | { readonly kind: \"arrow\"; readonly direction: \"up\" | \"down\"; readonly size: number }\n /**\n * Candle body color override — Pine's `plotcandle`.\n *\n * @since 0.5\n * @stable\n * @example\n * plot(bar.close, { style: { kind: \"candle-override\", bull: \"#26a69a\", bear: \"#ef5350\" } });\n */\n | {\n readonly kind: \"candle-override\";\n readonly bull: Color;\n readonly bear: Color;\n readonly doji?: Color;\n }\n /**\n * OHLC bar outline override — Pine's `plotbar`.\n *\n * @since 0.5\n * @stable\n * @example\n * plot(bar.close, { style: { kind: \"bar-override\", color: \"#f59e0b\" } });\n */\n | { readonly kind: \"bar-override\"; readonly color: Color }\n /**\n * Pane background color band — Pine's `bgcolor`.\n *\n * @since 0.5\n * @stable\n * @example\n * plot(bar.close, { style: { kind: \"bg-color\", color: \"#1d4ed8\", transp: 80 } });\n */\n | { readonly kind: \"bg-color\"; readonly color: Color; readonly transp?: number }\n /**\n * Main candle/bar tint — Pine's `barcolor`.\n *\n * @since 0.5\n * @stable\n * @example\n * plot(bar.close, { style: { kind: \"bar-color\", color: \"#a855f7\" } });\n */\n | { readonly kind: \"bar-color\"; readonly color: Color }\n /**\n * Right-edge volume-profile bars keyed by price bucket.\n *\n * @since 0.5\n * @stable\n * @example\n * plot(bar.close, { style: { kind: \"horizontal-histogram\", buckets: [{ price: bar.close, volume: bar.volume }] } });\n */\n | {\n readonly kind: \"horizontal-histogram\";\n readonly buckets: ReadonlyArray<HorizontalHistogramBucket>;\n };\n\n/**\n * Styling options accepted by `plot(...)`. `pane: \"overlay\"` (the default) is\n * the only pane the Phase-1 canvas2d adapter renders — `\"new\"` and named\n * panes are reserved for Phase 2+. `style` (Phase 2) lets the script pick\n * a non-line {@link PlotOptsStyle} — defaults to `{ kind: \"line\" }`.\n *\n * @since 0.1\n * @example\n * const opts: PlotOpts = {\n * color: \"#3b82f6\",\n * title: \"EMA(20)\",\n * lineWidth: 2,\n * lineStyle: \"solid\",\n * pane: \"overlay\",\n * style: { kind: \"line\" },\n * };\n */\nexport type PlotOpts = Readonly<{\n color?: Color;\n title?: string;\n lineWidth?: number;\n lineStyle?: LineStyle;\n pane?: \"overlay\" | \"new\" | string;\n style?: PlotOptsStyle;\n}>;\n\n/**\n * Styling options accepted by `hline(...)`. `pane` follows the same shape as\n * {@link PlotOpts.pane}: omit to fall back to the script's manifest-resolved\n * default (overlay unless `defineIndicator({ overlay: false })` was declared);\n * `\"overlay\"` pins the line to the price pane; `\"new\"` opens / joins the\n * per-script subpane; named panes route to a shared subpane key.\n *\n * @since 0.1\n * @stable\n * @example\n * const opts: HLineOpts = {\n * color: \"#ef4444\",\n * title: \"RSI 70\",\n * lineStyle: \"dashed\",\n * pane: \"new\",\n * };\n */\nexport type HLineOpts = Readonly<{\n color?: Color;\n title?: string;\n lineWidth?: number;\n lineStyle?: LineStyle;\n /**\n * Routes the horizontal line to a pane. Mirrors {@link PlotOpts.pane}:\n * omit to fall back to the script's manifest-resolved default,\n * `\"overlay\"` pins to the price pane, `\"new\"` joins the per-script\n * subpane, and named keys route to a shared subpane (folded to overlay\n * with `unsupported-pane` on `subPanes: 0` adapters).\n *\n * @since 0.2\n */\n pane?: \"overlay\" | \"new\" | string;\n}>;\n\n/**\n * Compile-time callable hole for `plot(value, opts?)`. The compiler rewrites\n * every callsite to dispatch to the runtime's `plot` implementation;\n * calling this outside a compiled runtime throws the sentinel.\n *\n * Accepts `number | Series<number>` — scalars emit a single bar value;\n * series emissions pull from `series.current`.\n *\n * @since 0.1\n * @stable\n * @example\n * // Inside a compiled `compute`:\n * // plot(bar.close, { color: \"#3b82f6\" });\n * import { plot } from \"@invinite-org/chartlang-core\";\n * try { plot(0); } catch {}\n */\nexport function plot(_value: number | Series<number>, _opts?: PlotOpts): void {\n throw new Error(\"plot called outside compiled runtime\");\n}\n\n/**\n * Compile-time callable hole for `hline(price, opts?)`. Same semantics as\n * `plot` but pinned to a fixed price across all bars.\n *\n * @since 0.1\n * @stable\n * @example\n * // Inside a compiled `compute`:\n * // hline(70, { color: \"#ef4444\" });\n * import { hline } from \"@invinite-org/chartlang-core\";\n * try { hline(70); } catch {}\n */\nexport function hline(_price: number, _opts?: HLineOpts): void {\n throw new Error(\"hline called outside compiled runtime\");\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EACH,OAAO,GAKV,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EACH,OAAO,GAKV,MAAM,cAAc,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nexport {\n request,\n type RequestNamespace,\n type RequestLowerTfOpts,\n type RequestSecurityOpts,\n type SecurityBar,\n} from \"./request.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/request/request.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAkE/D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAS,EAAE;IACrC,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,uCAAuC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAA0B;QAC/B,OAAO,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;IACD;;;;;;;;OAQG;IACH,OAAO,CAAC,KAAyB;QAC7B,OAAO,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/request/request.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAkE/D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAS,EAAE;IACrC,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,uCAAuC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAA0B;QAC/B,OAAO,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;IACD;;;;;;;;OAQG;IACH,OAAO,CAAC,KAAyB;QAC7B,OAAO,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Bar, Price, Series, Time, Volume } from \"../types.js\";\n\n/**\n * Argument to {@link request.security}. The `interval` must be a string\n * literal or an `input.enum` value; the compiler's literal-only pass rejects\n * dynamic expressions with `request-security-interval-not-literal`.\n *\n * @since 0.4\n * @stable\n * @example\n * const opts: RequestSecurityOpts = { interval: \"1D\" };\n * void opts;\n */\nexport type RequestSecurityOpts = Readonly<{\n readonly interval: string;\n}>;\n\n/**\n * Argument to {@link request.lowerTf}. The `interval` must be strictly lower\n * than the script's main interval; invalid orderings are rejected by the\n * compiler's `lower-tf-not-lower` diagnostic when statically known.\n *\n * @since 0.6\n * @stable\n * @example\n * const opts: RequestLowerTfOpts = { interval: \"30s\" };\n * void opts;\n */\nexport type RequestLowerTfOpts = Readonly<{\n readonly interval: string;\n}>;\n\n/**\n * Secondary-stream bar returned by {@link request.security}. Each field is a\n * `Series<...>` aligned from the runtime's secondary-stream ring buffer to\n * the current main stream, or by the all-NaN fallback when\n * `Capabilities.multiTimeframe` is `false`, the interval is unsupported, or\n * the host fails to register the secondary stream.\n *\n * This is intentionally a series-shaped view rather than the scalar\n * {@link Bar} shape so scripts can read historical secondary values aligned\n * to main bars, such as `daily.close[5]`.\n *\n * @since 0.4\n * @stable\n * @example\n * const close: SecurityBar[\"close\"] = { current: 1, length: 1 };\n * void close;\n */\nexport type SecurityBar = Readonly<{\n readonly time: Series<Time>;\n readonly open: Series<Price>;\n readonly high: Series<Price>;\n readonly low: Series<Price>;\n readonly close: Series<Price>;\n readonly volume: Series<Volume>;\n readonly hl2: Series<Price>;\n readonly hlc3: Series<Price>;\n readonly ohlc4: Series<Price>;\n readonly hlcc4: Series<Price>;\n readonly symbol: Series<string>;\n readonly interval: Series<string>;\n}>;\n\nconst sentinel = (name: string): never => {\n throw new Error(`${name} called outside an active script step`);\n};\n\n/**\n * `request.*` namespace for secondary timeframe reads. The compiler walks\n * `request.security(...)` calls to populate `manifest.requestedIntervals`;\n * the runtime replaces this callable hole with a slot-aware implementation\n * through `ComputeContext.request`.\n *\n * @since 0.4\n * @stable\n * @example\n * const ns: typeof request = request;\n * void ns;\n */\nexport const request = Object.freeze({\n /**\n * Read a secondary candle stream at a script-author-fixed interval.\n *\n * @since 0.4\n * @stable\n * @example\n * const fn: typeof request.security = request.security;\n * void fn;\n */\n security(_opts: RequestSecurityOpts): SecurityBar {\n return sentinel(\"request.security\");\n },\n /**\n * Read lower-timeframe bars contained by each main-stream bar.\n *\n * @since 0.6\n * @stable\n * @example\n * const fn: typeof request.lowerTf = request.lowerTf;\n * void fn;\n */\n lowerTf(_opts: RequestLowerTfOpts): Series<ReadonlyArray<Bar>> {\n return sentinel(\"request.lowerTf\");\n },\n});\n\n/**\n * Static type of the `request` namespace. Runtime implementations satisfy\n * this shape structurally when installed on `ComputeContext.request`.\n *\n * @since 0.4\n * @stable\n * @example\n * const ns: RequestNamespace = request;\n * void ns;\n */\nexport type RequestNamespace = typeof request;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nexport { runtime } from \"./runtime.js\";\nexport type { LogLevel, RuntimeNamespace } from \"./runtime.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/runtime/runtime.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAe/D;;;;;;;;;GASG;AACH,SAAS,QAAQ,CAAC,QAAgB,EAAE,KAA2C;IAC3E,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,QAAQ,CAAC,QAAgB,EAAE,KAA2C;IAC3E,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,SAAS,CAAC,QAAgB,EAAE,KAA2C;IAC5E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,MAAM,CAAC,QAAgB;IAC5B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;KACnB,CAAC;IACF,KAAK,EAAE,MAAM;CAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/runtime/runtime.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAe/D;;;;;;;;;GASG;AACH,SAAS,QAAQ,CAAC,QAAgB,EAAE,KAA2C;IAC3E,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,QAAQ,CAAC,QAAgB,EAAE,KAA2C;IAC3E,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,SAAS,CAAC,QAAgB,EAAE,KAA2C;IAC5E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,MAAM,CAAC,QAAgB;IAC5B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;KACnB,CAAC;IACF,KAAK,EAAE,MAAM;CAChB,CAAC,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { JsonValue } from \"../types.js\";\n\n/**\n * Runtime log severity emitted by `runtime.log.*`.\n *\n * @since 0.5\n * @stable\n * @example\n * const level: LogLevel = \"info\";\n * void level;\n */\nexport type LogLevel = \"info\" | \"warn\" | \"error\";\n\n/**\n * Per-step log message. Pine's `runtime.log.*` analogue. Capability-\n * gated by `Capabilities.logs`; silent no-op when false.\n *\n * @since 0.5\n * @stable\n * @example\n * // Inside compute:\n * // runtime.log.info(`ema=${ema.current}`, { ema: ema.current });\n */\nfunction _logInfo(_message: string, _meta?: Readonly<Record<string, JsonValue>>): void {\n throw new Error(\"runtime.log.info called outside compiled runtime\");\n}\n\n/**\n * Per-step warning log message. Capability-gated by `Capabilities.logs`.\n *\n * @since 0.5\n * @stable\n * @example\n * // Inside compute:\n * // runtime.log.warn(\"warmup incomplete\");\n */\nfunction _logWarn(_message: string, _meta?: Readonly<Record<string, JsonValue>>): void {\n throw new Error(\"runtime.log.warn called outside compiled runtime\");\n}\n\n/**\n * Per-step error log message. Capability-gated by `Capabilities.logs`.\n *\n * @since 0.5\n * @stable\n * @example\n * // Inside compute:\n * // runtime.log.error(\"unexpected branch\", { branch: \"fallback\" });\n */\nfunction _logError(_message: string, _meta?: Readonly<Record<string, JsonValue>>): void {\n throw new Error(\"runtime.log.error called outside compiled runtime\");\n}\n\n/**\n * Halt the current bar's compute. Emits a fatal `RuntimeDiagnostic`\n * with code `runtime-error-thrown`. The script stays mounted; the\n * next bar runs normally. Use for invariant violations the script\n * cannot continue past.\n *\n * @since 0.5\n * @stable\n * @example\n * // Inside compute:\n * // if (inputs.length < 1) runtime.error(\"length must be >= 1\");\n */\nfunction _error(_message: string): never {\n throw new Error(\"runtime.error called outside compiled runtime\");\n}\n\n/**\n * Pine-style runtime utilities exposed to script `compute` callbacks.\n *\n * @since 0.5\n * @stable\n * @example\n * // Inside compute:\n * // runtime.log.info(\"close\", { value: bar.close });\n */\nexport const runtime = Object.freeze({\n log: Object.freeze({\n info: _logInfo,\n warn: _logWarn,\n error: _logError,\n }),\n error: _error,\n});\n\n/**\n * Script-facing runtime namespace type.\n *\n * @since 0.5\n * @stable\n * @example\n * const ns: RuntimeNamespace = runtime;\n * void ns;\n */\nexport type RuntimeNamespace = typeof runtime;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nexport { state } from \"./state.js\";\nexport type { StateNamespace } from \"./state.js\";\nexport type { MutableSlot } from \"./mutableSlot.js\";\nexport type {\n RunnerSnapshot,\n StateSnapshot,\n StateStoreKey,\n StreamSnapshot,\n} from \"./snapshot.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mutableSlot.js","sourceRoot":"","sources":["../../src/state/mutableSlot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
1
+ {"version":3,"file":"mutableSlot.js","sourceRoot":"","sources":["../../src/state/mutableSlot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\n/**\n * Script-facing handle on a persistent cross-bar slot, Pine's `var` /\n * `varip` equivalent. Reads return the active step value; writes follow\n * the runtime's committed/tentative slot semantics.\n *\n * Intentionally minimal: no `.history()`, no `.previous()`, no indexing.\n * Scripts that need the previous bar's value store it in a second slot or\n * use `ta.*` series-indexing primitives.\n *\n * @since 0.4\n * @stable\n * @example\n * const slot: MutableSlot<number> = {\n * get value() {\n * return 0;\n * },\n * set value(_next: number) {},\n * };\n * slot.value = 1;\n */\nexport type MutableSlot<T> = {\n get value(): T;\n set value(v: T);\n};\n"]}
@@ -4,7 +4,7 @@ import type { JsonValue } from "../types.js";
4
4
  *
5
5
  * Carries everything needed to rehydrate a ring buffer for one timeframe,
6
6
  * whether that stream is the main interval or a higher-timeframe secondary
7
- * stream (PLAN.md §6.1, §6.9).
7
+ * stream.
8
8
  *
9
9
  * `buffers` is keyed by the canonical OHLCV field names; each value is a
10
10
  * JSON-clean array of `number | null`, where `null` preserves NaN holes
@@ -38,7 +38,7 @@ export type StreamSnapshot = Readonly<{
38
38
  /**
39
39
  * Per-runner persistence section. Carries one runner's `state.*`
40
40
  * (and primary-only TA) slot map keyed by `${slotIdPrefix}${slotId}:state`
41
- * (PLAN.md §5.5 + Task 5). `slots` is `JsonValue` so the snapshot
41
+ * (Task 5). `slots` is `JsonValue` so the snapshot
42
42
  * round-trips through `JSON.stringify` and structured-clone.
43
43
  *
44
44
  * Used inside {@link StateSnapshot} for `primary`,
@@ -60,9 +60,9 @@ export type RunnerSnapshot = Readonly<{
60
60
  * Canonical persistent-store snapshot.
61
61
  *
62
62
  * Written on `dispose()` and on every `kind: "close"` event when stale for
63
- * at least 60 seconds (PLAN.md §6.9). Each runner's `state.*` payload is
63
+ * at least 60 seconds. Each runner's `state.*` payload is
64
64
  * keyed by the compiler-injected slot id with the runner's
65
- * `slotIdPrefix` prepended (PLAN.md §5.5 + Task 5). Primary-runner TA
65
+ * `slotIdPrefix` prepended (Task 5). Primary-runner TA
66
66
  * slots live in `primary.slots` alongside `state.*` slots (the bundle's
67
67
  * deps + siblings share the primary's mainStream, so TA slots have no
68
68
  * per-runner section).
@@ -98,7 +98,7 @@ export type StateSnapshot = Readonly<{
98
98
  * Canonical persistent-store identity tuple.
99
99
  *
100
100
  * Every field contributes to the cache key; any change invalidates the
101
- * snapshot (PLAN.md §6.9). Stores treat this tuple opaquely as a string key;
101
+ * snapshot. Stores treat this tuple opaquely as a string key;
102
102
  * the typical implementation is `JSON.stringify(key)` with sorted fields.
103
103
  *
104
104
  * - `scriptHash` is the SHA-256 digest of the compiled `moduleSource`.
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/state/snapshot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}
1
+ {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../src/state/snapshot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { JsonValue } from \"../types.js\";\n\n/**\n * Per-stream snapshot captured during state persistence.\n *\n * Carries everything needed to rehydrate a ring buffer for one timeframe,\n * whether that stream is the main interval or a higher-timeframe secondary\n * stream.\n *\n * `buffers` is keyed by the canonical OHLCV field names; each value is a\n * JSON-clean array of `number | null`, where `null` preserves NaN holes\n * through `JSON.stringify`. `headIndex` and `filled` mirror the ring-buffer's\n * internal state at snapshot time.\n *\n * @since 0.5\n * @stable\n * @example\n * const s: StreamSnapshot = {\n * interval: \"1D\",\n * headIndex: 4999,\n * filled: 5000,\n * buffers: { time: [], open: [], high: [], low: [], close: [], volume: [] },\n * };\n * void s;\n */\nexport type StreamSnapshot = Readonly<{\n interval: string;\n headIndex: number;\n filled: number;\n buffers: Readonly<{\n time: ReadonlyArray<number | null>;\n open: ReadonlyArray<number | null>;\n high: ReadonlyArray<number | null>;\n low: ReadonlyArray<number | null>;\n close: ReadonlyArray<number | null>;\n volume: ReadonlyArray<number | null>;\n }>;\n}>;\n\n/**\n * Per-runner persistence section. Carries one runner's `state.*`\n * (and primary-only TA) slot map keyed by `${slotIdPrefix}${slotId}:state`\n * (Task 5). `slots` is `JsonValue` so the snapshot\n * round-trips through `JSON.stringify` and structured-clone.\n *\n * Used inside {@link StateSnapshot} for `primary`,\n * `siblings[exportName]`, and `dependencies[localId]` sections —\n * one section per runner mounted by a `CompiledScriptBundle`.\n *\n * @since 0.7\n * @stable\n * @example\n * const r: RunnerSnapshot = {\n * slots: { \"x:state\": { committed: 1, tentative: 1 } },\n * };\n * void r;\n */\nexport type RunnerSnapshot = Readonly<{\n slots: Readonly<Record<string, JsonValue>>;\n}>;\n\n/**\n * Canonical persistent-store snapshot.\n *\n * Written on `dispose()` and on every `kind: \"close\"` event when stale for\n * at least 60 seconds. Each runner's `state.*` payload is\n * keyed by the compiler-injected slot id with the runner's\n * `slotIdPrefix` prepended (Task 5). Primary-runner TA\n * slots live in `primary.slots` alongside `state.*` slots (the bundle's\n * deps + siblings share the primary's mainStream, so TA slots have no\n * per-runner section).\n *\n * `snapshotVersion: 1` is the only currently-supported wire version.\n * The 0.7 widening is additive — the runtime validator accepts both the\n * legacy flat `slots:` shape (loaded as primary-only) and the structured\n * `primary` / `siblings?` / `dependencies?` shape (always written going\n * forward).\n *\n * @since 0.5 — widened to per-runner sections in 0.7\n * @stable\n * @example\n * const s: StateSnapshot = {\n * lastBarTime: 1_700_000_000_000,\n * streams: {},\n * savedAt: 1_700_000_060_000,\n * snapshotVersion: 1,\n * primary: { slots: {} },\n * };\n * void s;\n */\nexport type StateSnapshot = Readonly<{\n lastBarTime: number;\n streams: Readonly<Record<string, StreamSnapshot>>;\n savedAt: number;\n snapshotVersion: 1;\n primary: RunnerSnapshot;\n siblings?: Readonly<Record<string, RunnerSnapshot>>;\n dependencies?: Readonly<Record<string, RunnerSnapshot>>;\n}>;\n\n/**\n * Canonical persistent-store identity tuple.\n *\n * Every field contributes to the cache key; any change invalidates the\n * snapshot. Stores treat this tuple opaquely as a string key;\n * the typical implementation is `JSON.stringify(key)` with sorted fields.\n *\n * - `scriptHash` is the SHA-256 digest of the compiled `moduleSource`.\n * - `compilerVersion` is the package version of `@invinite-org/chartlang-compiler`.\n * - `apiVersion` is the script header pin, currently `1`.\n * - `capabilitiesHash` is the SHA-256 digest of normalised adapter capabilities.\n * - `symbol` is the adapter's loaded ticker.\n * - `mainInterval` is the primary stream interval.\n * - `requestedIntervals` is the frozen array of secondary stream intervals.\n *\n * @since 0.5\n * @stable\n * @example\n * const k: StateStoreKey = {\n * scriptHash: \"abc\",\n * compilerVersion: \"0.5.0\",\n * apiVersion: 1,\n * capabilitiesHash: \"def\",\n * symbol: \"BTCUSD\",\n * mainInterval: \"1m\",\n * requestedIntervals: [],\n * };\n * void k;\n */\nexport type StateStoreKey = Readonly<{\n scriptHash: string;\n compilerVersion: string;\n apiVersion: 1;\n capabilitiesHash: string;\n symbol: string;\n mainInterval: string;\n requestedIntervals: ReadonlyArray<string>;\n}>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/state/state.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAI/D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAS,EAAE;IACrC,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,uCAAuC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/B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AG,CAAC,KAAa;QACb,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,KAAc;QACf,OAAO,QAAQ,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAa;QAChB,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC;QAChB,KAAK,CAAC,KAAa;YACf,OAAO,QAAQ,CAAC,kBAAkB,CAAC,CAAC;QACxC,CAAC;QACD,GAAG,CAAC,KAAa;YACb,OAAO,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QACtC,CAAC;QACD,IAAI,CAAC,KAAc;YACf,OAAO,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QACvC,CAAC;QACD,MAAM,CAAC,KAAa;YAChB,OAAO,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QACzC,CAAC;KACJ,CAAC;CACL,CAAC,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { MutableSlot } from \"./mutableSlot.js\";\n\nconst sentinel = (name: string): never => {\n throw new Error(`${name} called outside an active script step`);\n};\n\n/**\n * Persistent state slots, Pine `var` semantics. Writes during a tick are\n * tentative and discarded if a later tick replaces the head bar; on bar\n * close the tentative value commits. Reads return the active tentative\n * value for the current step.\n *\n * The runtime replaces this compile-time callable hole with a slot-aware\n * namespace through `ComputeContext.state`.\n *\n * @since 0.4\n * @stable\n * @example\n * const ns: typeof state = state;\n * void ns;\n */\nexport const state = Object.freeze({\n /**\n * Allocate or read a persistent number slot.\n *\n * @since 0.4\n * @stable\n * @example\n * const fn: typeof state.float = state.float;\n * void fn;\n */\n float(_init: number): MutableSlot<number> {\n return sentinel(\"state.float\");\n },\n\n /**\n * Allocate or read a persistent integer slot.\n *\n * @since 0.4\n * @stable\n * @example\n * const fn: typeof state.int = state.int;\n * void fn;\n */\n int(_init: number): MutableSlot<number> {\n return sentinel(\"state.int\");\n },\n\n /**\n * Allocate or read a persistent boolean slot.\n *\n * @since 0.4\n * @stable\n * @example\n * const fn: typeof state.bool = state.bool;\n * void fn;\n */\n bool(_init: boolean): MutableSlot<boolean> {\n return sentinel(\"state.bool\");\n },\n\n /**\n * Allocate or read a persistent string slot.\n *\n * @since 0.4\n * @stable\n * @example\n * const fn: typeof state.string = state.string;\n * void fn;\n */\n string(_init: string): MutableSlot<string> {\n return sentinel(\"state.string\");\n },\n\n /**\n * Tick-persistent state slots, Pine `varip` semantics. Writes commit\n * immediately, even during a tick.\n *\n * @since 0.4\n * @stable\n * @example\n * const fn: typeof state.tick.float = state.tick.float;\n * void fn;\n */\n tick: Object.freeze({\n float(_init: number): MutableSlot<number> {\n return sentinel(\"state.tick.float\");\n },\n int(_init: number): MutableSlot<number> {\n return sentinel(\"state.tick.int\");\n },\n bool(_init: boolean): MutableSlot<boolean> {\n return sentinel(\"state.tick.bool\");\n },\n string(_init: string): MutableSlot<string> {\n return sentinel(\"state.tick.string\");\n },\n }),\n});\n\n/**\n * Static type of the `state` namespace. Runtime implementations satisfy\n * this shape structurally when they are installed on `ComputeContext.state`.\n *\n * @since 0.4\n * @stable\n * @example\n * const ns: StateNamespace = state;\n * void ns;\n */\nexport type StateNamespace = typeof state;\n"]}
@@ -17,7 +17,7 @@ export type StatefulPrimitiveEntry = Readonly<{
17
17
  /**
18
18
  * Frozen set of every fully-qualified call name the compiler tracks for
19
19
  * static-analysis (`stateful-call-inside-loop`) and slot-id injection
20
- * (PLAN.md §5.5). Each entry carries a `slot` flag: `slot: true`
20
+ *. Each entry carries a `slot` flag: `slot: true`
21
21
  * primitives allocate per-callsite hidden state and get a string-literal
22
22
  * slot id injected as their first argument; `slot: false` primitives are
23
23
  * pure helpers that ride along in the set because Pine still forbids
@@ -180,7 +180,7 @@ const STATEFUL_PRIMITIVE_ENTRIES = [
180
180
  /**
181
181
  * Frozen set of every fully-qualified call name the compiler tracks for
182
182
  * static-analysis (`stateful-call-inside-loop`) and slot-id injection
183
- * (PLAN.md §5.5). Each entry carries a `slot` flag: `slot: true`
183
+ *. Each entry carries a `slot` flag: `slot: true`
184
184
  * primitives allocate per-callsite hidden state and get a string-literal
185
185
  * slot id injected as their first argument; `slot: false` primitives are
186
186
  * pure helpers that ride along in the set because Pine still forbids
@@ -1 +1 @@
1
- {"version":3,"file":"statefulPrimitives.js","sourceRoot":"","sources":["../src/statefulPrimitives.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAgB/D,MAAM,0BAA0B,GAA0C;IACtE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;IAC9B,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;IAC9B,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;IAChC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE;IAC7B,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;IAC9B,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;IAC/B,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;IAC9B,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE;IACpC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE;IACrC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE;IAClC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;IACjC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;IACjC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE;IACpC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EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE;IACpC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE;CACzC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwC,MAAM,CAAC,MAAM,CACjF,IAAI,GAAG,CAAyB,0BAA0B,CAAC,CAC9D,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAgD,IAAI,GAAG,CAG7F,0BAA0B,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\n/**\n * Per-entry shape of {@link STATEFUL_PRIMITIVES}. `name` is the\n * fully-qualified call (`ta.ema`, `plot`, `hline`, `alert`); `slot`\n * is `true` for every primitive whose call site needs a compiler-\n * injected slot id, `false` for the stateless helpers that ride along\n * in the set for in-loop diagnostics (currently only `ta.nz`).\n *\n * @since 0.1\n * @stable\n * @example\n * const entry: StatefulPrimitiveEntry = { name: \"ta.nz\", slot: false };\n */\nexport type StatefulPrimitiveEntry = Readonly<{ name: string; slot: boolean }>;\n\nconst STATEFUL_PRIMITIVE_ENTRIES: ReadonlyArray<StatefulPrimitiveEntry> = [\n { name: \"ta.sma\", slot: true },\n { name: \"ta.ema\", slot: true },\n { name: \"ta.stdev\", slot: true },\n { name: \"ta.bb\", slot: true },\n { name: \"ta.rsi\", slot: true },\n { name: \"ta.macd\", slot: true },\n { name: \"ta.atr\", slot: true },\n { name: \"ta.crossover\", slot: true },\n { name: \"ta.crossunder\", slot: true },\n { name: \"ta.highest\", slot: true },\n { name: \"ta.lowest\", slot: true },\n { name: \"ta.change\", slot: true },\n { name: \"ta.valuewhen\", slot: true },\n { name: \"ta.barssince\", slot: true },\n { name: \"ta.wma\", slot: true },\n { name: \"ta.vwma\", slot: true },\n { name: \"ta.hma\", slot: true },\n { name: \"ta.smma\", slot: true },\n { name: \"ta.dema\", slot: true },\n { name: \"ta.tema\", slot: true },\n { name: \"ta.kama\", slot: true },\n { name: \"ta.alma\", slot: true },\n { name: \"ta.lsma\", slot: true },\n { name: \"ta.mcginley\", slot: true },\n { name: \"ta.maRibbon\", slot: true },\n { name: \"ta.cci\", slot: true },\n { name: \"ta.stoch\", slot: true },\n { name: \"ta.williamsR\", slot: true },\n { name: \"ta.stochRsi\", slot: true },\n { name: \"ta.ultimateOsc\", slot: true },\n { name: \"ta.coppock\", slot: true },\n { name: \"ta.ppo\", slot: true },\n { name: \"ta.dpo\", slot: true },\n { name: \"ta.connorsRsi\", slot: true },\n { name: \"ta.kst\", slot: true },\n { name: \"ta.fisher\", slot: true },\n { name: \"ta.klinger\", slot: true },\n { name: \"ta.rvgi\", slot: true },\n { name: \"ta.ao\", slot: true },\n { name: \"ta.cmo\", slot: true },\n { name: \"ta.momentum\", slot: true },\n { name: \"ta.roc\", slot: true },\n { name: \"ta.pmo\", slot: true },\n { name: \"ta.smi\", slot: true },\n { name: \"ta.tsi\", slot: true },\n { name: \"ta.aroon\", slot: true },\n { name: \"ta.aroonOsc\", slot: true },\n { name: \"ta.adx\", slot: true },\n { name: \"ta.dmi\", slot: true },\n { name: \"ta.trix\", slot: true },\n { name: \"ta.vortex\", slot: true },\n { name: \"ta.trendStrengthIndex\", slot: true },\n { name: \"ta.ichimoku\", slot: true },\n { name: \"ta.vol\", slot: true },\n { name: \"ta.vwap\", slot: true },\n { name: \"ta.anchoredVwap\", slot: true },\n { name: \"ta.obv\", slot: true },\n { name: \"ta.adl\", slot: true },\n { name: \"ta.bop\", slot: true },\n { name: \"ta.cmf\", slot: true },\n { name: \"ta.chaikinOsc\", slot: true },\n { name: \"ta.mfi\", slot: true },\n { name: \"ta.netVolume\", slot: true },\n { name: \"ta.pvo\", slot: true },\n { name: \"ta.pvt\", slot: true },\n { name: \"ta.eom\", slot: true },\n { name: \"ta.nvi\", slot: true },\n { name: \"ta.pvi\", slot: true },\n { name: \"ta.visibleRangeVolumeProfile\", slot: true },\n { name: \"ta.anchoredVolumeProfile\", slot: true },\n { name: \"ta.sessionVolumeProfile\", slot: true },\n { name: \"ta.fixedRangeVolumeProfile\", slot: true },\n { name: \"ta.median\", slot: true },\n { name: \"ta.adr\", slot: true },\n { name: \"ta.ulcerIndex\", slot: true },\n { name: \"ta.bbPercentB\", slot: true },\n { name: \"ta.bbw\", slot: true },\n { name: \"ta.donchian\", slot: true },\n { name: \"ta.keltner\", slot: true },\n { name: \"ta.envelope\", slot: true },\n { name: \"ta.chop\", slot: true },\n { name: \"ta.historicalVolatility\", slot: true },\n { name: \"ta.rvi\", slot: true },\n { name: \"ta.massIndex\", slot: true },\n { name: \"ta.psar\", slot: true },\n { name: \"ta.supertrend\", slot: true },\n { name: \"ta.chandelier\", slot: true },\n { name: \"ta.chandeKrollStop\", slot: true },\n { name: \"ta.williamsFractal\", slot: true },\n { name: \"ta.zigZag\", slot: true },\n { name: \"ta.pivotsHighLow\", slot: true },\n { name: \"ta.pivotsStandard\", slot: true },\n { name: \"ta.volatilityStop\", slot: true },\n { name: \"ta.nz\", slot: false },\n { name: \"plot\", slot: true },\n { name: \"hline\", slot: true },\n { name: \"alert\", slot: true },\n // Phase 3 — draw.* namespace. One entry per kind in DRAWING_KINDS\n // order. Names are camelCase (`draw.<kindCamelCase>`); the wire\n // format keeps the kebab-case `DrawingKind`.\n { name: \"draw.line\", slot: true },\n { name: \"draw.horizontalLine\", slot: true },\n { name: \"draw.horizontalRay\", slot: true },\n { name: \"draw.verticalLine\", slot: true },\n { name: \"draw.crossLine\", slot: true },\n { name: \"draw.trendAngle\", slot: true },\n { name: \"draw.rectangle\", slot: true },\n { name: \"draw.rotatedRectangle\", slot: true },\n { name: \"draw.triangle\", slot: true },\n { name: \"draw.polyline\", slot: true },\n { name: \"draw.circle\", slot: true },\n { name: \"draw.ellipse\", slot: true },\n { name: \"draw.path\", slot: true },\n { name: \"draw.marker\", slot: true },\n { name: \"draw.arc\", slot: true },\n { name: \"draw.curve\", slot: true },\n { name: \"draw.doubleCurve\", slot: true },\n { name: \"draw.pen\", slot: true },\n { name: \"draw.highlighter\", slot: true },\n { name: \"draw.brush\", slot: true },\n { name: \"draw.text\", slot: true },\n { name: \"draw.arrow\", slot: true },\n { name: \"draw.arrowMarker\", slot: true },\n { name: \"draw.arrowMarkUp\", slot: true },\n { name: \"draw.arrowMarkDown\", slot: true },\n { name: \"draw.trendChannel\", slot: true },\n { name: \"draw.flatTopBottom\", slot: true },\n { name: \"draw.disjointChannel\", slot: true },\n { name: \"draw.regressionTrend\", slot: true },\n { name: \"draw.fibRetracement\", slot: true },\n { name: \"draw.fibTrendExtension\", slot: true },\n { name: \"draw.fibChannel\", slot: true },\n { name: \"draw.fibTimeZone\", slot: true },\n { name: \"draw.fibWedge\", slot: true },\n { name: \"draw.fibSpeedFan\", slot: true },\n { name: \"draw.fibSpeedArcs\", slot: true },\n { name: \"draw.fibSpiral\", slot: true },\n { name: \"draw.fibCircles\", slot: true },\n { name: \"draw.fibTrendTime\", slot: true },\n { name: \"draw.gannBox\", slot: true },\n { name: \"draw.gannSquareFixed\", slot: true },\n { name: \"draw.gannSquare\", slot: true },\n { name: \"draw.gannFan\", slot: true },\n { name: \"draw.pitchfork\", slot: true },\n { name: \"draw.pitchfan\", slot: true },\n { name: \"draw.xabcdPattern\", slot: true },\n { name: \"draw.cypherPattern\", slot: true },\n { name: \"draw.headAndShoulders\", slot: true },\n { name: \"draw.abcdPattern\", slot: true },\n { name: \"draw.trianglePattern\", slot: true },\n { name: \"draw.threeDrivesPattern\", slot: true },\n { name: \"draw.elliottImpulseWave\", slot: true },\n { name: \"draw.elliottCorrectionWave\", slot: true },\n { name: \"draw.elliottTriangleWave\", slot: true },\n { name: \"draw.elliottDoubleCombo\", slot: true },\n { name: \"draw.elliottTripleCombo\", slot: true },\n { name: \"draw.cyclicLines\", slot: true },\n { name: \"draw.timeCycles\", slot: true },\n { name: \"draw.sineLine\", slot: true },\n { name: \"draw.group\", slot: true },\n { name: \"draw.frame\", slot: true },\n { name: \"draw.table\", slot: true },\n { name: \"state.float\", slot: true },\n { name: \"state.int\", slot: true },\n { name: \"state.bool\", slot: true },\n { name: \"state.string\", slot: true },\n { name: \"state.tick.float\", slot: true },\n { name: \"state.tick.int\", slot: true },\n { name: \"state.tick.bool\", slot: true },\n { name: \"state.tick.string\", slot: true },\n { name: \"request.security\", slot: true },\n { name: \"request.lowerTf\", slot: true },\n { name: \"defineAlertCondition.signal\", slot: false },\n { name: \"runtime.log\", slot: false },\n { name: \"runtime.error\", slot: false },\n];\n\n/**\n * Frozen set of every fully-qualified call name the compiler tracks for\n * static-analysis (`stateful-call-inside-loop`) and slot-id injection\n *. Each entry carries a `slot` flag: `slot: true`\n * primitives allocate per-callsite hidden state and get a string-literal\n * slot id injected as their first argument; `slot: false` primitives are\n * pure helpers that ride along in the set because Pine still forbids\n * them inside loops (e.g. `ta.nz`).\n *\n * Phase 1 shipped 12 `slot: true` entries. Phase 2 widens the shape to\n * `{ name, slot }` so `ta.nz` (the only stateless Phase-2 cross-functional\n * primitive) can opt out of slot-id injection without losing the\n * in-loop diagnostic. Subsequent Phase-2 batch tasks (Tasks 6–28) each\n * append `slot: true` entries; Phase 3 appends 61 `draw.<camelKind>`\n * entries (all `slot: true`), and Phase 4 appends 8 `state.*` /\n * `state.tick.*` entries plus request primitives. Phase 5 appends alert-condition signalling plus runtime\n * logging/error as stateless loop-diagnostic entries plus `draw.table`\n * as a slot-backed viewport drawing.\n *\n * Locked at `apiVersion: 1` (172 entries). Adding, removing, or renaming\n * an entry is a language change and requires `apiVersion: 2` — see\n * `docs/spec/versioning.md`.\n *\n * @since 0.1\n * @stable\n * @example\n * import { STATEFUL_PRIMITIVES } from \"@invinite-org/chartlang-core\";\n * for (const entry of STATEFUL_PRIMITIVES) {\n * if (entry.name === \"ta.ema\" && entry.slot) {\n * // compiler injects an id here\n * }\n * }\n */\nexport const STATEFUL_PRIMITIVES: ReadonlySet<StatefulPrimitiveEntry> = Object.freeze(\n new Set<StatefulPrimitiveEntry>(STATEFUL_PRIMITIVE_ENTRIES),\n);\n\n/**\n * Name → entry index of {@link STATEFUL_PRIMITIVES}. The compiler's\n * `callsiteIdInjection` and `statefulCallInLoop` passes consult this map\n * by callee name once per call site — O(1) lookup instead of an O(n) scan\n * over the 172-entry set on every visited call. The map is derived from\n * the same canonical entry list as {@link STATEFUL_PRIMITIVES} so adding\n * a primitive to the set adds it here automatically.\n *\n * Locked at `apiVersion: 1` (172 entries). Adding, removing, or renaming\n * an entry is a language change and requires `apiVersion: 2` — see\n * `docs/spec/versioning.md`.\n *\n * @since 0.2\n * @stable\n * @example\n * import { STATEFUL_PRIMITIVES_BY_NAME } from \"@invinite-org/chartlang-core\";\n * const entry = STATEFUL_PRIMITIVES_BY_NAME.get(\"ta.ema\");\n * // entry is { name: \"ta.ema\", slot: true } | undefined\n */\nexport const STATEFUL_PRIMITIVES_BY_NAME: ReadonlyMap<string, StatefulPrimitiveEntry> = new Map<\n string,\n StatefulPrimitiveEntry\n>(STATEFUL_PRIMITIVE_ENTRIES.map((entry) => [entry.name, entry]));\n"]}