@invinite-org/chartlang-core 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1694 -0
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/alert/alert.d.ts +32 -0
- package/dist/alert/alert.d.ts.map +1 -0
- package/dist/alert/alert.js +19 -0
- package/dist/alert/alert.js.map +1 -0
- package/dist/alert/index.d.ts +2 -0
- package/dist/alert/index.d.ts.map +1 -0
- package/dist/alert/index.js +4 -0
- package/dist/alert/index.js.map +1 -0
- package/dist/color/colorHelpers.d.ts +65 -0
- package/dist/color/colorHelpers.d.ts.map +1 -0
- package/dist/color/colorHelpers.js +137 -0
- package/dist/color/colorHelpers.js.map +1 -0
- package/dist/color/index.d.ts +37 -0
- package/dist/color/index.d.ts.map +1 -0
- package/dist/color/index.js +23 -0
- package/dist/color/index.js.map +1 -0
- package/dist/color/parseColor.d.ts +48 -0
- package/dist/color/parseColor.d.ts.map +1 -0
- package/dist/color/parseColor.js +141 -0
- package/dist/color/parseColor.js.map +1 -0
- package/dist/define/defineAlert.d.ts +43 -0
- package/dist/define/defineAlert.d.ts.map +1 -0
- package/dist/define/defineAlert.js +49 -0
- package/dist/define/defineAlert.js.map +1 -0
- package/dist/define/defineAlertCondition.d.ts +65 -0
- package/dist/define/defineAlertCondition.d.ts.map +1 -0
- package/dist/define/defineAlertCondition.js +64 -0
- package/dist/define/defineAlertCondition.js.map +1 -0
- package/dist/define/defineDrawing.d.ts +62 -0
- package/dist/define/defineDrawing.d.ts.map +1 -0
- package/dist/define/defineDrawing.js +67 -0
- package/dist/define/defineDrawing.js.map +1 -0
- package/dist/define/defineIndicator.d.ts +48 -0
- package/dist/define/defineIndicator.d.ts.map +1 -0
- package/dist/define/defineIndicator.js +54 -0
- package/dist/define/defineIndicator.js.map +1 -0
- package/dist/define/index.d.ts +6 -0
- package/dist/define/index.d.ts.map +1 -0
- package/dist/define/index.js +7 -0
- package/dist/define/index.js.map +1 -0
- package/dist/define/overrides.d.ts +102 -0
- package/dist/define/overrides.d.ts.map +1 -0
- package/dist/define/overrides.js +4 -0
- package/dist/define/overrides.js.map +1 -0
- package/dist/draw/buckets.d.ts +57 -0
- package/dist/draw/buckets.d.ts.map +1 -0
- package/dist/draw/buckets.js +110 -0
- package/dist/draw/buckets.js.map +1 -0
- package/dist/draw/draw.d.ts +128 -0
- package/dist/draw/draw.d.ts.map +1 -0
- package/dist/draw/draw.js +40 -0
- package/dist/draw/draw.js.map +1 -0
- package/dist/draw/drawingKind.d.ts +80 -0
- package/dist/draw/drawingKind.d.ts.map +1 -0
- package/dist/draw/drawingKind.js +177 -0
- package/dist/draw/drawingKind.js.map +1 -0
- package/dist/draw/drawingState.d.ts +1420 -0
- package/dist/draw/drawingState.d.ts.map +1 -0
- package/dist/draw/drawingState.js +4 -0
- package/dist/draw/drawingState.js.map +1 -0
- package/dist/draw/drawingStyle.d.ts +219 -0
- package/dist/draw/drawingStyle.d.ts.map +1 -0
- package/dist/draw/drawingStyle.js +4 -0
- package/dist/draw/drawingStyle.js.map +1 -0
- package/dist/draw/handle.d.ts +32 -0
- package/dist/draw/handle.d.ts.map +1 -0
- package/dist/draw/handle.js +4 -0
- package/dist/draw/handle.js.map +1 -0
- package/dist/draw/index.d.ts +13 -0
- package/dist/draw/index.d.ts.map +1 -0
- package/dist/draw/index.js +7 -0
- package/dist/draw/index.js.map +1 -0
- package/dist/draw/table.d.ts +84 -0
- package/dist/draw/table.d.ts.map +1 -0
- package/dist/draw/table.js +22 -0
- package/dist/draw/table.js.map +1 -0
- package/dist/draw/worldPoint.d.ts +114 -0
- package/dist/draw/worldPoint.d.ts.map +1 -0
- package/dist/draw/worldPoint.js +4 -0
- package/dist/draw/worldPoint.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/input/index.d.ts +3 -0
- package/dist/input/index.d.ts.map +1 -0
- package/dist/input/index.js +4 -0
- package/dist/input/index.js.map +1 -0
- package/dist/input/input.d.ts +174 -0
- package/dist/input/input.d.ts.map +1 -0
- package/dist/input/input.js +174 -0
- package/dist/input/input.js.map +1 -0
- package/dist/input/inputDescriptor.d.ts +204 -0
- package/dist/input/inputDescriptor.d.ts.map +1 -0
- package/dist/input/inputDescriptor.js +4 -0
- package/dist/input/inputDescriptor.js.map +1 -0
- package/dist/interval/intervalToSeconds.d.ts +20 -0
- package/dist/interval/intervalToSeconds.d.ts.map +1 -0
- package/dist/interval/intervalToSeconds.js +50 -0
- package/dist/interval/intervalToSeconds.js.map +1 -0
- package/dist/plot/index.d.ts +2 -0
- package/dist/plot/index.d.ts.map +1 -0
- package/dist/plot/index.js +4 -0
- package/dist/plot/index.js.map +1 -0
- package/dist/plot/plot.d.ts +277 -0
- package/dist/plot/plot.d.ts.map +1 -0
- package/dist/plot/plot.js +37 -0
- package/dist/plot/plot.js.map +1 -0
- package/dist/request/index.d.ts +2 -0
- package/dist/request/index.d.ts.map +1 -0
- package/dist/request/index.js +4 -0
- package/dist/request/index.js.map +1 -0
- package/dist/request/request.d.ts +106 -0
- package/dist/request/request.d.ts.map +1 -0
- package/dist/request/request.js +44 -0
- package/dist/request/request.js.map +1 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/runtime.d.ts +84 -0
- package/dist/runtime/runtime.d.ts.map +1 -0
- package/dist/runtime/runtime.js +72 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/dist/state/index.d.ts +5 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +4 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/mutableSlot.d.ts +25 -0
- package/dist/state/mutableSlot.d.ts.map +1 -0
- package/dist/state/mutableSlot.js +4 -0
- package/dist/state/mutableSlot.js.map +1 -0
- package/dist/state/snapshot.d.ts +108 -0
- package/dist/state/snapshot.d.ts.map +1 -0
- package/dist/state/snapshot.js +4 -0
- package/dist/state/snapshot.js.map +1 -0
- package/dist/state/state.d.ts +86 -0
- package/dist/state/state.d.ts.map +1 -0
- package/dist/state/state.js +95 -0
- package/dist/state/state.js.map +1 -0
- package/dist/statefulPrimitives.d.ts +71 -0
- package/dist/statefulPrimitives.d.ts.map +1 -0
- package/dist/statefulPrimitives.js +234 -0
- package/dist/statefulPrimitives.js.map +1 -0
- package/dist/ta/index.d.ts +2 -0
- package/dist/ta/index.d.ts.map +1 -0
- package/dist/ta/index.js +4 -0
- package/dist/ta/index.js.map +1 -0
- package/dist/ta/ta.d.ts +2476 -0
- package/dist/ta/ta.d.ts.map +1 -0
- package/dist/ta/ta.js +312 -0
- package/dist/ta/ta.js.map +1 -0
- package/dist/time/_lib/dateTimeFormatCache.d.ts +11 -0
- package/dist/time/_lib/dateTimeFormatCache.d.ts.map +1 -0
- package/dist/time/_lib/dateTimeFormatCache.js +22 -0
- package/dist/time/_lib/dateTimeFormatCache.js.map +1 -0
- package/dist/time/index.d.ts +7 -0
- package/dist/time/index.d.ts.map +1 -0
- package/dist/time/index.js +8 -0
- package/dist/time/index.js.map +1 -0
- package/dist/time/nyDayKey.d.ts +24 -0
- package/dist/time/nyDayKey.d.ts.map +1 -0
- package/dist/time/nyDayKey.js +49 -0
- package/dist/time/nyDayKey.js.map +1 -0
- package/dist/time/session.d.ts +16 -0
- package/dist/time/session.d.ts.map +1 -0
- package/dist/time/session.js +18 -0
- package/dist/time/session.js.map +1 -0
- package/dist/time/sessionBoundaries.d.ts +40 -0
- package/dist/time/sessionBoundaries.d.ts.map +1 -0
- package/dist/time/sessionBoundaries.js +102 -0
- package/dist/time/sessionBoundaries.js.map +1 -0
- package/dist/time/types.d.ts +34 -0
- package/dist/time/types.d.ts.map +1 -0
- package/dist/time/types.js +4 -0
- package/dist/time/types.js.map +1 -0
- package/dist/time/weekKey.d.ts +11 -0
- package/dist/time/weekKey.d.ts.map +1 -0
- package/dist/time/weekKey.js +25 -0
- package/dist/time/weekKey.js.map +1 -0
- package/dist/time/weekday.d.ts +12 -0
- package/dist/time/weekday.d.ts.map +1 -0
- package/dist/time/weekday.js +22 -0
- package/dist/time/weekday.js.map +1 -0
- package/dist/types.d.ts +464 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/views/barstate.d.ts +40 -0
- package/dist/views/barstate.d.ts.map +1 -0
- package/dist/views/barstate.js +22 -0
- package/dist/views/barstate.js.map +1 -0
- package/dist/views/index.d.ts +4 -0
- package/dist/views/index.d.ts.map +1 -0
- package/dist/views/index.js +4 -0
- package/dist/views/index.js.map +1 -0
- package/dist/views/syminfo.d.ts +46 -0
- package/dist/views/syminfo.d.ts.map +1 -0
- package/dist/views/syminfo.js +25 -0
- package/dist/views/syminfo.js.map +1 -0
- package/dist/views/timeframe.d.ts +40 -0
- package/dist/views/timeframe.d.ts.map +1 -0
- package/dist/views/timeframe.js +21 -0
- package/dist/views/timeframe.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { DrawingKind } from "./drawingKind.js";
|
|
2
|
+
/**
|
|
3
|
+
* Canonical bucket name a {@link DrawingKind} maps to under the
|
|
4
|
+
* `DrawingCounts` 5-bag budget (`{ lines, labels, boxes, polylines,
|
|
5
|
+
* other }`). The adapter-kit `Capabilities.maxDrawingsPerScript` and
|
|
6
|
+
* the script-side `ScriptManifest.maxDrawings?` both pin the same five
|
|
7
|
+
* bucket names. The runtime budget enforcer counts emissions per
|
|
8
|
+
* bucket and drops the overflow with `drawing-budget-exceeded`.
|
|
9
|
+
*
|
|
10
|
+
* @formula bucket = KIND_BUCKET.get(kind)
|
|
11
|
+
* @anchors kind: DrawingKind → bucket: "lines"|"labels"|"boxes"|"polylines"|"other"
|
|
12
|
+
* @since 0.3
|
|
13
|
+
* @stable
|
|
14
|
+
* @example
|
|
15
|
+
* const b: DrawingBucket = "lines";
|
|
16
|
+
* void b;
|
|
17
|
+
*/
|
|
18
|
+
export type DrawingBucket = "lines" | "labels" | "boxes" | "polylines" | "other";
|
|
19
|
+
/**
|
|
20
|
+
* Per-kind bucket assignment. Pinned table; every entry of
|
|
21
|
+
* {@link DrawingKind} appears exactly once (asserted by
|
|
22
|
+
* `buckets.test.ts`).
|
|
23
|
+
*
|
|
24
|
+
* Mapping rationale (Phase-3 task README §"Architecture Decisions"):
|
|
25
|
+
* lines/rays/horizontalLine/verticalLine/crossLine/trendAngle → `lines`;
|
|
26
|
+
* rectangle/rotatedRectangle/triangle/circle/ellipse → `boxes`;
|
|
27
|
+
* path/polyline/curves/freehand/channels/pitchforks/patterns/elliott →
|
|
28
|
+
* `polylines`; text/arrow/arrowMarker/arrowMarkUp/arrowMarkDown +
|
|
29
|
+
* marker → `labels`; fib / gann / cycles / containers / table → `other`.
|
|
30
|
+
*
|
|
31
|
+
* @formula bucket = KIND_BUCKET.get(kind)
|
|
32
|
+
* @anchors kind: DrawingKind → bucket: "lines"|"labels"|"boxes"|"polylines"|"other"
|
|
33
|
+
* @since 0.3
|
|
34
|
+
* @stable
|
|
35
|
+
* @example
|
|
36
|
+
* import { KIND_BUCKET } from "@invinite-org/chartlang-core";
|
|
37
|
+
* const b = KIND_BUCKET.get("fib-retracement"); // "other"
|
|
38
|
+
* void b;
|
|
39
|
+
*/
|
|
40
|
+
export declare const KIND_BUCKET: ReadonlyMap<DrawingKind, DrawingBucket>;
|
|
41
|
+
/**
|
|
42
|
+
* Return the {@link DrawingBucket} for a given {@link DrawingKind}.
|
|
43
|
+
* Throws if the kind is not in the map — covers the defensive branch
|
|
44
|
+
* for callers that pass an unverified string (e.g. a future kind
|
|
45
|
+
* round-tripped from the wire before its bucket entry lands).
|
|
46
|
+
*
|
|
47
|
+
* @formula bucket = KIND_BUCKET.get(kind)
|
|
48
|
+
* @anchors kind: DrawingKind → bucket: "lines"|"labels"|"boxes"|"polylines"|"other"
|
|
49
|
+
* @since 0.3
|
|
50
|
+
* @stable
|
|
51
|
+
* @example
|
|
52
|
+
* import { bucketFor } from "@invinite-org/chartlang-core";
|
|
53
|
+
* const bucket = bucketFor("rectangle"); // "boxes"
|
|
54
|
+
* void bucket;
|
|
55
|
+
*/
|
|
56
|
+
export declare function bucketFor(kind: DrawingKind): DrawingBucket;
|
|
57
|
+
//# sourceMappingURL=buckets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buckets.d.ts","sourceRoot":"","sources":["../../src/draw/buckets.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,WAAW,EAAE,aAAa,CAkE9D,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,aAAa,CAM1D"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Copyright (c) 2026 Invinite. Licensed under the MIT License.
|
|
2
|
+
// See the LICENSE file in the repo root for full license text.
|
|
3
|
+
/**
|
|
4
|
+
* Per-kind bucket assignment. Pinned table; every entry of
|
|
5
|
+
* {@link DrawingKind} appears exactly once (asserted by
|
|
6
|
+
* `buckets.test.ts`).
|
|
7
|
+
*
|
|
8
|
+
* Mapping rationale (Phase-3 task README §"Architecture Decisions"):
|
|
9
|
+
* lines/rays/horizontalLine/verticalLine/crossLine/trendAngle → `lines`;
|
|
10
|
+
* rectangle/rotatedRectangle/triangle/circle/ellipse → `boxes`;
|
|
11
|
+
* path/polyline/curves/freehand/channels/pitchforks/patterns/elliott →
|
|
12
|
+
* `polylines`; text/arrow/arrowMarker/arrowMarkUp/arrowMarkDown +
|
|
13
|
+
* marker → `labels`; fib / gann / cycles / containers / table → `other`.
|
|
14
|
+
*
|
|
15
|
+
* @formula bucket = KIND_BUCKET.get(kind)
|
|
16
|
+
* @anchors kind: DrawingKind → bucket: "lines"|"labels"|"boxes"|"polylines"|"other"
|
|
17
|
+
* @since 0.3
|
|
18
|
+
* @stable
|
|
19
|
+
* @example
|
|
20
|
+
* import { KIND_BUCKET } from "@invinite-org/chartlang-core";
|
|
21
|
+
* const b = KIND_BUCKET.get("fib-retracement"); // "other"
|
|
22
|
+
* void b;
|
|
23
|
+
*/
|
|
24
|
+
export const KIND_BUCKET = new Map([
|
|
25
|
+
["line", "lines"],
|
|
26
|
+
["horizontal-line", "lines"],
|
|
27
|
+
["horizontal-ray", "lines"],
|
|
28
|
+
["vertical-line", "lines"],
|
|
29
|
+
["cross-line", "lines"],
|
|
30
|
+
["trend-angle", "lines"],
|
|
31
|
+
["rectangle", "boxes"],
|
|
32
|
+
["rotated-rectangle", "boxes"],
|
|
33
|
+
["triangle", "boxes"],
|
|
34
|
+
["polyline", "polylines"],
|
|
35
|
+
["circle", "boxes"],
|
|
36
|
+
["ellipse", "boxes"],
|
|
37
|
+
["path", "polylines"],
|
|
38
|
+
["marker", "labels"],
|
|
39
|
+
["arc", "polylines"],
|
|
40
|
+
["curve", "polylines"],
|
|
41
|
+
["double-curve", "polylines"],
|
|
42
|
+
["pen", "polylines"],
|
|
43
|
+
["highlighter", "polylines"],
|
|
44
|
+
["brush", "polylines"],
|
|
45
|
+
["text", "labels"],
|
|
46
|
+
["arrow", "labels"],
|
|
47
|
+
["arrow-marker", "labels"],
|
|
48
|
+
["arrow-mark-up", "labels"],
|
|
49
|
+
["arrow-mark-down", "labels"],
|
|
50
|
+
["trend-channel", "polylines"],
|
|
51
|
+
["flat-top-bottom", "polylines"],
|
|
52
|
+
["disjoint-channel", "polylines"],
|
|
53
|
+
["regression-trend", "polylines"],
|
|
54
|
+
["fib-retracement", "other"],
|
|
55
|
+
["fib-trend-extension", "other"],
|
|
56
|
+
["fib-channel", "other"],
|
|
57
|
+
["fib-time-zone", "other"],
|
|
58
|
+
["fib-wedge", "other"],
|
|
59
|
+
["fib-speed-fan", "other"],
|
|
60
|
+
["fib-speed-arcs", "other"],
|
|
61
|
+
["fib-spiral", "other"],
|
|
62
|
+
["fib-circles", "other"],
|
|
63
|
+
["fib-trend-time", "other"],
|
|
64
|
+
["gann-box", "other"],
|
|
65
|
+
["gann-square-fixed", "other"],
|
|
66
|
+
["gann-square", "other"],
|
|
67
|
+
["gann-fan", "other"],
|
|
68
|
+
["pitchfork", "polylines"],
|
|
69
|
+
["pitchfan", "polylines"],
|
|
70
|
+
["xabcd-pattern", "polylines"],
|
|
71
|
+
["cypher-pattern", "polylines"],
|
|
72
|
+
["head-and-shoulders", "polylines"],
|
|
73
|
+
["abcd-pattern", "polylines"],
|
|
74
|
+
["triangle-pattern", "polylines"],
|
|
75
|
+
["three-drives-pattern", "polylines"],
|
|
76
|
+
["elliott-impulse-wave", "polylines"],
|
|
77
|
+
["elliott-correction-wave", "polylines"],
|
|
78
|
+
["elliott-triangle-wave", "polylines"],
|
|
79
|
+
["elliott-double-combo", "polylines"],
|
|
80
|
+
["elliott-triple-combo", "polylines"],
|
|
81
|
+
["cyclic-lines", "other"],
|
|
82
|
+
["time-cycles", "other"],
|
|
83
|
+
["sine-line", "other"],
|
|
84
|
+
["group", "other"],
|
|
85
|
+
["frame", "other"],
|
|
86
|
+
["table", "other"],
|
|
87
|
+
]);
|
|
88
|
+
/**
|
|
89
|
+
* Return the {@link DrawingBucket} for a given {@link DrawingKind}.
|
|
90
|
+
* Throws if the kind is not in the map — covers the defensive branch
|
|
91
|
+
* for callers that pass an unverified string (e.g. a future kind
|
|
92
|
+
* round-tripped from the wire before its bucket entry lands).
|
|
93
|
+
*
|
|
94
|
+
* @formula bucket = KIND_BUCKET.get(kind)
|
|
95
|
+
* @anchors kind: DrawingKind → bucket: "lines"|"labels"|"boxes"|"polylines"|"other"
|
|
96
|
+
* @since 0.3
|
|
97
|
+
* @stable
|
|
98
|
+
* @example
|
|
99
|
+
* import { bucketFor } from "@invinite-org/chartlang-core";
|
|
100
|
+
* const bucket = bucketFor("rectangle"); // "boxes"
|
|
101
|
+
* void bucket;
|
|
102
|
+
*/
|
|
103
|
+
export function bucketFor(kind) {
|
|
104
|
+
const bucket = KIND_BUCKET.get(kind);
|
|
105
|
+
if (bucket === undefined) {
|
|
106
|
+
throw new Error(`No bucket assigned for drawing kind '${kind}'`);
|
|
107
|
+
}
|
|
108
|
+
return bucket;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=buckets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buckets.js","sourceRoot":"","sources":["../../src/draw/buckets.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAsB/D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,WAAW,GAA4C,IAAI,GAAG,CAGzE;IACE,CAAC,MAAM,EAAE,OAAO,CAAC;IACjB,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAC5B,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAC3B,CAAC,eAAe,EAAE,OAAO,CAAC;IAC1B,CAAC,YAAY,EAAE,OAAO,CAAC;IACvB,CAAC,aAAa,EAAE,OAAO,CAAC;IACxB,CAAC,WAAW,EAAE,OAAO,CAAC;IACtB,CAAC,mBAAmB,EAAE,OAAO,CAAC;IAC9B,CAAC,UAAU,EAAE,OAAO,CAAC;IACrB,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,QAAQ,EAAE,OAAO,CAAC;IACnB,CAAC,SAAS,EAAE,OAAO,CAAC;IACpB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,OAAO,EA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,cAAc,EAAE,WAAW,CAAC;IAC7B,CAAC,kBAAkB,EAAE,WAAW,CAAC;IACjC,CAAC,sBAAsB,EAAE,WAAW,CAAC;IACrC,CAAC,sBAAsB,EAAE,WAAW,CAAC;IACrC,CAAC,yBAAyB,EAAE,WAAW,CAAC;IACxC,CAAC,uBAAuB,EAAE,WAAW,CAAC;IACtC,CAAC,sBAAsB,EAAE,WAAW,CAAC;IACrC,CAAC,sBAAsB,EAAE,WAAW,CAAC;IACrC,CAAC,cAAc,EAAE,OAAO,CAAC;IACzB,CAAC,aAAa,EAAE,OAAO,CAAC;IACxB,CAAC,WAAW,EAAE,OAAO,CAAC;IACtB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,OAAO,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,SAAS,CAAC,IAAiB;IACvC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,wCAAwC,IAAI,GAAG,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { Price, Time } from "../types.js";
|
|
2
|
+
import type { ArrowMarkerOpts, ArrowOpts, BrushStyle, FibOpts, FrameOpts, HighlighterStyle, LineDrawStyle, PathOpts, RegressionTrendOpts, ShapeStyle, TextOpts } from "./drawingStyle.js";
|
|
3
|
+
import type { DrawingHandle } from "./handle.js";
|
|
4
|
+
import type { TableOpts } from "./table.js";
|
|
5
|
+
import type { AnchorHept, AnchorQuad, AnchorQuint, AnchorTriple, WorldPoint } from "./worldPoint.js";
|
|
6
|
+
/**
|
|
7
|
+
* The script-facing `draw.*` namespace. Each method is stateful across
|
|
8
|
+
* calls — the compiler injects a callsite slot id so the runtime can
|
|
9
|
+
* track the per-handle `DrawingState` across bars — and returns a
|
|
10
|
+
* {@link DrawingHandle}. Adapters that omit a kind degrade silently
|
|
11
|
+
* with `unsupported-drawing-kind` (PLAN.md §7.4); excess emissions
|
|
12
|
+
* drop with `drawing-budget-exceeded` once the per-script bucket is
|
|
13
|
+
* full.
|
|
14
|
+
*
|
|
15
|
+
* Every kind lives as a FLAT method directly on `DrawNamespace` —
|
|
16
|
+
* script authors call `draw.fibRetracement(a, b)` /
|
|
17
|
+
* `draw.gannBox(a, b)` / `draw.elliottImpulseWave(anchors)` /
|
|
18
|
+
* `draw.xabcdPattern(anchors)`, matching the flat camelCase names in
|
|
19
|
+
* `STATEFUL_PRIMITIVES` and Pine + invinite parity. The wire format
|
|
20
|
+
* keeps the kebab-case `DrawingKind`.
|
|
21
|
+
*
|
|
22
|
+
* Phase-3 implementations live in `@invinite-org/chartlang-runtime`;
|
|
23
|
+
* this file ships the script-author type plus a throwing-stub `draw`
|
|
24
|
+
* value (mirrors `plot/plot.ts:plot`). Tasks 5–18 land the runtime
|
|
25
|
+
* impl per category.
|
|
26
|
+
*
|
|
27
|
+
* @formula N/A — namespace surface; per-method runtime impl in Tasks 5–18
|
|
28
|
+
* @anchors per-method — see the per-kind state shapes in `drawingState.ts`
|
|
29
|
+
* @since 0.3
|
|
30
|
+
* @stable
|
|
31
|
+
* @example
|
|
32
|
+
* import type { DrawNamespace } from "@invinite-org/chartlang-core";
|
|
33
|
+
* const _ns: DrawNamespace | null = null;
|
|
34
|
+
* void _ns;
|
|
35
|
+
*/
|
|
36
|
+
export type DrawNamespace = {
|
|
37
|
+
line(a: WorldPoint, b: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
38
|
+
horizontalLine(price: Price, opts?: LineDrawStyle): DrawingHandle;
|
|
39
|
+
horizontalRay(anchor: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
40
|
+
verticalLine(time: Time, opts?: LineDrawStyle): DrawingHandle;
|
|
41
|
+
crossLine(anchor: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
42
|
+
trendAngle(a: WorldPoint, b: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
43
|
+
rectangle(a: WorldPoint, b: WorldPoint, opts?: ShapeStyle): DrawingHandle;
|
|
44
|
+
rotatedRectangle(anchors: AnchorQuad, opts?: ShapeStyle): DrawingHandle;
|
|
45
|
+
triangle(anchors: AnchorTriple, opts?: ShapeStyle): DrawingHandle;
|
|
46
|
+
polyline(anchors: ReadonlyArray<WorldPoint>, opts?: LineDrawStyle): DrawingHandle;
|
|
47
|
+
circle(centre: WorldPoint, radiusAnchor: WorldPoint, opts?: ShapeStyle): DrawingHandle;
|
|
48
|
+
ellipse(a: WorldPoint, b: WorldPoint, opts?: ShapeStyle): DrawingHandle;
|
|
49
|
+
path(anchors: ReadonlyArray<WorldPoint>, opts?: PathOpts): DrawingHandle;
|
|
50
|
+
marker(anchor: WorldPoint, opts?: TextOpts & {
|
|
51
|
+
readonly text?: string;
|
|
52
|
+
readonly value?: number;
|
|
53
|
+
}): DrawingHandle;
|
|
54
|
+
arc(anchors: AnchorTriple, opts?: LineDrawStyle): DrawingHandle;
|
|
55
|
+
curve(anchors: AnchorTriple, opts?: LineDrawStyle): DrawingHandle;
|
|
56
|
+
doubleCurve(anchors: AnchorQuint, opts?: LineDrawStyle): DrawingHandle;
|
|
57
|
+
pen(anchors: ReadonlyArray<WorldPoint>, opts?: LineDrawStyle): DrawingHandle;
|
|
58
|
+
highlighter(anchors: ReadonlyArray<WorldPoint>, opts: HighlighterStyle): DrawingHandle;
|
|
59
|
+
brush(anchors: ReadonlyArray<WorldPoint>, opts: BrushStyle): DrawingHandle;
|
|
60
|
+
text(anchor: WorldPoint, body: string, opts?: TextOpts): DrawingHandle;
|
|
61
|
+
arrow(a: WorldPoint, b: WorldPoint, opts?: ArrowOpts): DrawingHandle;
|
|
62
|
+
arrowMarker(anchor: WorldPoint, opts?: ArrowMarkerOpts): DrawingHandle;
|
|
63
|
+
arrowMarkUp(anchor: WorldPoint, opts?: ArrowMarkerOpts): DrawingHandle;
|
|
64
|
+
arrowMarkDown(anchor: WorldPoint, opts?: ArrowMarkerOpts): DrawingHandle;
|
|
65
|
+
trendChannel(anchors: AnchorTriple, opts?: LineDrawStyle): DrawingHandle;
|
|
66
|
+
flatTopBottom(anchors: AnchorTriple, opts?: LineDrawStyle): DrawingHandle;
|
|
67
|
+
disjointChannel(anchors: AnchorQuad, opts?: LineDrawStyle): DrawingHandle;
|
|
68
|
+
regressionTrend(a: WorldPoint, b: WorldPoint, opts?: RegressionTrendOpts): DrawingHandle;
|
|
69
|
+
fibRetracement(a: WorldPoint, b: WorldPoint, opts?: FibOpts): DrawingHandle;
|
|
70
|
+
fibTrendExtension(anchors: AnchorTriple, opts?: FibOpts): DrawingHandle;
|
|
71
|
+
fibChannel(anchors: AnchorTriple, opts?: FibOpts): DrawingHandle;
|
|
72
|
+
fibTimeZone(a: WorldPoint, b: WorldPoint, opts?: FibOpts): DrawingHandle;
|
|
73
|
+
fibWedge(anchors: AnchorTriple, opts?: FibOpts): DrawingHandle;
|
|
74
|
+
fibSpeedFan(a: WorldPoint, b: WorldPoint, opts?: FibOpts): DrawingHandle;
|
|
75
|
+
fibSpeedArcs(a: WorldPoint, b: WorldPoint, opts?: FibOpts): DrawingHandle;
|
|
76
|
+
fibSpiral(a: WorldPoint, b: WorldPoint, opts?: FibOpts): DrawingHandle;
|
|
77
|
+
fibCircles(a: WorldPoint, b: WorldPoint, opts?: FibOpts): DrawingHandle;
|
|
78
|
+
fibTrendTime(anchors: AnchorTriple, opts?: FibOpts): DrawingHandle;
|
|
79
|
+
gannBox(a: WorldPoint, b: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
80
|
+
gannSquareFixed(anchor: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
81
|
+
gannSquare(a: WorldPoint, b: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
82
|
+
gannFan(a: WorldPoint, b: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
83
|
+
pitchfork(anchors: AnchorTriple, opts?: LineDrawStyle & {
|
|
84
|
+
readonly variant?: "standard" | "schiff" | "modifiedSchiff" | "inside";
|
|
85
|
+
}): DrawingHandle;
|
|
86
|
+
pitchfan(anchors: AnchorTriple, opts?: LineDrawStyle): DrawingHandle;
|
|
87
|
+
xabcdPattern(anchors: AnchorQuint, opts?: LineDrawStyle): DrawingHandle;
|
|
88
|
+
cypherPattern(anchors: AnchorQuint, opts?: LineDrawStyle): DrawingHandle;
|
|
89
|
+
headAndShoulders(anchors: AnchorQuint, opts?: LineDrawStyle): DrawingHandle;
|
|
90
|
+
abcdPattern(anchors: AnchorQuad, opts?: LineDrawStyle): DrawingHandle;
|
|
91
|
+
trianglePattern(anchors: AnchorTriple, opts?: LineDrawStyle): DrawingHandle;
|
|
92
|
+
threeDrivesPattern(anchors: AnchorHept, opts?: LineDrawStyle): DrawingHandle;
|
|
93
|
+
elliottImpulseWave(anchors: AnchorQuint, opts?: LineDrawStyle): DrawingHandle;
|
|
94
|
+
elliottCorrectionWave(anchors: AnchorTriple, opts?: LineDrawStyle): DrawingHandle;
|
|
95
|
+
elliottTriangleWave(anchors: AnchorQuint, opts?: LineDrawStyle): DrawingHandle;
|
|
96
|
+
elliottDoubleCombo(anchors: AnchorHept, opts?: LineDrawStyle): DrawingHandle;
|
|
97
|
+
elliottTripleCombo(anchors: AnchorHept, opts?: LineDrawStyle): DrawingHandle;
|
|
98
|
+
cyclicLines(a: WorldPoint, b: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
99
|
+
timeCycles(a: WorldPoint, b: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
100
|
+
sineLine(a: WorldPoint, b: WorldPoint, opts?: LineDrawStyle): DrawingHandle;
|
|
101
|
+
group(childHandleIds: ReadonlyArray<string>): DrawingHandle;
|
|
102
|
+
frame(a: WorldPoint, b: WorldPoint, opts?: FrameOpts): DrawingHandle;
|
|
103
|
+
table(opts: TableOpts): DrawingHandle;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Compile-time callable hole for the `draw.*` namespace. Every `get`
|
|
107
|
+
* on the proxy returns a function that throws the
|
|
108
|
+
* `"draw.<method> called outside compiled runtime"` sentinel — same
|
|
109
|
+
* convention as the `plot` / `hline` / `alert` stubs in
|
|
110
|
+
* `plot/plot.ts:plot` / `alert/alert.ts:alert`. The runtime swaps this
|
|
111
|
+
* stub for the real namespace at boot per the
|
|
112
|
+
* `@invinite-org/chartlang-runtime` `primitives.ts` seam (PLAN.md
|
|
113
|
+
* §5.5).
|
|
114
|
+
*
|
|
115
|
+
* @formula N/A — namespace surface; per-method runtime impl in Tasks 5–18
|
|
116
|
+
* @anchors per-method — see the per-kind state shapes in `drawingState.ts`
|
|
117
|
+
* @since 0.3
|
|
118
|
+
* @stable
|
|
119
|
+
* @example
|
|
120
|
+
* import { draw } from "@invinite-org/chartlang-core";
|
|
121
|
+
* try {
|
|
122
|
+
* draw.horizontalLine(0);
|
|
123
|
+
* } catch {
|
|
124
|
+
* // expected: "draw.horizontalLine called outside compiled runtime"
|
|
125
|
+
* }
|
|
126
|
+
*/
|
|
127
|
+
export declare const draw: DrawNamespace;
|
|
128
|
+
//# sourceMappingURL=draw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../src/draw/draw.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC/C,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,aAAa,EAAE,MAAM,a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EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IAErE,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAAC;CACzC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,IAAI,EAAE,aAAgC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright (c) 2026 Invinite. Licensed under the MIT License.
|
|
2
|
+
// See the LICENSE file in the repo root for full license text.
|
|
3
|
+
/**
|
|
4
|
+
* Compile-time callable hole for the `draw.*` namespace. Every `get`
|
|
5
|
+
* on the proxy returns a function that throws the
|
|
6
|
+
* `"draw.<method> called outside compiled runtime"` sentinel — same
|
|
7
|
+
* convention as the `plot` / `hline` / `alert` stubs in
|
|
8
|
+
* `plot/plot.ts:plot` / `alert/alert.ts:alert`. The runtime swaps this
|
|
9
|
+
* stub for the real namespace at boot per the
|
|
10
|
+
* `@invinite-org/chartlang-runtime` `primitives.ts` seam (PLAN.md
|
|
11
|
+
* §5.5).
|
|
12
|
+
*
|
|
13
|
+
* @formula N/A — namespace surface; per-method runtime impl in Tasks 5–18
|
|
14
|
+
* @anchors per-method — see the per-kind state shapes in `drawingState.ts`
|
|
15
|
+
* @since 0.3
|
|
16
|
+
* @stable
|
|
17
|
+
* @example
|
|
18
|
+
* import { draw } from "@invinite-org/chartlang-core";
|
|
19
|
+
* try {
|
|
20
|
+
* draw.horizontalLine(0);
|
|
21
|
+
* } catch {
|
|
22
|
+
* // expected: "draw.horizontalLine called outside compiled runtime"
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export const draw = createDrawStub();
|
|
26
|
+
function createDrawStub() {
|
|
27
|
+
const handler = {
|
|
28
|
+
get(_target, property) {
|
|
29
|
+
const name = String(property);
|
|
30
|
+
return throwingMethod(`draw.${name}`);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
return new Proxy({}, handler);
|
|
34
|
+
}
|
|
35
|
+
function throwingMethod(qualified) {
|
|
36
|
+
return () => {
|
|
37
|
+
throw new Error(`${qualified} called outside compiled runtime`);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=draw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draw.js","sourceRoot":"","sources":["../../src/draw/draw.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAiJ/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAkB,cAAc,EAAE,CAAC;AAEpD,SAAS,cAAc;IACnB,MAAM,OAAO,GAAgC;QACzC,GAAG,CAAC,OAAO,EAAE,QAAQ;YACjB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC9B,OAAO,cAAc,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC;KACJ,CAAC;IACF,OAAO,IAAI,KAAK,CAAC,EAAmB,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,cAAc,CAAC,SAAiB;IACrC,OAAO,GAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,kCAAkC,CAAC,CAAC;IACpE,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The full set of 62 drawing kinds chartlang supports through `draw.*`.
|
|
3
|
+
* The wire format is kebab-case; the TypeScript script surface is
|
|
4
|
+
* camelCase (`draw.horizontalLine(...)`). See {@link KIND_CAMELCASE} for
|
|
5
|
+
* the canonical bijection.
|
|
6
|
+
*
|
|
7
|
+
* Variant collapses pinned in PLAN.md §3.1:
|
|
8
|
+
*
|
|
9
|
+
* - `ray` / `extended-line` collapse into `line` with `extendLeft` /
|
|
10
|
+
* `extendRight` flags on the state.
|
|
11
|
+
* - The 4 invinite pitchfork tools (`standard` / `schiff` /
|
|
12
|
+
* `modifiedSchiff` / `inside`) collapse into `pitchfork` with a
|
|
13
|
+
* `variant` discriminator on the state.
|
|
14
|
+
* - `cypher-pattern` has no standalone tool — emittable only through
|
|
15
|
+
* `defineDrawing` (Task 20).
|
|
16
|
+
*
|
|
17
|
+
* Order pinned: lines (6) → boxes (8) → curves (3) → freehand (3) →
|
|
18
|
+
* annotations (5) → channels (4) → fib (10) → gann (4) → pitchforks (2)
|
|
19
|
+
* → patterns (6) → elliott (5) → cycles (3) → containers (2) → viewport
|
|
20
|
+
* overlays (1) = 62. The order is wire-stable — downstream consumers iterate
|
|
21
|
+
* {@link DRAWING_KINDS} in this order for diagnostic readability.
|
|
22
|
+
*
|
|
23
|
+
* @formula N/A — discriminator constant set
|
|
24
|
+
* @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}
|
|
25
|
+
* @since 0.3
|
|
26
|
+
* @stable
|
|
27
|
+
* @example
|
|
28
|
+
* const k: DrawingKind = "fib-retracement";
|
|
29
|
+
* void k;
|
|
30
|
+
*/
|
|
31
|
+
export type DrawingKind = "line" | "horizontal-line" | "horizontal-ray" | "vertical-line" | "cross-line" | "trend-angle" | "rectangle" | "rotated-rectangle" | "triangle" | "polyline" | "circle" | "ellipse" | "path" | "marker" | "arc" | "curve" | "double-curve" | "pen" | "highlighter" | "brush" | "text" | "arrow" | "arrow-marker" | "arrow-mark-up" | "arrow-mark-down" | "trend-channel" | "flat-top-bottom" | "disjoint-channel" | "regression-trend" | "fib-retracement" | "fib-trend-extension" | "fib-channel" | "fib-time-zone" | "fib-wedge" | "fib-speed-fan" | "fib-speed-arcs" | "fib-spiral" | "fib-circles" | "fib-trend-time" | "gann-box" | "gann-square-fixed" | "gann-square" | "gann-fan" | "pitchfork" | "pitchfan" | "xabcd-pattern" | "cypher-pattern" | "head-and-shoulders" | "abcd-pattern" | "triangle-pattern" | "three-drives-pattern" | "elliott-impulse-wave" | "elliott-correction-wave" | "elliott-triangle-wave" | "elliott-double-combo" | "elliott-triple-combo" | "cyclic-lines" | "time-cycles" | "sine-line" | "group" | "frame" | "table";
|
|
32
|
+
/**
|
|
33
|
+
* Iterable form of {@link DrawingKind}. Order matches the type
|
|
34
|
+
* declaration so docs / validators / dispatchers can walk the set in a
|
|
35
|
+
* single canonical order. Frozen.
|
|
36
|
+
*
|
|
37
|
+
* @formula N/A — discriminator constant set
|
|
38
|
+
* @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}
|
|
39
|
+
* @since 0.3
|
|
40
|
+
* @stable
|
|
41
|
+
* @example
|
|
42
|
+
* import { DRAWING_KINDS } from "@invinite-org/chartlang-core";
|
|
43
|
+
* for (const k of DRAWING_KINDS) {
|
|
44
|
+
* void k;
|
|
45
|
+
* }
|
|
46
|
+
*/
|
|
47
|
+
export declare const DRAWING_KINDS: ReadonlyArray<DrawingKind>;
|
|
48
|
+
/**
|
|
49
|
+
* camelCase TypeScript-surface name for every kind. Used by the editor
|
|
50
|
+
* + gen-docs + the compiler's `STATEFUL_PRIMITIVES` lookup so a script
|
|
51
|
+
* author writes `draw.horizontalLine(...)` while the wire format stays
|
|
52
|
+
* kebab-case (`horizontal-line`). The bijection round-trips through
|
|
53
|
+
* {@link KIND_KEBABCASE}.
|
|
54
|
+
*
|
|
55
|
+
* @formula N/A — discriminator constant set
|
|
56
|
+
* @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}
|
|
57
|
+
* @since 0.3
|
|
58
|
+
* @stable
|
|
59
|
+
* @example
|
|
60
|
+
* import { KIND_CAMELCASE } from "@invinite-org/chartlang-core";
|
|
61
|
+
* const camel = KIND_CAMELCASE.get("horizontal-line"); // "horizontalLine"
|
|
62
|
+
* void camel;
|
|
63
|
+
*/
|
|
64
|
+
export declare const KIND_CAMELCASE: ReadonlyMap<DrawingKind, string>;
|
|
65
|
+
/**
|
|
66
|
+
* Inverse of {@link KIND_CAMELCASE} — camelCase TypeScript surface
|
|
67
|
+
* name → kebab-case wire kind. Derived from `KIND_CAMELCASE` so the
|
|
68
|
+
* two maps cannot drift.
|
|
69
|
+
*
|
|
70
|
+
* @formula N/A — discriminator constant set
|
|
71
|
+
* @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}
|
|
72
|
+
* @since 0.3
|
|
73
|
+
* @stable
|
|
74
|
+
* @example
|
|
75
|
+
* import { KIND_KEBABCASE } from "@invinite-org/chartlang-core";
|
|
76
|
+
* const kebab = KIND_KEBABCASE.get("horizontalLine"); // "horizontal-line"
|
|
77
|
+
* void kebab;
|
|
78
|
+
*/
|
|
79
|
+
export declare const KIND_KEBABCASE: ReadonlyMap<string, DrawingKind>;
|
|
80
|
+
//# sourceMappingURL=drawingKind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawingKind.d.ts","sourceRoot":"","sources":["../../src/draw/drawingKind.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,WAAW,GAEjB,MAAM,GACN,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,YAAY,GACZ,aAAa,GAEb,WAAW,GACX,mBAAmB,GACnB,UAAU,GACV,UAAU,GACV,QAAQ,GACR,SAAS,GACT,MAAM,GACN,QAAQ,GAER,KAAK,GACL,OAAO,GACP,cAAc,GAEd,KAAK,GACL,aAAa,GACb,OAAO,GAEP,MAAM,GACN,OAAO,GACP,cAAc,GACd,eAAe,GACf,iBAAiB,GAEjB,eAAe,GACf,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAElB,iBAAiB,GACjB,qBAAqB,GACrB,aAAa,GACb,eAAe,GACf,WAAW,GACX,eAAe,GACf,gBAAgB,GAChB,YAAY,GACZ,aAAa,GACb,gBAAgB,GAEhB,UAAU,GACV,mBAAmB,GACnB,aAAa,GACb,UAAU,GAEV,WAAW,GACX,UAAU,GAEV,eAAe,GACf,gBAAgB,GAChB,oBAAoB,GACpB,cAAc,GACd,kBAAkB,GAClB,sBAAsB,GAEtB,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,sBAAsB,GACtB,sBAAsB,GAEtB,cAAc,GACd,aAAa,GACb,WAAW,GAEX,OAAO,GACP,OAAO,GAEP,OAAO,CAAC;AAEd;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,WAAW,CA+DL,CAAC;AAEjD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,WAAW,EAAE,MAAM,CA+D1D,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAE3D,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// Copyright (c) 2026 Invinite. Licensed under the MIT License.
|
|
2
|
+
// See the LICENSE file in the repo root for full license text.
|
|
3
|
+
/**
|
|
4
|
+
* Iterable form of {@link DrawingKind}. Order matches the type
|
|
5
|
+
* declaration so docs / validators / dispatchers can walk the set in a
|
|
6
|
+
* single canonical order. Frozen.
|
|
7
|
+
*
|
|
8
|
+
* @formula N/A — discriminator constant set
|
|
9
|
+
* @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}
|
|
10
|
+
* @since 0.3
|
|
11
|
+
* @stable
|
|
12
|
+
* @example
|
|
13
|
+
* import { DRAWING_KINDS } from "@invinite-org/chartlang-core";
|
|
14
|
+
* for (const k of DRAWING_KINDS) {
|
|
15
|
+
* void k;
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
export const DRAWING_KINDS = Object.freeze([
|
|
19
|
+
"line",
|
|
20
|
+
"horizontal-line",
|
|
21
|
+
"horizontal-ray",
|
|
22
|
+
"vertical-line",
|
|
23
|
+
"cross-line",
|
|
24
|
+
"trend-angle",
|
|
25
|
+
"rectangle",
|
|
26
|
+
"rotated-rectangle",
|
|
27
|
+
"triangle",
|
|
28
|
+
"polyline",
|
|
29
|
+
"circle",
|
|
30
|
+
"ellipse",
|
|
31
|
+
"path",
|
|
32
|
+
"marker",
|
|
33
|
+
"arc",
|
|
34
|
+
"curve",
|
|
35
|
+
"double-curve",
|
|
36
|
+
"pen",
|
|
37
|
+
"highlighter",
|
|
38
|
+
"brush",
|
|
39
|
+
"text",
|
|
40
|
+
"arrow",
|
|
41
|
+
"arrow-marker",
|
|
42
|
+
"arrow-mark-up",
|
|
43
|
+
"arrow-mark-down",
|
|
44
|
+
"trend-channel",
|
|
45
|
+
"flat-top-bottom",
|
|
46
|
+
"disjoint-channel",
|
|
47
|
+
"regression-trend",
|
|
48
|
+
"fib-retracement",
|
|
49
|
+
"fib-trend-extension",
|
|
50
|
+
"fib-channel",
|
|
51
|
+
"fib-time-zone",
|
|
52
|
+
"fib-wedge",
|
|
53
|
+
"fib-speed-fan",
|
|
54
|
+
"fib-speed-arcs",
|
|
55
|
+
"fib-spiral",
|
|
56
|
+
"fib-circles",
|
|
57
|
+
"fib-trend-time",
|
|
58
|
+
"gann-box",
|
|
59
|
+
"gann-square-fixed",
|
|
60
|
+
"gann-square",
|
|
61
|
+
"gann-fan",
|
|
62
|
+
"pitchfork",
|
|
63
|
+
"pitchfan",
|
|
64
|
+
"xabcd-pattern",
|
|
65
|
+
"cypher-pattern",
|
|
66
|
+
"head-and-shoulders",
|
|
67
|
+
"abcd-pattern",
|
|
68
|
+
"triangle-pattern",
|
|
69
|
+
"three-drives-pattern",
|
|
70
|
+
"elliott-impulse-wave",
|
|
71
|
+
"elliott-correction-wave",
|
|
72
|
+
"elliott-triangle-wave",
|
|
73
|
+
"elliott-double-combo",
|
|
74
|
+
"elliott-triple-combo",
|
|
75
|
+
"cyclic-lines",
|
|
76
|
+
"time-cycles",
|
|
77
|
+
"sine-line",
|
|
78
|
+
"group",
|
|
79
|
+
"frame",
|
|
80
|
+
"table",
|
|
81
|
+
]);
|
|
82
|
+
/**
|
|
83
|
+
* camelCase TypeScript-surface name for every kind. Used by the editor
|
|
84
|
+
* + gen-docs + the compiler's `STATEFUL_PRIMITIVES` lookup so a script
|
|
85
|
+
* author writes `draw.horizontalLine(...)` while the wire format stays
|
|
86
|
+
* kebab-case (`horizontal-line`). The bijection round-trips through
|
|
87
|
+
* {@link KIND_KEBABCASE}.
|
|
88
|
+
*
|
|
89
|
+
* @formula N/A — discriminator constant set
|
|
90
|
+
* @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}
|
|
91
|
+
* @since 0.3
|
|
92
|
+
* @stable
|
|
93
|
+
* @example
|
|
94
|
+
* import { KIND_CAMELCASE } from "@invinite-org/chartlang-core";
|
|
95
|
+
* const camel = KIND_CAMELCASE.get("horizontal-line"); // "horizontalLine"
|
|
96
|
+
* void camel;
|
|
97
|
+
*/
|
|
98
|
+
export const KIND_CAMELCASE = new Map([
|
|
99
|
+
["line", "line"],
|
|
100
|
+
["horizontal-line", "horizontalLine"],
|
|
101
|
+
["horizontal-ray", "horizontalRay"],
|
|
102
|
+
["vertical-line", "verticalLine"],
|
|
103
|
+
["cross-line", "crossLine"],
|
|
104
|
+
["trend-angle", "trendAngle"],
|
|
105
|
+
["rectangle", "rectangle"],
|
|
106
|
+
["rotated-rectangle", "rotatedRectangle"],
|
|
107
|
+
["triangle", "triangle"],
|
|
108
|
+
["polyline", "polyline"],
|
|
109
|
+
["circle", "circle"],
|
|
110
|
+
["ellipse", "ellipse"],
|
|
111
|
+
["path", "path"],
|
|
112
|
+
["marker", "marker"],
|
|
113
|
+
["arc", "arc"],
|
|
114
|
+
["curve", "curve"],
|
|
115
|
+
["double-curve", "doubleCurve"],
|
|
116
|
+
["pen", "pen"],
|
|
117
|
+
["highlighter", "highlighter"],
|
|
118
|
+
["brush", "brush"],
|
|
119
|
+
["text", "text"],
|
|
120
|
+
["arrow", "arrow"],
|
|
121
|
+
["arrow-marker", "arrowMarker"],
|
|
122
|
+
["arrow-mark-up", "arrowMarkUp"],
|
|
123
|
+
["arrow-mark-down", "arrowMarkDown"],
|
|
124
|
+
["trend-channel", "trendChannel"],
|
|
125
|
+
["flat-top-bottom", "flatTopBottom"],
|
|
126
|
+
["disjoint-channel", "disjointChannel"],
|
|
127
|
+
["regression-trend", "regressionTrend"],
|
|
128
|
+
["fib-retracement", "fibRetracement"],
|
|
129
|
+
["fib-trend-extension", "fibTrendExtension"],
|
|
130
|
+
["fib-channel", "fibChannel"],
|
|
131
|
+
["fib-time-zone", "fibTimeZone"],
|
|
132
|
+
["fib-wedge", "fibWedge"],
|
|
133
|
+
["fib-speed-fan", "fibSpeedFan"],
|
|
134
|
+
["fib-speed-arcs", "fibSpeedArcs"],
|
|
135
|
+
["fib-spiral", "fibSpiral"],
|
|
136
|
+
["fib-circles", "fibCircles"],
|
|
137
|
+
["fib-trend-time", "fibTrendTime"],
|
|
138
|
+
["gann-box", "gannBox"],
|
|
139
|
+
["gann-square-fixed", "gannSquareFixed"],
|
|
140
|
+
["gann-square", "gannSquare"],
|
|
141
|
+
["gann-fan", "gannFan"],
|
|
142
|
+
["pitchfork", "pitchfork"],
|
|
143
|
+
["pitchfan", "pitchfan"],
|
|
144
|
+
["xabcd-pattern", "xabcdPattern"],
|
|
145
|
+
["cypher-pattern", "cypherPattern"],
|
|
146
|
+
["head-and-shoulders", "headAndShoulders"],
|
|
147
|
+
["abcd-pattern", "abcdPattern"],
|
|
148
|
+
["triangle-pattern", "trianglePattern"],
|
|
149
|
+
["three-drives-pattern", "threeDrivesPattern"],
|
|
150
|
+
["elliott-impulse-wave", "elliottImpulseWave"],
|
|
151
|
+
["elliott-correction-wave", "elliottCorrectionWave"],
|
|
152
|
+
["elliott-triangle-wave", "elliottTriangleWave"],
|
|
153
|
+
["elliott-double-combo", "elliottDoubleCombo"],
|
|
154
|
+
["elliott-triple-combo", "elliottTripleCombo"],
|
|
155
|
+
["cyclic-lines", "cyclicLines"],
|
|
156
|
+
["time-cycles", "timeCycles"],
|
|
157
|
+
["sine-line", "sineLine"],
|
|
158
|
+
["group", "group"],
|
|
159
|
+
["frame", "frame"],
|
|
160
|
+
["table", "table"],
|
|
161
|
+
]);
|
|
162
|
+
/**
|
|
163
|
+
* Inverse of {@link KIND_CAMELCASE} — camelCase TypeScript surface
|
|
164
|
+
* name → kebab-case wire kind. Derived from `KIND_CAMELCASE` so the
|
|
165
|
+
* two maps cannot drift.
|
|
166
|
+
*
|
|
167
|
+
* @formula N/A — discriminator constant set
|
|
168
|
+
* @anchors 62 kebab-case kind names; see {@link DRAWING_KINDS}
|
|
169
|
+
* @since 0.3
|
|
170
|
+
* @stable
|
|
171
|
+
* @example
|
|
172
|
+
* import { KIND_KEBABCASE } from "@invinite-org/chartlang-core";
|
|
173
|
+
* const kebab = KIND_KEBABCASE.get("horizontalLine"); // "horizontal-line"
|
|
174
|
+
* void kebab;
|
|
175
|
+
*/
|
|
176
|
+
export const KIND_KEBABCASE = new Map(Array.from(KIND_CAMELCASE, ([kebab, camel]) => [camel, kebab]));
|
|
177
|
+
//# sourceMappingURL=drawingKind.js.map
|
|
@@ -0,0 +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,YA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