@invinite-org/chartlang-core 1.1.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +282 -0
- package/README.md +2 -1
- package/dist/draw/buckets.d.ts.map +1 -1
- package/dist/draw/buckets.js +1 -0
- package/dist/draw/buckets.js.map +1 -1
- package/dist/draw/draw.d.ts +8 -1
- package/dist/draw/draw.d.ts.map +1 -1
- package/dist/draw/draw.js.map +1 -1
- package/dist/draw/drawingKind.d.ts +8 -8
- package/dist/draw/drawingKind.d.ts.map +1 -1
- package/dist/draw/drawingKind.js +5 -3
- package/dist/draw/drawingKind.js.map +1 -1
- package/dist/draw/drawingState.d.ts +27 -3
- package/dist/draw/drawingState.d.ts.map +1 -1
- package/dist/draw/drawingState.js.map +1 -1
- package/dist/draw/drawingStyle.d.ts +52 -9
- package/dist/draw/drawingStyle.d.ts.map +1 -1
- package/dist/draw/drawingStyle.js.map +1 -1
- package/dist/draw/index.d.ts +2 -2
- package/dist/draw/index.d.ts.map +1 -1
- package/dist/draw/index.js.map +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/input/index.d.ts +1 -1
- package/dist/input/index.d.ts.map +1 -1
- package/dist/input/index.js.map +1 -1
- package/dist/input/input.d.ts +15 -1
- package/dist/input/input.d.ts.map +1 -1
- package/dist/input/input.js +14 -0
- package/dist/input/input.js.map +1 -1
- package/dist/input/inputDescriptor.d.ts +15 -2
- package/dist/input/inputDescriptor.d.ts.map +1 -1
- package/dist/input/inputDescriptor.js.map +1 -1
- package/dist/plot/plot.d.ts +75 -0
- package/dist/plot/plot.d.ts.map +1 -1
- package/dist/plot/plot.js +34 -0
- package/dist/plot/plot.js.map +1 -1
- package/dist/request/feedKey.d.ts +20 -0
- package/dist/request/feedKey.d.ts.map +1 -0
- package/dist/request/feedKey.js +29 -0
- package/dist/request/feedKey.js.map +1 -0
- package/dist/request/index.d.ts +3 -1
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +1 -0
- package/dist/request/index.js.map +1 -1
- package/dist/request/request.d.ts +107 -20
- package/dist/request/request.d.ts.map +1 -1
- package/dist/request/request.js +27 -26
- package/dist/request/request.js.map +1 -1
- package/dist/state/arraySlot.d.ts +38 -0
- package/dist/state/arraySlot.d.ts.map +1 -0
- package/dist/state/arraySlot.js +4 -0
- package/dist/state/arraySlot.js.map +1 -0
- package/dist/state/index.d.ts +1 -0
- package/dist/state/index.d.ts.map +1 -1
- package/dist/state/index.js.map +1 -1
- package/dist/state/state.d.ts +36 -0
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +38 -0
- package/dist/state/state.js.map +1 -1
- package/dist/statefulPrimitives.d.ts +9 -5
- package/dist/statefulPrimitives.d.ts.map +1 -1
- package/dist/statefulPrimitives.js +37 -5
- package/dist/statefulPrimitives.js.map +1 -1
- package/dist/ta/ta.d.ts +39 -8
- package/dist/ta/ta.d.ts.map +1 -1
- package/dist/ta/ta.js +6 -0
- package/dist/ta/ta.js.map +1 -1
- package/dist/time-accessors/index.d.ts +5 -0
- package/dist/time-accessors/index.d.ts.map +1 -0
- package/dist/time-accessors/index.js +5 -0
- package/dist/time-accessors/index.js.map +1 -0
- package/dist/time-accessors/sessionAccessors.d.ts +43 -0
- package/dist/time-accessors/sessionAccessors.d.ts.map +1 -0
- package/dist/time-accessors/sessionAccessors.js +38 -0
- package/dist/time-accessors/sessionAccessors.js.map +1 -0
- package/dist/time-accessors/timeAccessors.d.ts +132 -0
- package/dist/time-accessors/timeAccessors.d.ts.map +1 -0
- package/dist/time-accessors/timeAccessors.js +143 -0
- package/dist/time-accessors/timeAccessors.js.map +1 -0
- package/dist/types.d.ts +219 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawingKind.js","sourceRoot":"","sources":["../../src/draw/drawingKind.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AA8G/D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,aAAa,GAA+B,MAAM,CAAC,MAAM,CAAC;IACnE,MAAM;IACN,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,aAAa;IACb,WAAW;IACX,mBAAmB;IACnB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,MAAM;IACN,QAAQ;IACR,KAAK;IACL,OAAO;IACP,cAAc;IACd,KAAK;IACL,aAAa;IACb,OAAO;IACP,MAAM;IACN,OAAO;IACP,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,iBAAiB;IACjB,qBAAqB;IACrB,aAAa;IACb,eAAe;IACf,WAAW;IACX,eAAe;IACf,gBAAgB;IAChB,YAAY;IACZ,aAAa;IACb,gBAAgB;IAChB,UAAU;IACV,mBAAmB;IACnB,aAAa;IACb,UAAU;IACV,WAAW;IACX,UAAU;IACV,eAAe;IACf,gBAAgB;IAChB,oBAAoB;IACpB,cAAc;IACd,kBAAkB;IAClB,sBAAsB;IACtB,sBAAsB;IACtB,yBAAyB;IACzB,uBAAuB;IACvB,sBAAsB;IACtB,sBAAsB;IACtB,cAAc;IACd,aAAa;IACb,WAAW;IACX,OAAO;IACP,OAAO;IACP,OAAO;CACoC,CAAC,CAAC;AAEjD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAqC,IAAI,GAAG,CAAsB;IACzF,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;IACrC,CAAC,gBAAgB,EAAE,eAAe,CAAC;IACnC,CAAC,eAAe,EAAE,cAAc,CAAC;IACjC,CAAC,YAAY,EAAE,WAAW,CAAC;IAC3B,CAAC,aAA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gBAAgB,EAAE,cAAc,CAAC;IAClC,CAAC,UAAU,EAAE,SAAS,CAAC;IACvB,CAAC,mBAAmB,EAAE,iBAAiB,CAAC;IACxC,CAAC,aAAa,EAAE,YAAY,CAAC;IAC7B,CAAC,UAAU,EAAE,SAAS,CAAC;IACvB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,UAAU,CAAC;IACxB,CAAC,eAAe,EAAE,cAAc,CAAC;IACjC,CAAC,gBAAgB,EAAE,eAAe,CAAC;IACnC,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;IAC1C,CAAC,cAAc,EAAE,aAAa,CAAC;IAC/B,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;IACvC,CAAC,sBAAsB,EAAE,oBAAoB,CAAC;IAC9C,CAAC,sBAAsB,EAAE,oBAAoB,CAAC;IAC9C,CAAC,yBAAyB,EAAE,uBAAuB,CAAC;IACpD,CAAC,uBAAuB,EAAE,qBAAqB,CAAC;IAChD,CAAC,sBAAsB,EAAE,oBAAoB,CAAC;IAC9C,CAAC,sBAAsB,EAAE,oBAAoB,CAAC;IAC9C,CAAC,cAAc,EAAE,aAAa,CAAC;IAC/B,CAAC,aAAa,EAAE,YAAY,CAAC;IAC7B,CAAC,WAAW,EAAE,UAAU,CAAC;IACzB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,cAAc,GAAqC,IAAI,GAAG,CACnE,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CACjE,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 * The full set of 62 drawing kinds chartlang supports through `draw.*`.\n * The wire format is kebab-case; the TypeScript script surface is\n * camelCase (`draw.horizontalLine(...)`). See {@link KIND_CAMELCASE} for\n * the canonical bijection.\n *\n * Variant collapses:\n *\n * - `ray` / `extended-line` collapse into `line` with `extendLeft` /\n * `extendRight` flags on the state.\n * - The 4 invinite pitchfork tools (`standard` / `schiff` /\n * `modifiedSchiff` / `inside`) collapse into `pitchfork` with a\n * `variant` discriminator on the state.\n * - `cypher-pattern` has no standalone tool — emittable only through\n * `defineDrawing` (Task 20).\n *\n * Order pinned: lines (6) → boxes (8) → curves (3) → freehand (3) →\n * annotations (5) → channels (4) → fib (10) → gann (4) → pitchforks (2)\n * → patterns (6) → elliott (5) → cycles (3) → containers (2) → viewport\n * overlays (1) = 62. The order is wire-stable — downstream consumers iterate\n * {@link DRAWING_KINDS} in this order for diagnostic readability.\n *\n * @formula N/A — discriminator constant set\n * @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}\n * @since 0.3\n * @stable\n * @example\n * const k: DrawingKind = \"fib-retracement\";\n * void k;\n */\nexport type DrawingKind =\n // Lines / Rays (6)\n | \"line\"\n | \"horizontal-line\"\n | \"horizontal-ray\"\n | \"vertical-line\"\n | \"cross-line\"\n | \"trend-angle\"\n // Boxes / Shapes (8)\n | \"rectangle\"\n | \"rotated-rectangle\"\n | \"triangle\"\n | \"polyline\"\n | \"circle\"\n | \"ellipse\"\n | \"path\"\n | \"marker\"\n // Curves (3)\n | \"arc\"\n | \"curve\"\n | \"double-curve\"\n // Freehand (3)\n | \"pen\"\n | \"highlighter\"\n | \"brush\"\n // Annotations (5)\n | \"text\"\n | \"arrow\"\n | \"arrow-marker\"\n | \"arrow-mark-up\"\n | \"arrow-mark-down\"\n // Channels (4)\n | \"trend-channel\"\n | \"flat-top-bottom\"\n | \"disjoint-channel\"\n | \"regression-trend\"\n // Fibonacci (10)\n | \"fib-retracement\"\n | \"fib-trend-extension\"\n | \"fib-channel\"\n | \"fib-time-zone\"\n | \"fib-wedge\"\n | \"fib-speed-fan\"\n | \"fib-speed-arcs\"\n | \"fib-spiral\"\n | \"fib-circles\"\n | \"fib-trend-time\"\n // Gann (4)\n | \"gann-box\"\n | \"gann-square-fixed\"\n | \"gann-square\"\n | \"gann-fan\"\n // Pitchforks (2)\n | \"pitchfork\"\n | \"pitchfan\"\n // Harmonic Patterns (6)\n | \"xabcd-pattern\"\n | \"cypher-pattern\"\n | \"head-and-shoulders\"\n | \"abcd-pattern\"\n | \"triangle-pattern\"\n | \"three-drives-pattern\"\n // Elliott Waves (5)\n | \"elliott-impulse-wave\"\n | \"elliott-correction-wave\"\n | \"elliott-triangle-wave\"\n | \"elliott-double-combo\"\n | \"elliott-triple-combo\"\n // Cycles (3)\n | \"cyclic-lines\"\n | \"time-cycles\"\n | \"sine-line\"\n // Containers (2)\n | \"group\"\n | \"frame\"\n // Viewport overlays (1)\n | \"table\";\n\n/**\n * Iterable form of {@link DrawingKind}. Order matches the type\n * declaration so docs / validators / dispatchers can walk the set in a\n * single canonical order. Frozen.\n *\n * @formula N/A — discriminator constant set\n * @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}\n * @since 0.3\n * @stable\n * @example\n * import { DRAWING_KINDS } from \"@invinite-org/chartlang-core\";\n * for (const k of DRAWING_KINDS) {\n * void k;\n * }\n */\nexport const DRAWING_KINDS: ReadonlyArray<DrawingKind> = Object.freeze([\n \"line\",\n \"horizontal-line\",\n \"horizontal-ray\",\n \"vertical-line\",\n \"cross-line\",\n \"trend-angle\",\n \"rectangle\",\n \"rotated-rectangle\",\n \"triangle\",\n \"polyline\",\n \"circle\",\n \"ellipse\",\n \"path\",\n \"marker\",\n \"arc\",\n \"curve\",\n \"double-curve\",\n \"pen\",\n \"highlighter\",\n \"brush\",\n \"text\",\n \"arrow\",\n \"arrow-marker\",\n \"arrow-mark-up\",\n \"arrow-mark-down\",\n \"trend-channel\",\n \"flat-top-bottom\",\n \"disjoint-channel\",\n \"regression-trend\",\n \"fib-retracement\",\n \"fib-trend-extension\",\n \"fib-channel\",\n \"fib-time-zone\",\n \"fib-wedge\",\n \"fib-speed-fan\",\n \"fib-speed-arcs\",\n \"fib-spiral\",\n \"fib-circles\",\n \"fib-trend-time\",\n \"gann-box\",\n \"gann-square-fixed\",\n \"gann-square\",\n \"gann-fan\",\n \"pitchfork\",\n \"pitchfan\",\n \"xabcd-pattern\",\n \"cypher-pattern\",\n \"head-and-shoulders\",\n \"abcd-pattern\",\n \"triangle-pattern\",\n \"three-drives-pattern\",\n \"elliott-impulse-wave\",\n \"elliott-correction-wave\",\n \"elliott-triangle-wave\",\n \"elliott-double-combo\",\n \"elliott-triple-combo\",\n \"cyclic-lines\",\n \"time-cycles\",\n \"sine-line\",\n \"group\",\n \"frame\",\n \"table\",\n] as const satisfies ReadonlyArray<DrawingKind>);\n\n/**\n * camelCase TypeScript-surface name for every kind. Used by the editor\n * + gen-docs + the compiler's `STATEFUL_PRIMITIVES` lookup so a script\n * author writes `draw.horizontalLine(...)` while the wire format stays\n * kebab-case (`horizontal-line`). The bijection round-trips through\n * {@link KIND_KEBABCASE}.\n *\n * @formula N/A — discriminator constant set\n * @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}\n * @since 0.3\n * @stable\n * @example\n * import { KIND_CAMELCASE } from \"@invinite-org/chartlang-core\";\n * const camel = KIND_CAMELCASE.get(\"horizontal-line\"); // \"horizontalLine\"\n * void camel;\n */\nexport const KIND_CAMELCASE: ReadonlyMap<DrawingKind, string> = new Map<DrawingKind, string>([\n [\"line\", \"line\"],\n [\"horizontal-line\", \"horizontalLine\"],\n [\"horizontal-ray\", \"horizontalRay\"],\n [\"vertical-line\", \"verticalLine\"],\n [\"cross-line\", \"crossLine\"],\n [\"trend-angle\", \"trendAngle\"],\n [\"rectangle\", \"rectangle\"],\n [\"rotated-rectangle\", \"rotatedRectangle\"],\n [\"triangle\", \"triangle\"],\n [\"polyline\", \"polyline\"],\n [\"circle\", \"circle\"],\n [\"ellipse\", \"ellipse\"],\n [\"path\", \"path\"],\n [\"marker\", \"marker\"],\n [\"arc\", \"arc\"],\n [\"curve\", \"curve\"],\n [\"double-curve\", \"doubleCurve\"],\n [\"pen\", \"pen\"],\n [\"highlighter\", \"highlighter\"],\n [\"brush\", \"brush\"],\n [\"text\", \"text\"],\n [\"arrow\", \"arrow\"],\n [\"arrow-marker\", \"arrowMarker\"],\n [\"arrow-mark-up\", \"arrowMarkUp\"],\n [\"arrow-mark-down\", \"arrowMarkDown\"],\n [\"trend-channel\", \"trendChannel\"],\n [\"flat-top-bottom\", \"flatTopBottom\"],\n [\"disjoint-channel\", \"disjointChannel\"],\n [\"regression-trend\", \"regressionTrend\"],\n [\"fib-retracement\", \"fibRetracement\"],\n [\"fib-trend-extension\", \"fibTrendExtension\"],\n [\"fib-channel\", \"fibChannel\"],\n [\"fib-time-zone\", \"fibTimeZone\"],\n [\"fib-wedge\", \"fibWedge\"],\n [\"fib-speed-fan\", \"fibSpeedFan\"],\n [\"fib-speed-arcs\", \"fibSpeedArcs\"],\n [\"fib-spiral\", \"fibSpiral\"],\n [\"fib-circles\", \"fibCircles\"],\n [\"fib-trend-time\", \"fibTrendTime\"],\n [\"gann-box\", \"gannBox\"],\n [\"gann-square-fixed\", \"gannSquareFixed\"],\n [\"gann-square\", \"gannSquare\"],\n [\"gann-fan\", \"gannFan\"],\n [\"pitchfork\", \"pitchfork\"],\n [\"pitchfan\", \"pitchfan\"],\n [\"xabcd-pattern\", \"xabcdPattern\"],\n [\"cypher-pattern\", \"cypherPattern\"],\n [\"head-and-shoulders\", \"headAndShoulders\"],\n [\"abcd-pattern\", \"abcdPattern\"],\n [\"triangle-pattern\", \"trianglePattern\"],\n [\"three-drives-pattern\", \"threeDrivesPattern\"],\n [\"elliott-impulse-wave\", \"elliottImpulseWave\"],\n [\"elliott-correction-wave\", \"elliottCorrectionWave\"],\n [\"elliott-triangle-wave\", \"elliottTriangleWave\"],\n [\"elliott-double-combo\", \"elliottDoubleCombo\"],\n [\"elliott-triple-combo\", \"elliottTripleCombo\"],\n [\"cyclic-lines\", \"cyclicLines\"],\n [\"time-cycles\", \"timeCycles\"],\n [\"sine-line\", \"sineLine\"],\n [\"group\", \"group\"],\n [\"frame\", \"frame\"],\n [\"table\", \"table\"],\n]);\n\n/**\n * Inverse of {@link KIND_CAMELCASE} — camelCase TypeScript surface\n * name → kebab-case wire kind. Derived from `KIND_CAMELCASE` so the\n * two maps cannot drift.\n *\n * @formula N/A — discriminator constant set\n * @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}\n * @since 0.3\n * @stable\n * @example\n * import { KIND_KEBABCASE } from \"@invinite-org/chartlang-core\";\n * const kebab = KIND_KEBABCASE.get(\"horizontalLine\"); // \"horizontal-line\"\n * void kebab;\n */\nexport const KIND_KEBABCASE: ReadonlyMap<string, DrawingKind> = new Map<string, DrawingKind>(\n Array.from(KIND_CAMELCASE, ([kebab, camel]) => [camel, kebab]),\n);\n"]}
|
|
1
|
+
{"version":3,"file":"drawingKind.js","sourceRoot":"","sources":["../../src/draw/drawingKind.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AA+G/D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,aAAa,GAA+B,MAAM,CAAC,MAAM,CAAC;IACnE,MAAM;IACN,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,aAAa;IACb,WAAW;IACX,mBAAmB;IACnB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,MAAM;IACN,cAAc;IACd,QAAQ;IACR,KAAK;IACL,OAAO;IACP,cAAc;IACd,KAAK;IACL,aAAa;IACb,OAAO;IACP,MAAM;IACN,OAAO;IACP,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,iBAAiB;IACjB,qBAAqB;IACrB,aAAa;IACb,eAAe;IACf,WAAW;IACX,eAAe;IACf,gBAAgB;I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CAAC;IACpD,CAAC,uBAAuB,EAAE,qBAAqB,CAAC;IAChD,CAAC,sBAAsB,EAAE,oBAAoB,CAAC;IAC9C,CAAC,sBAAsB,EAAE,oBAAoB,CAAC;IAC9C,CAAC,cAAc,EAAE,aAAa,CAAC;IAC/B,CAAC,aAAa,EAAE,YAAY,CAAC;IAC7B,CAAC,WAAW,EAAE,UAAU,CAAC;IACzB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,cAAc,GAAqC,IAAI,GAAG,CACnE,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CACjE,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 * The full set of 63 drawing kinds chartlang supports through `draw.*`.\n * The wire format is kebab-case; the TypeScript script surface is\n * camelCase (`draw.horizontalLine(...)`). See {@link KIND_CAMELCASE} for\n * the canonical bijection.\n *\n * Variant collapses:\n *\n * - `ray` / `extended-line` collapse into `line` with `extendLeft` /\n * `extendRight` flags on the state.\n * - The 4 invinite pitchfork tools (`standard` / `schiff` /\n * `modifiedSchiff` / `inside`) collapse into `pitchfork` with a\n * `variant` discriminator on the state.\n * - `cypher-pattern` has no standalone tool — emittable only through\n * `defineDrawing` (Task 20).\n *\n * Order pinned: lines (6) → boxes (9) → curves (3) → freehand (3) →\n * annotations (5) → channels (4) → fib (10) → gann (4) → pitchforks (2)\n * → patterns (6) → elliott (5) → cycles (3) → containers (2) → viewport\n * overlays (1) = 63. The order is wire-stable — downstream consumers iterate\n * {@link DRAWING_KINDS} in this order for diagnostic readability.\n *\n * @formula N/A — discriminator constant set\n * @anchors 63 kebab-case kind names; see {@link DRAWING_KINDS}\n * @since 0.3\n * @stable\n * @example\n * const k: DrawingKind = \"fib-retracement\";\n * void k;\n */\nexport type DrawingKind =\n // Lines / Rays (6)\n | \"line\"\n | \"horizontal-line\"\n | \"horizontal-ray\"\n | \"vertical-line\"\n | \"cross-line\"\n | \"trend-angle\"\n // Boxes / Shapes (9)\n | \"rectangle\"\n | \"rotated-rectangle\"\n | \"triangle\"\n | \"polyline\"\n | \"circle\"\n | \"ellipse\"\n | \"path\"\n | \"fill-between\"\n | \"marker\"\n // Curves (3)\n | \"arc\"\n | \"curve\"\n | \"double-curve\"\n // Freehand (3)\n | \"pen\"\n | \"highlighter\"\n | \"brush\"\n // Annotations (5)\n | \"text\"\n | \"arrow\"\n | \"arrow-marker\"\n | \"arrow-mark-up\"\n | \"arrow-mark-down\"\n // Channels (4)\n | \"trend-channel\"\n | \"flat-top-bottom\"\n | \"disjoint-channel\"\n | \"regression-trend\"\n // Fibonacci (10)\n | \"fib-retracement\"\n | \"fib-trend-extension\"\n | \"fib-channel\"\n | \"fib-time-zone\"\n | \"fib-wedge\"\n | \"fib-speed-fan\"\n | \"fib-speed-arcs\"\n | \"fib-spiral\"\n | \"fib-circles\"\n | \"fib-trend-time\"\n // Gann (4)\n | \"gann-box\"\n | \"gann-square-fixed\"\n | \"gann-square\"\n | \"gann-fan\"\n // Pitchforks (2)\n | \"pitchfork\"\n | \"pitchfan\"\n // Harmonic Patterns (6)\n | \"xabcd-pattern\"\n | \"cypher-pattern\"\n | \"head-and-shoulders\"\n | \"abcd-pattern\"\n | \"triangle-pattern\"\n | \"three-drives-pattern\"\n // Elliott Waves (5)\n | \"elliott-impulse-wave\"\n | \"elliott-correction-wave\"\n | \"elliott-triangle-wave\"\n | \"elliott-double-combo\"\n | \"elliott-triple-combo\"\n // Cycles (3)\n | \"cyclic-lines\"\n | \"time-cycles\"\n | \"sine-line\"\n // Containers (2)\n | \"group\"\n | \"frame\"\n // Viewport overlays (1)\n | \"table\";\n\n/**\n * Iterable form of {@link DrawingKind}. Order matches the type\n * declaration so docs / validators / dispatchers can walk the set in a\n * single canonical order. Frozen.\n *\n * @formula N/A — discriminator constant set\n * @anchors 63 kebab-case kind names; see {@link DRAWING_KINDS}\n * @since 0.3\n * @stable\n * @example\n * import { DRAWING_KINDS } from \"@invinite-org/chartlang-core\";\n * for (const k of DRAWING_KINDS) {\n * void k;\n * }\n */\nexport const DRAWING_KINDS: ReadonlyArray<DrawingKind> = Object.freeze([\n \"line\",\n \"horizontal-line\",\n \"horizontal-ray\",\n \"vertical-line\",\n \"cross-line\",\n \"trend-angle\",\n \"rectangle\",\n \"rotated-rectangle\",\n \"triangle\",\n \"polyline\",\n \"circle\",\n \"ellipse\",\n \"path\",\n \"fill-between\",\n \"marker\",\n \"arc\",\n \"curve\",\n \"double-curve\",\n \"pen\",\n \"highlighter\",\n \"brush\",\n \"text\",\n \"arrow\",\n \"arrow-marker\",\n \"arrow-mark-up\",\n \"arrow-mark-down\",\n \"trend-channel\",\n \"flat-top-bottom\",\n \"disjoint-channel\",\n \"regression-trend\",\n \"fib-retracement\",\n \"fib-trend-extension\",\n \"fib-channel\",\n \"fib-time-zone\",\n \"fib-wedge\",\n \"fib-speed-fan\",\n \"fib-speed-arcs\",\n \"fib-spiral\",\n \"fib-circles\",\n \"fib-trend-time\",\n \"gann-box\",\n \"gann-square-fixed\",\n \"gann-square\",\n \"gann-fan\",\n \"pitchfork\",\n \"pitchfan\",\n \"xabcd-pattern\",\n \"cypher-pattern\",\n \"head-and-shoulders\",\n \"abcd-pattern\",\n \"triangle-pattern\",\n \"three-drives-pattern\",\n \"elliott-impulse-wave\",\n \"elliott-correction-wave\",\n \"elliott-triangle-wave\",\n \"elliott-double-combo\",\n \"elliott-triple-combo\",\n \"cyclic-lines\",\n \"time-cycles\",\n \"sine-line\",\n \"group\",\n \"frame\",\n \"table\",\n] as const satisfies ReadonlyArray<DrawingKind>);\n\n/**\n * camelCase TypeScript-surface name for every kind. Used by the editor\n * + gen-docs + the compiler's `STATEFUL_PRIMITIVES` lookup so a script\n * author writes `draw.horizontalLine(...)` while the wire format stays\n * kebab-case (`horizontal-line`). The bijection round-trips through\n * {@link KIND_KEBABCASE}.\n *\n * @formula N/A — discriminator constant set\n * @anchors 63 kebab-case kind names; see {@link DRAWING_KINDS}\n * @since 0.3\n * @stable\n * @example\n * import { KIND_CAMELCASE } from \"@invinite-org/chartlang-core\";\n * const camel = KIND_CAMELCASE.get(\"horizontal-line\"); // \"horizontalLine\"\n * void camel;\n */\nexport const KIND_CAMELCASE: ReadonlyMap<DrawingKind, string> = new Map<DrawingKind, string>([\n [\"line\", \"line\"],\n [\"horizontal-line\", \"horizontalLine\"],\n [\"horizontal-ray\", \"horizontalRay\"],\n [\"vertical-line\", \"verticalLine\"],\n [\"cross-line\", \"crossLine\"],\n [\"trend-angle\", \"trendAngle\"],\n [\"rectangle\", \"rectangle\"],\n [\"rotated-rectangle\", \"rotatedRectangle\"],\n [\"triangle\", \"triangle\"],\n [\"polyline\", \"polyline\"],\n [\"circle\", \"circle\"],\n [\"ellipse\", \"ellipse\"],\n [\"path\", \"path\"],\n [\"fill-between\", \"fillBetween\"],\n [\"marker\", \"marker\"],\n [\"arc\", \"arc\"],\n [\"curve\", \"curve\"],\n [\"double-curve\", \"doubleCurve\"],\n [\"pen\", \"pen\"],\n [\"highlighter\", \"highlighter\"],\n [\"brush\", \"brush\"],\n [\"text\", \"text\"],\n [\"arrow\", \"arrow\"],\n [\"arrow-marker\", \"arrowMarker\"],\n [\"arrow-mark-up\", \"arrowMarkUp\"],\n [\"arrow-mark-down\", \"arrowMarkDown\"],\n [\"trend-channel\", \"trendChannel\"],\n [\"flat-top-bottom\", \"flatTopBottom\"],\n [\"disjoint-channel\", \"disjointChannel\"],\n [\"regression-trend\", \"regressionTrend\"],\n [\"fib-retracement\", \"fibRetracement\"],\n [\"fib-trend-extension\", \"fibTrendExtension\"],\n [\"fib-channel\", \"fibChannel\"],\n [\"fib-time-zone\", \"fibTimeZone\"],\n [\"fib-wedge\", \"fibWedge\"],\n [\"fib-speed-fan\", \"fibSpeedFan\"],\n [\"fib-speed-arcs\", \"fibSpeedArcs\"],\n [\"fib-spiral\", \"fibSpiral\"],\n [\"fib-circles\", \"fibCircles\"],\n [\"fib-trend-time\", \"fibTrendTime\"],\n [\"gann-box\", \"gannBox\"],\n [\"gann-square-fixed\", \"gannSquareFixed\"],\n [\"gann-square\", \"gannSquare\"],\n [\"gann-fan\", \"gannFan\"],\n [\"pitchfork\", \"pitchfork\"],\n [\"pitchfan\", \"pitchfan\"],\n [\"xabcd-pattern\", \"xabcdPattern\"],\n [\"cypher-pattern\", \"cypherPattern\"],\n [\"head-and-shoulders\", \"headAndShoulders\"],\n [\"abcd-pattern\", \"abcdPattern\"],\n [\"triangle-pattern\", \"trianglePattern\"],\n [\"three-drives-pattern\", \"threeDrivesPattern\"],\n [\"elliott-impulse-wave\", \"elliottImpulseWave\"],\n [\"elliott-correction-wave\", \"elliottCorrectionWave\"],\n [\"elliott-triangle-wave\", \"elliottTriangleWave\"],\n [\"elliott-double-combo\", \"elliottDoubleCombo\"],\n [\"elliott-triple-combo\", \"elliottTripleCombo\"],\n [\"cyclic-lines\", \"cyclicLines\"],\n [\"time-cycles\", \"timeCycles\"],\n [\"sine-line\", \"sineLine\"],\n [\"group\", \"group\"],\n [\"frame\", \"frame\"],\n [\"table\", \"table\"],\n]);\n\n/**\n * Inverse of {@link KIND_CAMELCASE} — camelCase TypeScript surface\n * name → kebab-case wire kind. Derived from `KIND_CAMELCASE` so the\n * two maps cannot drift.\n *\n * @formula N/A — discriminator constant set\n * @anchors 63 kebab-case kind names; see {@link DRAWING_KINDS}\n * @since 0.3\n * @stable\n * @example\n * import { KIND_KEBABCASE } from \"@invinite-org/chartlang-core\";\n * const kebab = KIND_KEBABCASE.get(\"horizontalLine\"); // \"horizontal-line\"\n * void kebab;\n */\nexport const KIND_KEBABCASE: ReadonlyMap<string, DrawingKind> = new Map<string, DrawingKind>(\n Array.from(KIND_CAMELCASE, ([kebab, camel]) => [camel, kebab]),\n);\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Color, JsonValue, Price, Time } from "../types.js";
|
|
2
|
-
import type { ArrowMarkerOpts, ArrowOpts, BrushStyle, FibOpts, FrameOpts, HighlighterStyle, LineDrawStyle, PathOpts, RegressionTrendOpts, ShapeStyle, TextOpts } from "./drawingStyle.js";
|
|
2
|
+
import type { ArrowMarkerOpts, ArrowOpts, BrushStyle, FibOpts, FillBetweenStyle, FrameOpts, HighlighterStyle, LineDrawStyle, PathOpts, RegressionTrendOpts, ShapeStyle, TextOpts } from "./drawingStyle.js";
|
|
3
3
|
import type { TableCell, TablePosition } from "./table.js";
|
|
4
4
|
import type { AnchorHept, AnchorPair, AnchorQuad, AnchorQuint, AnchorTriple, WorldPoint } from "./worldPoint.js";
|
|
5
5
|
/**
|
|
@@ -288,6 +288,30 @@ export type PathState = DrawingMeta & {
|
|
|
288
288
|
readonly anchors: ReadonlyArray<WorldPoint>;
|
|
289
289
|
readonly style: PathOpts;
|
|
290
290
|
};
|
|
291
|
+
/**
|
|
292
|
+
* State for a `fill-between` drawing: a filled ribbon between two edges.
|
|
293
|
+
* Each edge is an ordered list of world anchors; the rendered region is
|
|
294
|
+
* the closed polygon `edgeA` forward then `edgeB` reversed.
|
|
295
|
+
*
|
|
296
|
+
* @formula N/A — drawing state payload
|
|
297
|
+
* @anchors `edgeA`, `edgeB` — two `ReadonlyArray<WorldPoint>`
|
|
298
|
+
* @since 0.4
|
|
299
|
+
* @stable
|
|
300
|
+
* @example
|
|
301
|
+
* const state: FillBetweenState = {
|
|
302
|
+
* kind: "fill-between",
|
|
303
|
+
* edgeA: [{ time: 0, price: 1 }],
|
|
304
|
+
* edgeB: [{ time: 0, price: 0 }],
|
|
305
|
+
* style: { fill: "#3b82f6" },
|
|
306
|
+
* };
|
|
307
|
+
* void state;
|
|
308
|
+
*/
|
|
309
|
+
export type FillBetweenState = DrawingMeta & {
|
|
310
|
+
readonly kind: "fill-between";
|
|
311
|
+
readonly edgeA: ReadonlyArray<WorldPoint>;
|
|
312
|
+
readonly edgeB: ReadonlyArray<WorldPoint>;
|
|
313
|
+
readonly style: FillBetweenStyle;
|
|
314
|
+
};
|
|
291
315
|
/**
|
|
292
316
|
* `marker` — single-anchor glyph with optional value label.
|
|
293
317
|
*
|
|
@@ -1399,7 +1423,7 @@ export type TableState = DrawingMeta & {
|
|
|
1399
1423
|
* `authorId`, `parentGroupId`, `parentFrameId`, `visibleIntervals`)
|
|
1400
1424
|
* from the invinite source are stripped.
|
|
1401
1425
|
*
|
|
1402
|
-
* The
|
|
1426
|
+
* The 63 variants here are intentionally minimal shells. Tasks 5–18
|
|
1403
1427
|
* (per-category ports) refine each variant's geometry + style payload
|
|
1404
1428
|
* against the invinite source-of-truth. Exhaustiveness is asserted via
|
|
1405
1429
|
* the `(k satisfies never)` switch in `drawingState.types.test.ts`.
|
|
@@ -1416,5 +1440,5 @@ export type TableState = DrawingMeta & {
|
|
|
1416
1440
|
* };
|
|
1417
1441
|
* void s;
|
|
1418
1442
|
*/
|
|
1419
|
-
export type DrawingState = LineState | HorizontalLineState | HorizontalRayState | VerticalLineState | CrossLineState | TrendAngleState | RectangleState | RotatedRectangleState | TriangleState | PolylineState | CircleState | EllipseState | PathState | MarkerState | ArcState | CurveState | DoubleCurveState | PenState | HighlighterState | BrushState | TextState | ArrowState | ArrowMarkerState | ArrowMarkUpState | ArrowMarkDownState | TrendChannelState | FlatTopBottomState | DisjointChannelState | RegressionTrendState | FibRetracementState | FibTrendExtensionState | FibChannelState | FibTimeZoneState | FibWedgeState | FibSpeedFanState | FibSpeedArcsState | FibSpiralState | FibCirclesState | FibTrendTimeState | GannBoxState | GannSquareFixedState | GannSquareState | GannFanState | PitchforkState | PitchfanState | XabcdPatternState | CypherPatternState | HeadAndShouldersState | AbcdPatternState | TrianglePatternState | ThreeDrivesPatternState | ElliottImpulseWaveState | ElliottCorrectionWaveState | ElliottTriangleWaveState | ElliottDoubleComboState | ElliottTripleComboState | CyclicLinesState | TimeCyclesState | SineLineState | GroupState | FrameState | TableState;
|
|
1443
|
+
export type DrawingState = LineState | HorizontalLineState | HorizontalRayState | VerticalLineState | CrossLineState | TrendAngleState | RectangleState | RotatedRectangleState | TriangleState | PolylineState | CircleState | EllipseState | PathState | FillBetweenState | MarkerState | ArcState | CurveState | DoubleCurveState | PenState | HighlighterState | BrushState | TextState | ArrowState | ArrowMarkerState | ArrowMarkUpState | ArrowMarkDownState | TrendChannelState | FlatTopBottomState | DisjointChannelState | RegressionTrendState | FibRetracementState | FibTrendExtensionState | FibChannelState | FibTimeZoneState | FibWedgeState | FibSpeedFanState | FibSpeedArcsState | FibSpiralState | FibCirclesState | FibTrendTimeState | GannBoxState | GannSquareFixedState | GannSquareState | GannFanState | PitchforkState | PitchfanState | XabcdPatternState | CypherPatternState | HeadAndShouldersState | AbcdPatternState | TrianglePatternState | ThreeDrivesPatternState | ElliottImpulseWaveState | ElliottCorrectionWaveState | ElliottTriangleWaveState | ElliottDoubleComboState | ElliottTripleComboState | CyclicLinesState | TimeCyclesState | SineLineState | GroupState | FrameState | TableState;
|
|
1420
1444
|
//# sourceMappingURL=drawingState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawingState.d.ts","sourceRoot":"","sources":["../../src/draw/drawingState.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EACR,eAAe,EACf,SAAS,EACT,UAAU,EACV,OAAO,EACP,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO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AAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,YAAY,GAClB,SAAS,GACT,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,cAAc,GACd,eAAe,GACf,cAAc,GACd,qBAAqB,GACrB,aAAa,GACb,aAAa,GACb,WAAW,GACX,YAAY,GACZ,SAAS,GACT,WAAW,GACX,QAAQ,GACR,UAAU,GACV,gBAAgB,GAChB,QAAQ,GACR,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,UAAU,GACV,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,GACnB,sBAAsB,GACtB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,YAAY,GACZ,oBAAoB,GACpB,eAAe,GACf,YAAY,GACZ,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,GACrB,gBAAgB,GAChB,oBAAoB,GACpB,uBAAuB,GACvB,uBAAuB,GACvB,0BAA0B,GAC1B,wBAAwB,GACxB,uBAAuB,GACvB,uBAAuB,GACvB,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,UAAU,GACV,UAAU,GACV,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"drawingState.d.ts","sourceRoot":"","sources":["../../src/draw/drawingState.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EACR,eAAe,EACf,SAAS,EACT,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,mBA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BAAuB,GACvB,0BAA0B,GAC1B,wBAAwB,GACxB,uBAAuB,GACvB,uBAAuB,GACvB,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,UAAU,GACV,UAAU,GACV,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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"]}
|
|
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 FillBetweenStyle,\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 * State for a `fill-between` drawing: a filled ribbon between two edges.\n * Each edge is an ordered list of world anchors; the rendered region is\n * the closed polygon `edgeA` forward then `edgeB` reversed.\n *\n * @formula N/A — drawing state payload\n * @anchors `edgeA`, `edgeB` — two `ReadonlyArray<WorldPoint>`\n * @since 0.4\n * @stable\n * @example\n * const state: FillBetweenState = {\n * kind: \"fill-between\",\n * edgeA: [{ time: 0, price: 1 }],\n * edgeB: [{ time: 0, price: 0 }],\n * style: { fill: \"#3b82f6\" },\n * };\n * void state;\n */\nexport type FillBetweenState = DrawingMeta & {\n readonly kind: \"fill-between\";\n readonly edgeA: ReadonlyArray<WorldPoint>;\n readonly edgeB: ReadonlyArray<WorldPoint>;\n readonly style: FillBetweenStyle;\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 63 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 | FillBetweenState\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"]}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { Color, LineStyle } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Shared render-order mixin intersected into every `draw.*` option bag.
|
|
4
|
+
*
|
|
5
|
+
* Presentation-only render-order key (z-index). Default `0`. Higher
|
|
6
|
+
* renders on top. A drawing with negative `z` can render **below**
|
|
7
|
+
* plots (which default to a lower band than drawings). Finite numbers
|
|
8
|
+
* only; affects stacking only, never geometry or anchors.
|
|
9
|
+
*
|
|
10
|
+
* @formula N/A — render-order key, no math
|
|
11
|
+
* @anchors N/A — does not move any anchor
|
|
12
|
+
* @since 1.4
|
|
13
|
+
* @stable
|
|
14
|
+
* @example
|
|
15
|
+
* draw.line(a, b, { z: -1 }); // beneath the plots
|
|
16
|
+
*/
|
|
17
|
+
export interface ZOrdered {
|
|
18
|
+
readonly z?: number;
|
|
19
|
+
}
|
|
2
20
|
/**
|
|
3
21
|
* Line / ray / horizontal-line / vertical-line / channel-edge stroke
|
|
4
22
|
* style. `extendLeft` / `extendRight` collapse the invinite `ray` and
|
|
@@ -12,7 +30,7 @@ import type { Color, LineStyle } from "../types.js";
|
|
|
12
30
|
* const s: LineDrawStyle = { color: "#3b82f6", lineWidth: 2, lineStyle: "solid" };
|
|
13
31
|
* void s;
|
|
14
32
|
*/
|
|
15
|
-
export type LineDrawStyle = {
|
|
33
|
+
export type LineDrawStyle = ZOrdered & {
|
|
16
34
|
readonly color?: Color;
|
|
17
35
|
readonly lineWidth?: number;
|
|
18
36
|
readonly lineStyle?: LineStyle;
|
|
@@ -38,7 +56,7 @@ export type LineDrawStyle = {
|
|
|
38
56
|
* };
|
|
39
57
|
* void s;
|
|
40
58
|
*/
|
|
41
|
-
export type ShapeStyle = {
|
|
59
|
+
export type ShapeStyle = ZOrdered & {
|
|
42
60
|
readonly stroke?: Color;
|
|
43
61
|
readonly fill?: Color;
|
|
44
62
|
readonly lineWidth?: number;
|
|
@@ -57,7 +75,7 @@ export type ShapeStyle = {
|
|
|
57
75
|
* const s: HighlighterStyle = { color: "#facc15", alpha: 0.3 };
|
|
58
76
|
* void s;
|
|
59
77
|
*/
|
|
60
|
-
export type HighlighterStyle = {
|
|
78
|
+
export type HighlighterStyle = ZOrdered & {
|
|
61
79
|
readonly color: Color;
|
|
62
80
|
readonly alpha: number;
|
|
63
81
|
};
|
|
@@ -73,7 +91,7 @@ export type HighlighterStyle = {
|
|
|
73
91
|
* const s: BrushStyle = { stroke: "#000000", fill: "#ffffff" };
|
|
74
92
|
* void s;
|
|
75
93
|
*/
|
|
76
|
-
export type BrushStyle = {
|
|
94
|
+
export type BrushStyle = ZOrdered & {
|
|
77
95
|
readonly stroke: Color;
|
|
78
96
|
readonly fill: Color;
|
|
79
97
|
};
|
|
@@ -95,7 +113,7 @@ export type BrushStyle = {
|
|
|
95
113
|
* };
|
|
96
114
|
* void t;
|
|
97
115
|
*/
|
|
98
|
-
export type TextOpts = {
|
|
116
|
+
export type TextOpts = ZOrdered & {
|
|
99
117
|
readonly color?: Color;
|
|
100
118
|
readonly size?: "tiny" | "small" | "normal" | "large" | "huge";
|
|
101
119
|
readonly halign?: "left" | "center" | "right";
|
|
@@ -129,7 +147,7 @@ export type ArrowOpts = LineDrawStyle & {
|
|
|
129
147
|
* const m: ArrowMarkerOpts = { color: "#10b981", text: "Long" };
|
|
130
148
|
* void m;
|
|
131
149
|
*/
|
|
132
|
-
export type ArrowMarkerOpts = {
|
|
150
|
+
export type ArrowMarkerOpts = ZOrdered & {
|
|
133
151
|
readonly color?: Color;
|
|
134
152
|
readonly text?: string;
|
|
135
153
|
};
|
|
@@ -147,6 +165,31 @@ export type ArrowMarkerOpts = {
|
|
|
147
165
|
export type PathOpts = LineDrawStyle & {
|
|
148
166
|
readonly closed?: boolean;
|
|
149
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* Style for {@link draw.fillBetween} — a filled ribbon between two
|
|
170
|
+
* edges. Stroke fields are optional (the band may be fill-only);
|
|
171
|
+
* `fill` + `fillAlpha` reuse the {@link ShapeStyle} fill model.
|
|
172
|
+
*
|
|
173
|
+
* @formula N/A — style bag, no math
|
|
174
|
+
* @anchors N/A — style fields only
|
|
175
|
+
* @since 0.4
|
|
176
|
+
* @stable
|
|
177
|
+
* @example
|
|
178
|
+
* const s: FillBetweenStyle = { fill: "#3b82f6", fillAlpha: 0.2 };
|
|
179
|
+
* void s;
|
|
180
|
+
*/
|
|
181
|
+
export type FillBetweenStyle = ZOrdered & {
|
|
182
|
+
/** Optional outline colour drawn around the ribbon. */
|
|
183
|
+
readonly color?: Color;
|
|
184
|
+
/** Outline width in px (default 0 / no stroke when `color` unset). */
|
|
185
|
+
readonly lineWidth?: number;
|
|
186
|
+
/** Outline dash style. */
|
|
187
|
+
readonly lineStyle?: LineStyle;
|
|
188
|
+
/** Fill colour of the band. */
|
|
189
|
+
readonly fill?: Color;
|
|
190
|
+
/** Fill opacity 0..1 (`applyShapeStyle` currently defaults to 1). */
|
|
191
|
+
readonly fillAlpha?: number;
|
|
192
|
+
};
|
|
150
193
|
/**
|
|
151
194
|
* Fibonacci-family style. `levels` defaults to the canonical
|
|
152
195
|
* 0.236 / 0.382 / 0.5 / 0.618 / 0.786 / 1.0 / 1.272 / 1.618 / 2.618 /
|
|
@@ -167,7 +210,7 @@ export type PathOpts = LineDrawStyle & {
|
|
|
167
210
|
* };
|
|
168
211
|
* void f;
|
|
169
212
|
*/
|
|
170
|
-
export type FibOpts = {
|
|
213
|
+
export type FibOpts = ZOrdered & {
|
|
171
214
|
readonly levels?: ReadonlyArray<number>;
|
|
172
215
|
readonly showLabels?: boolean;
|
|
173
216
|
readonly color?: Color;
|
|
@@ -192,7 +235,7 @@ export type FibOpts = {
|
|
|
192
235
|
* };
|
|
193
236
|
* void r;
|
|
194
237
|
*/
|
|
195
|
-
export type RegressionTrendOpts = {
|
|
238
|
+
export type RegressionTrendOpts = ZOrdered & {
|
|
196
239
|
readonly source?: "close" | "open" | "high" | "low" | "hl2" | "hlc3" | "ohlc4" | "hlcc4";
|
|
197
240
|
readonly stdevMultiplier?: number;
|
|
198
241
|
readonly showUpperBand?: boolean;
|
|
@@ -212,7 +255,7 @@ export type RegressionTrendOpts = {
|
|
|
212
255
|
* const f: FrameOpts = { label: "Trade idea", bgColor: "#f1f5f9" };
|
|
213
256
|
* void f;
|
|
214
257
|
*/
|
|
215
|
-
export type FrameOpts = {
|
|
258
|
+
export type FrameOpts = ZOrdered & {
|
|
216
259
|
readonly label?: string;
|
|
217
260
|
readonly bgColor?: Color;
|
|
218
261
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawingStyle.d.ts","sourceRoot":"","sources":["../../src/draw/drawingStyle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,aAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"drawingStyle.d.ts","sourceRoot":"","sources":["../../src/draw/drawingStyle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,QAAQ;IACrB,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,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G,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IACzF,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"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 * Shared render-order mixin intersected into every `draw.*` option bag.\n *\n * Presentation-only render-order key (z-index). Default `0`. Higher\n * renders on top. A drawing with negative `z` can render **below**\n * plots (which default to a lower band than drawings). Finite numbers\n * only; affects stacking only, never geometry or anchors.\n *\n * @formula N/A — render-order key, no math\n * @anchors N/A — does not move any anchor\n * @since 1.4\n * @stable\n * @example\n * draw.line(a, b, { z: -1 }); // beneath the plots\n */\nexport interface ZOrdered {\n readonly z?: number;\n}\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 = ZOrdered & {\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 = ZOrdered & {\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 = ZOrdered & {\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 = ZOrdered & {\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 = ZOrdered & {\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 = ZOrdered & {\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 * Style for {@link draw.fillBetween} — a filled ribbon between two\n * edges. Stroke fields are optional (the band may be fill-only);\n * `fill` + `fillAlpha` reuse the {@link ShapeStyle} fill model.\n *\n * @formula N/A — style bag, no math\n * @anchors N/A — style fields only\n * @since 0.4\n * @stable\n * @example\n * const s: FillBetweenStyle = { fill: \"#3b82f6\", fillAlpha: 0.2 };\n * void s;\n */\nexport type FillBetweenStyle = ZOrdered & {\n /** Optional outline colour drawn around the ribbon. */\n readonly color?: Color;\n /** Outline width in px (default 0 / no stroke when `color` unset). */\n readonly lineWidth?: number;\n /** Outline dash style. */\n readonly lineStyle?: LineStyle;\n /** Fill colour of the band. */\n readonly fill?: Color;\n /** Fill opacity 0..1 (`applyShapeStyle` currently defaults to 1). */\n readonly fillAlpha?: number;\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 = ZOrdered & {\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 = ZOrdered & {\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 = ZOrdered & {\n readonly label?: string;\n readonly bgColor?: Color;\n};\n"]}
|