@invinite-org/chartlang-language-service 1.4.4 → 1.4.5
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
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @invinite-org/chartlang-language-service
|
|
2
2
|
|
|
3
|
+
## 1.4.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 08cba38: Add `time.*` calendar accessors (`time.year/month/dayofmonth/dayofweek/hour/
|
|
8
|
+
minute/second/timestamp`), a `time.timeClose(t, tz?)` bar-close accessor
|
|
9
|
+
(Pine's `time_close()` = bar start + interval), a `session.isOpen(t, spec, tz?)`
|
|
10
|
+
helper, and an `input.session` kind. Calendar fields are derived from a `Time`
|
|
11
|
+
epoch via the host (authors stay sandboxed — `Date`/`Intl` remain banned). v1
|
|
12
|
+
is UTC + fixed-offset only; exchange-tz/DST is a scoped follow-up. The Pine
|
|
13
|
+
converter lowers `dayofweek` / `time()` / `time_close()` / `input.session`.
|
|
14
|
+
- 1efb49c: Add `state.array<T>(capacity)` — a persistent, bounded FIFO collection. Push
|
|
15
|
+
many values across bars (`a.push(v)`) into a fixed-capacity ring and read
|
|
16
|
+
them back by element (`a.get(0)` = newest, `a.last()`, `a.size`,
|
|
17
|
+
`a.capacity`, `a.clear()`). Bounded literal capacity keeps it
|
|
18
|
+
serialization-clean. The Pine converter lowers a bounded numeric
|
|
19
|
+
`var array<…>` Camp B ring to it.
|
|
20
|
+
|
|
21
|
+
The compiler guards the capacity: it must be a compile-time numeric literal
|
|
22
|
+
(a `const` numeric binding is accepted) that is a positive integer within
|
|
23
|
+
`MAX_STATE_ARRAY_CAPACITY` (100_000). A non-literal capacity errors
|
|
24
|
+
`state-array-capacity-not-literal`; an out-of-range / non-integer literal
|
|
25
|
+
errors `state-array-capacity-exceeds-max`.
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [189493a]
|
|
28
|
+
- Updated dependencies [8bc628e]
|
|
29
|
+
- Updated dependencies [ab8b218]
|
|
30
|
+
- Updated dependencies [8bc628e]
|
|
31
|
+
- Updated dependencies [ab8b218]
|
|
32
|
+
- Updated dependencies [189493a]
|
|
33
|
+
- Updated dependencies [e620ba8]
|
|
34
|
+
- Updated dependencies [08cba38]
|
|
35
|
+
- Updated dependencies [1efb49c]
|
|
36
|
+
- Updated dependencies [1efb49c]
|
|
37
|
+
- @invinite-org/chartlang-adapter-kit@1.6.0
|
|
38
|
+
- @invinite-org/chartlang-core@1.3.0
|
|
39
|
+
- @invinite-org/chartlang-compiler@1.4.0
|
|
40
|
+
|
|
3
41
|
## 1.4.4
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hoverRegistry.generated.d.ts","sourceRoot":"","sources":["../src/hoverRegistry.generated.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxE,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,QAAQ,CAAC;CACvB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AAEH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"hoverRegistry.generated.d.ts","sourceRoot":"","sources":["../src/hoverRegistry.generated.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxE,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,QAAQ,CAAC;CACvB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AAEH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAonQvE,CAAC"}
|
|
@@ -375,6 +375,40 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
375
375
|
"since": "0.1",
|
|
376
376
|
"stability": "stable"
|
|
377
377
|
},
|
|
378
|
+
"barcolor": {
|
|
379
|
+
"fqn": "barcolor",
|
|
380
|
+
"kind": "function",
|
|
381
|
+
"title": "barcolor(_color, _opts?)",
|
|
382
|
+
"summary": "Tint the candle / bar for the current bar — the Pine-ergonomic alias for\n`plot(NaN, { style: { kind: \"bar-color\", color } })`. Sugar over the\nexisting `bar-color` plot style.",
|
|
383
|
+
"paramTable": [
|
|
384
|
+
{
|
|
385
|
+
"name": "_color",
|
|
386
|
+
"type": "Color",
|
|
387
|
+
"doc": ""
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "_opts",
|
|
391
|
+
"type": "BarColorOpts",
|
|
392
|
+
"doc": ""
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"examples": [
|
|
396
|
+
"// Inside a compiled `compute`:\n// barcolor(bar.close > bar.open ? \"#16a34a\" : \"#dc2626\");\nimport { barcolor } from \"@invinite-org/chartlang-core\";\ntry { barcolor(\"#a855f7\"); } catch {}"
|
|
397
|
+
],
|
|
398
|
+
"since": "1.4",
|
|
399
|
+
"stability": "stable"
|
|
400
|
+
},
|
|
401
|
+
"BarColorOpts": {
|
|
402
|
+
"fqn": "BarColorOpts",
|
|
403
|
+
"kind": "type",
|
|
404
|
+
"title": "BarColorOpts",
|
|
405
|
+
"summary": "Styling options accepted by `barcolor(...)` — the Pine-ergonomic alias for\na `bar-color` candle/bar tint. The `bar-color` style carries no\ntransparency, so this bag only labels the slot.",
|
|
406
|
+
"examples": [
|
|
407
|
+
"const opts: BarColorOpts = { title: \"trend tint\" };\nvoid opts;"
|
|
408
|
+
],
|
|
409
|
+
"since": "1.4",
|
|
410
|
+
"stability": "stable"
|
|
411
|
+
},
|
|
378
412
|
"BarSeries": {
|
|
379
413
|
"fqn": "BarSeries",
|
|
380
414
|
"kind": "type",
|
|
@@ -474,6 +508,40 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
474
508
|
"since": "0.2",
|
|
475
509
|
"stability": "stable"
|
|
476
510
|
},
|
|
511
|
+
"bgcolor": {
|
|
512
|
+
"fqn": "bgcolor",
|
|
513
|
+
"kind": "function",
|
|
514
|
+
"title": "bgcolor(_color, _opts?)",
|
|
515
|
+
"summary": "Paint the pane background for the current bar — the Pine-ergonomic alias\nfor `plot(NaN, { style: { kind: \"bg-color\", color, transp } })`. Pass a\n`Color` (a CSS / hex string, or a per-bar color expression like\n`close > open ? \"#16a34a\" : \"#dc2626\"`). Sugar over the existing\n`bg-color` plot style — same wire emission, same capability gate.",
|
|
516
|
+
"paramTable": [
|
|
517
|
+
{
|
|
518
|
+
"name": "_color",
|
|
519
|
+
"type": "Color",
|
|
520
|
+
"doc": ""
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "_opts",
|
|
524
|
+
"type": "BgColorOpts",
|
|
525
|
+
"doc": ""
|
|
526
|
+
}
|
|
527
|
+
],
|
|
528
|
+
"examples": [
|
|
529
|
+
"// Inside a compiled `compute`:\n// bgcolor(bar.close > bar.open ? \"#16a34a\" : \"#dc2626\", { transp: 80 });\nimport { bgcolor } from \"@invinite-org/chartlang-core\";\ntry { bgcolor(\"#1d4ed8\"); } catch {}"
|
|
530
|
+
],
|
|
531
|
+
"since": "1.4",
|
|
532
|
+
"stability": "stable"
|
|
533
|
+
},
|
|
534
|
+
"BgColorOpts": {
|
|
535
|
+
"fqn": "BgColorOpts",
|
|
536
|
+
"kind": "type",
|
|
537
|
+
"title": "BgColorOpts",
|
|
538
|
+
"summary": "/**\nStyling options accepted by `bgcolor(...)` — the Pine-ergonomic alias for\na `bg-color` pane-background band. `transp` is the 0–100 transparency\n(0 opaque … 100 fully transparent), mirroring {@link PlotOptsStyle} 's\n`bg-color` arm. `title` labels the slot for host overrides.",
|
|
539
|
+
"examples": [
|
|
540
|
+
"const opts: BgColorOpts = { transp: 80, title: \"RSI heat\" };\nvoid opts;"
|
|
541
|
+
],
|
|
542
|
+
"since": "1.4",
|
|
543
|
+
"stability": "stable"
|
|
544
|
+
},
|
|
477
545
|
"BoolDescriptor": {
|
|
478
546
|
"fqn": "BoolDescriptor",
|
|
479
547
|
"kind": "type",
|
|
@@ -2673,6 +2741,29 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
2673
2741
|
"since": "0.4",
|
|
2674
2742
|
"stability": "stable"
|
|
2675
2743
|
},
|
|
2744
|
+
"feedKey": {
|
|
2745
|
+
"fqn": "feedKey",
|
|
2746
|
+
"kind": "function",
|
|
2747
|
+
"title": "feedKey(symbol, interval)",
|
|
2748
|
+
"summary": "Build the composite secondary-feed key from a `(symbol, interval)` pair —\nthe **single** source of the stream-key format shared by the runtime's\nstream/cache maps and the host wire (`CandleEvent.streamKey`). Like a slot\nid, this string is load-bearing: producer (adapter/host) and consumer\n(runtime) must agree byte-for-byte, so never re-derive it inline.",
|
|
2749
|
+
"paramTable": [
|
|
2750
|
+
{
|
|
2751
|
+
"name": "symbol",
|
|
2752
|
+
"type": "string | undefined",
|
|
2753
|
+
"doc": ""
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
"name": "interval",
|
|
2757
|
+
"type": "string",
|
|
2758
|
+
"doc": ""
|
|
2759
|
+
}
|
|
2760
|
+
],
|
|
2761
|
+
"examples": [
|
|
2762
|
+
"feedKey(undefined, \"1D\"); // \"1D\" (chart symbol, back-compat)\nfeedKey(\"AMEX:SPY\", \"1D\"); // \"AMEX:SPY@1D\""
|
|
2763
|
+
],
|
|
2764
|
+
"since": "1.3",
|
|
2765
|
+
"stability": "stable"
|
|
2766
|
+
},
|
|
2676
2767
|
"FibChannelState": {
|
|
2677
2768
|
"fqn": "FibChannelState",
|
|
2678
2769
|
"kind": "type",
|
|
@@ -3410,6 +3501,29 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
3410
3501
|
"since": "0.4",
|
|
3411
3502
|
"stability": "stable"
|
|
3412
3503
|
},
|
|
3504
|
+
"input.session": {
|
|
3505
|
+
"fqn": "input.session",
|
|
3506
|
+
"kind": "function",
|
|
3507
|
+
"title": "input.session(defaultValue, opts?)",
|
|
3508
|
+
"summary": "Build a session-window input descriptor (`\"HH:MM-HH:MM\"`). The value is\na free string in v1 (the grammar is parsed at runtime by\n`session.isOpen`), mirroring `input.string`.",
|
|
3509
|
+
"paramTable": [
|
|
3510
|
+
{
|
|
3511
|
+
"name": "defaultValue",
|
|
3512
|
+
"type": "string",
|
|
3513
|
+
"doc": ""
|
|
3514
|
+
},
|
|
3515
|
+
{
|
|
3516
|
+
"name": "opts",
|
|
3517
|
+
"type": "{ readonly title?: string }",
|
|
3518
|
+
"doc": ""
|
|
3519
|
+
}
|
|
3520
|
+
],
|
|
3521
|
+
"examples": [
|
|
3522
|
+
"const sess = input.session(\"0930-1600\", { title: \"Session\" });\nvoid sess;"
|
|
3523
|
+
],
|
|
3524
|
+
"since": "1.5",
|
|
3525
|
+
"stability": "stable"
|
|
3526
|
+
},
|
|
3413
3527
|
"input.source": {
|
|
3414
3528
|
"fqn": "input.source",
|
|
3415
3529
|
"kind": "function",
|
|
@@ -3967,6 +4081,17 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
3967
4081
|
"since": "0.2",
|
|
3968
4082
|
"stability": "stable"
|
|
3969
4083
|
},
|
|
4084
|
+
"MutableArraySlot": {
|
|
4085
|
+
"fqn": "MutableArraySlot",
|
|
4086
|
+
"kind": "type",
|
|
4087
|
+
"title": "MutableArraySlot",
|
|
4088
|
+
"summary": "/**\nScript-facing handle on a persistent, bounded **FIFO collection** —\nPine's `var array<…>` with capacity eviction. Unlike {@link MutableSlot} * (one value's history) or a `Series` (bar-indexed history), this is a\n*collection** you push many values into: `push` appends (evicting the\noldest once `capacity` is reached), `get(n)` reads the `n`-th element from\nthe newest (`n = 0`), `last()` is the newest, `size` is the current filled\ncount, `capacity` is the fixed bound, and `clear()` empties it.",
|
|
4089
|
+
"examples": [
|
|
4090
|
+
"function rollingMean(a: MutableArraySlot<number>, x: number): number {\na.push(x);\nlet sum = 0;\nfor (let i = 0; i < a.size; i++) sum += a.get(i);\nreturn sum / a.size;\n}"
|
|
4091
|
+
],
|
|
4092
|
+
"since": "1.3",
|
|
4093
|
+
"stability": "stable"
|
|
4094
|
+
},
|
|
3970
4095
|
"MutableSlot": {
|
|
3971
4096
|
"fqn": "MutableSlot",
|
|
3972
4097
|
"kind": "type",
|
|
@@ -4572,11 +4697,23 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
4572
4697
|
],
|
|
4573
4698
|
"examples": [
|
|
4574
4699
|
"// weekly EMA(20) — computed over weekly bars, drawn on the chart\nconst trend = request.security({ interval: \"1W\" }, (bar) => ta.ema(bar.close, 20));\nplot(trend, { title: \"Weekly EMA(20)\" });",
|
|
4575
|
-
"// data form — aligned weekly close\nconst weekly = request.security({ interval: \"1W\" });\nplot(weekly.close, { title: \"Weekly close\" });"
|
|
4700
|
+
"// data form — aligned weekly close\nconst weekly = request.security({ interval: \"1W\" });\nplot(weekly.close, { title: \"Weekly close\" });",
|
|
4701
|
+
"// different symbol — a ratio against another instrument (needs multiSymbol)\nconst spy = request.security({ symbol: \"AMEX:SPY\", interval: \"1D\" });\nconst qqq = request.security({ symbol: \"NASDAQ:QQQ\", interval: \"1D\" });\nplot(spy.close.current / qqq.close.current, { title: \"SPY/QQQ\" });"
|
|
4576
4702
|
],
|
|
4577
4703
|
"since": "0.4",
|
|
4578
4704
|
"stability": "stable"
|
|
4579
4705
|
},
|
|
4706
|
+
"RequestedFeed": {
|
|
4707
|
+
"fqn": "RequestedFeed",
|
|
4708
|
+
"kind": "type",
|
|
4709
|
+
"title": "RequestedFeed",
|
|
4710
|
+
"summary": "One requested secondary feed — a `(symbol, interval)` pair the script's\n`request.security` calls ask for. `symbol` omitted ⇒ the chart's own\nsymbol (the higher-timeframe-only case). The compiler emits one entry per\ndistinct** feed; the runtime creates one secondary `StreamState` per\nentry, keyed by the shared `feedKey(symbol, interval)` composite.",
|
|
4711
|
+
"examples": [
|
|
4712
|
+
"const f: RequestedFeed = { symbol: \"AMEX:SPY\", interval: \"1D\" };\nvoid f;"
|
|
4713
|
+
],
|
|
4714
|
+
"since": "1.3",
|
|
4715
|
+
"stability": "stable"
|
|
4716
|
+
},
|
|
4580
4717
|
"RequestLowerTfOpts": {
|
|
4581
4718
|
"fqn": "RequestLowerTfOpts",
|
|
4582
4719
|
"kind": "type",
|
|
@@ -4605,7 +4742,8 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
4605
4742
|
"title": "RequestSecurityOpts",
|
|
4606
4743
|
"summary": "/**\nArgument to {@link request.security} . The `interval` must be a string\nliteral or an `input.enum` value; the compiler's literal-only pass rejects\ndynamic expressions with `request-security-interval-not-literal`.",
|
|
4607
4744
|
"examples": [
|
|
4608
|
-
"const opts: RequestSecurityOpts = { interval: \"1D\" };\nvoid opts;"
|
|
4745
|
+
"const opts: RequestSecurityOpts = { interval: \"1D\" };\nvoid opts;",
|
|
4746
|
+
"// read a different instrument (requires Capabilities.multiSymbol)\nconst spy: RequestSecurityOpts = { symbol: \"AMEX:SPY\", interval: \"1D\" };\nvoid spy;"
|
|
4609
4747
|
],
|
|
4610
4748
|
"since": "0.4",
|
|
4611
4749
|
"stability": "stable"
|
|
@@ -4814,7 +4952,7 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
4814
4952
|
"title": "SecurityExpressionDescriptor",
|
|
4815
4953
|
"summary": "One higher-timeframe expression unit in `ScriptManifest.securityExpressions`.\nThe compiler emits one entry per `request.security({ interval }, (bar) => …)`\ncallsite so the runtime knows which `slotId` is an HTF expression, on which\n`interval` to clock it, and the callback's single parameter name. The\ncallback body stays inline in the compiled module — this descriptor is only\nthe registry pointing at it.",
|
|
4816
4954
|
"examples": [
|
|
4817
|
-
"
|
|
4955
|
+
"// symbol omitted ⇒ the chart's own symbol (the HTF-only back-compat case)\nconst unit: SecurityExpressionDescriptor = {\nslotId: \"trend.ts:8:21#0\",\ninterval: \"1W\",\nparamName: \"bar\",\n};\nvoid unit;"
|
|
4818
4956
|
],
|
|
4819
4957
|
"since": "0.7",
|
|
4820
4958
|
"stability": "stable"
|
|
@@ -4841,6 +4979,34 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
4841
4979
|
"since": "0.6",
|
|
4842
4980
|
"stability": "stable"
|
|
4843
4981
|
},
|
|
4982
|
+
"session.isOpen": {
|
|
4983
|
+
"fqn": "session.isOpen",
|
|
4984
|
+
"kind": "function",
|
|
4985
|
+
"title": "session.isOpen(_t, _spec, _tz?)",
|
|
4986
|
+
"summary": "`true` when `t` falls inside the daily session window `spec`. `spec` is\nan `\"HH:MM-HH:MM\"` (or `\"HHMM-HHMM\"`) intraday window, e.g.\n`\"0930-1600\"`. The window is interpreted in `tz` (default\n`syminfo.timezone`, fallback `\"UTC\"`).",
|
|
4987
|
+
"paramTable": [
|
|
4988
|
+
{
|
|
4989
|
+
"name": "_t",
|
|
4990
|
+
"type": "Time",
|
|
4991
|
+
"doc": ""
|
|
4992
|
+
},
|
|
4993
|
+
{
|
|
4994
|
+
"name": "_spec",
|
|
4995
|
+
"type": "string",
|
|
4996
|
+
"doc": ""
|
|
4997
|
+
},
|
|
4998
|
+
{
|
|
4999
|
+
"name": "_tz",
|
|
5000
|
+
"type": "string",
|
|
5001
|
+
"doc": ""
|
|
5002
|
+
}
|
|
5003
|
+
],
|
|
5004
|
+
"examples": [
|
|
5005
|
+
"const fn: typeof session.isOpen = session.isOpen;\nvoid fn;"
|
|
5006
|
+
],
|
|
5007
|
+
"since": "1.5",
|
|
5008
|
+
"stability": "stable"
|
|
5009
|
+
},
|
|
4844
5010
|
"SessionBounds": {
|
|
4845
5011
|
"fqn": "SessionBounds",
|
|
4846
5012
|
"kind": "type",
|
|
@@ -4852,6 +5018,28 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
4852
5018
|
"since": "0.6",
|
|
4853
5019
|
"stability": "stable"
|
|
4854
5020
|
},
|
|
5021
|
+
"SessionDescriptor": {
|
|
5022
|
+
"fqn": "SessionDescriptor",
|
|
5023
|
+
"kind": "type",
|
|
5024
|
+
"title": "SessionDescriptor",
|
|
5025
|
+
"summary": "Descriptor for `input.session(...)`. The value is an `\"HH:MM-HH:MM\"`\n(or `\"HHMM-HHMM\"`) session-window spec consumed by `session.isOpen`.\nStructurally a constrained string; v1 does not validate the grammar at\ncompile time.",
|
|
5026
|
+
"examples": [
|
|
5027
|
+
"const d: SessionDescriptor = { kind: \"session\", defaultValue: \"0930-1600\" };\nvoid d;"
|
|
5028
|
+
],
|
|
5029
|
+
"since": "1.5",
|
|
5030
|
+
"stability": "stable"
|
|
5031
|
+
},
|
|
5032
|
+
"SessionNamespace": {
|
|
5033
|
+
"fqn": "SessionNamespace",
|
|
5034
|
+
"kind": "type",
|
|
5035
|
+
"title": "SessionNamespace",
|
|
5036
|
+
"summary": "Static type of the `session` namespace. Runtime implementations satisfy this\nshape structurally when installed on `ComputeContext.session`.",
|
|
5037
|
+
"examples": [
|
|
5038
|
+
"const ns: SessionNamespace = session;\nvoid ns;"
|
|
5039
|
+
],
|
|
5040
|
+
"since": "1.5",
|
|
5041
|
+
"stability": "stable"
|
|
5042
|
+
},
|
|
4855
5043
|
"SessionType": {
|
|
4856
5044
|
"fqn": "SessionType",
|
|
4857
5045
|
"kind": "type",
|
|
@@ -4984,6 +5172,24 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
4984
5172
|
"since": "0.4",
|
|
4985
5173
|
"stability": "stable"
|
|
4986
5174
|
},
|
|
5175
|
+
"state.array": {
|
|
5176
|
+
"fqn": "state.array",
|
|
5177
|
+
"kind": "function",
|
|
5178
|
+
"title": "state.array(_capacity)",
|
|
5179
|
+
"summary": "/**\nAllocate or read a persistent **bounded collection** slot — a\nfixed-capacity FIFO ring you push values into across bars. `a.push(v)`\nappends (evicting the oldest once full); `a.get(n)` reads the `n`-th\nelement from the newest; `a.last()` is the newest; `a.size` is the\nfilled count; `a.capacity` is the bound; `a.clear()` empties it.\n`capacity` must be a compile-time numeric literal (the slot is bounded\nso it serializes). Unlike {@link state} .series (one value's bar-indexed\nhistory), this is a collection of many pushed values. v1 supports\n`number` element type.",
|
|
5180
|
+
"paramTable": [
|
|
5181
|
+
{
|
|
5182
|
+
"name": "_capacity",
|
|
5183
|
+
"type": "number",
|
|
5184
|
+
"doc": ""
|
|
5185
|
+
}
|
|
5186
|
+
],
|
|
5187
|
+
"examples": [
|
|
5188
|
+
"const fn: typeof state.array = state.array;\nvoid fn;"
|
|
5189
|
+
],
|
|
5190
|
+
"since": "1.3",
|
|
5191
|
+
"stability": "stable"
|
|
5192
|
+
},
|
|
4987
5193
|
"state.bool": {
|
|
4988
5194
|
"fqn": "state.bool",
|
|
4989
5195
|
"kind": "function",
|
|
@@ -5100,7 +5306,7 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
5100
5306
|
"fqn": "STATEFUL_PRIMITIVES_BY_NAME",
|
|
5101
5307
|
"kind": "property",
|
|
5102
5308
|
"title": "STATEFUL_PRIMITIVES_BY_NAME",
|
|
5103
|
-
"summary": "/**\nName → entry index of {@link STATEFUL_PRIMITIVES} . The compiler's\n`callsiteIdInjection` and `statefulCallInLoop` passes consult this map\nby callee name once per call site — O(1) lookup instead of an O(n) scan\nover the
|
|
5309
|
+
"summary": "/**\nName → entry index of {@link STATEFUL_PRIMITIVES} . The compiler's\n`callsiteIdInjection` and `statefulCallInLoop` passes consult this map\nby callee name once per call site — O(1) lookup instead of an O(n) scan\nover the 179-entry set on every visited call. The map is derived from\nthe same canonical entry list as {@link STATEFUL_PRIMITIVES} so adding\na primitive to the set adds it here automatically.",
|
|
5104
5310
|
"examples": [
|
|
5105
5311
|
"import { STATEFUL_PRIMITIVES_BY_NAME } from \"@invinite-org/chartlang-core\";\nconst entry = STATEFUL_PRIMITIVES_BY_NAME.get(\"ta.ema\");\n// entry is { name: \"ta.ema\", slot: true } | undefined"
|
|
5106
5312
|
],
|
|
@@ -7347,6 +7553,17 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
7347
7553
|
"since": "0.3",
|
|
7348
7554
|
"stability": "stable"
|
|
7349
7555
|
},
|
|
7556
|
+
"time": {
|
|
7557
|
+
"fqn": "time",
|
|
7558
|
+
"kind": "namespace",
|
|
7559
|
+
"title": "time",
|
|
7560
|
+
"summary": "Calendar accessors over a `Time` epoch (UTC ms since epoch). Each accessor\nis a pure function of an explicit `Time` plus an optional IANA timezone\nstring; the default `tz` is the active mount's `syminfo.timezone`, falling\nback to `\"UTC\"` when that is empty. Authors never touch `Date`/`Intl` (both\nare banned on the script path) — the runtime owns the epoch math.",
|
|
7561
|
+
"examples": [
|
|
7562
|
+
"const ns: typeof time = time;\nvoid ns;"
|
|
7563
|
+
],
|
|
7564
|
+
"since": "1.5",
|
|
7565
|
+
"stability": "stable"
|
|
7566
|
+
},
|
|
7350
7567
|
"Time": {
|
|
7351
7568
|
"fqn": "Time",
|
|
7352
7569
|
"kind": "type",
|
|
@@ -7358,6 +7575,238 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
7358
7575
|
"since": "0.1",
|
|
7359
7576
|
"stability": "stable"
|
|
7360
7577
|
},
|
|
7578
|
+
"time.dayofmonth": {
|
|
7579
|
+
"fqn": "time.dayofmonth",
|
|
7580
|
+
"kind": "function",
|
|
7581
|
+
"title": "time.dayofmonth(_t, _tz?)",
|
|
7582
|
+
"summary": "Day of the month of `t`, `1..31`.",
|
|
7583
|
+
"paramTable": [
|
|
7584
|
+
{
|
|
7585
|
+
"name": "_t",
|
|
7586
|
+
"type": "Time",
|
|
7587
|
+
"doc": ""
|
|
7588
|
+
},
|
|
7589
|
+
{
|
|
7590
|
+
"name": "_tz",
|
|
7591
|
+
"type": "string",
|
|
7592
|
+
"doc": ""
|
|
7593
|
+
}
|
|
7594
|
+
],
|
|
7595
|
+
"examples": [
|
|
7596
|
+
"const fn: typeof time.dayofmonth = time.dayofmonth;\nvoid fn;"
|
|
7597
|
+
],
|
|
7598
|
+
"since": "1.5",
|
|
7599
|
+
"stability": "stable"
|
|
7600
|
+
},
|
|
7601
|
+
"time.dayofweek": {
|
|
7602
|
+
"fqn": "time.dayofweek",
|
|
7603
|
+
"kind": "function",
|
|
7604
|
+
"title": "time.dayofweek(_t, _tz?)",
|
|
7605
|
+
"summary": "Day of the week of `t`, following Pine's convention `1=Sunday .. 7=Saturday`\n(note: NOT the ISO `1=Monday` convention).",
|
|
7606
|
+
"paramTable": [
|
|
7607
|
+
{
|
|
7608
|
+
"name": "_t",
|
|
7609
|
+
"type": "Time",
|
|
7610
|
+
"doc": ""
|
|
7611
|
+
},
|
|
7612
|
+
{
|
|
7613
|
+
"name": "_tz",
|
|
7614
|
+
"type": "string",
|
|
7615
|
+
"doc": ""
|
|
7616
|
+
}
|
|
7617
|
+
],
|
|
7618
|
+
"examples": [
|
|
7619
|
+
"const fn: typeof time.dayofweek = time.dayofweek;\nvoid fn;"
|
|
7620
|
+
],
|
|
7621
|
+
"since": "1.5",
|
|
7622
|
+
"stability": "stable"
|
|
7623
|
+
},
|
|
7624
|
+
"time.hour": {
|
|
7625
|
+
"fqn": "time.hour",
|
|
7626
|
+
"kind": "function",
|
|
7627
|
+
"title": "time.hour(_t, _tz?)",
|
|
7628
|
+
"summary": "Hour-of-day of `t`, `0..23`.",
|
|
7629
|
+
"paramTable": [
|
|
7630
|
+
{
|
|
7631
|
+
"name": "_t",
|
|
7632
|
+
"type": "Time",
|
|
7633
|
+
"doc": ""
|
|
7634
|
+
},
|
|
7635
|
+
{
|
|
7636
|
+
"name": "_tz",
|
|
7637
|
+
"type": "string",
|
|
7638
|
+
"doc": ""
|
|
7639
|
+
}
|
|
7640
|
+
],
|
|
7641
|
+
"examples": [
|
|
7642
|
+
"const fn: typeof time.hour = time.hour;\nvoid fn;"
|
|
7643
|
+
],
|
|
7644
|
+
"since": "1.5",
|
|
7645
|
+
"stability": "stable"
|
|
7646
|
+
},
|
|
7647
|
+
"time.minute": {
|
|
7648
|
+
"fqn": "time.minute",
|
|
7649
|
+
"kind": "function",
|
|
7650
|
+
"title": "time.minute(_t, _tz?)",
|
|
7651
|
+
"summary": "Minute-of-hour of `t`, `0..59`.",
|
|
7652
|
+
"paramTable": [
|
|
7653
|
+
{
|
|
7654
|
+
"name": "_t",
|
|
7655
|
+
"type": "Time",
|
|
7656
|
+
"doc": ""
|
|
7657
|
+
},
|
|
7658
|
+
{
|
|
7659
|
+
"name": "_tz",
|
|
7660
|
+
"type": "string",
|
|
7661
|
+
"doc": ""
|
|
7662
|
+
}
|
|
7663
|
+
],
|
|
7664
|
+
"examples": [
|
|
7665
|
+
"const fn: typeof time.minute = time.minute;\nvoid fn;"
|
|
7666
|
+
],
|
|
7667
|
+
"since": "1.5",
|
|
7668
|
+
"stability": "stable"
|
|
7669
|
+
},
|
|
7670
|
+
"time.month": {
|
|
7671
|
+
"fqn": "time.month",
|
|
7672
|
+
"kind": "function",
|
|
7673
|
+
"title": "time.month(_t, _tz?)",
|
|
7674
|
+
"summary": "Calendar month of `t`, `1..12`.",
|
|
7675
|
+
"paramTable": [
|
|
7676
|
+
{
|
|
7677
|
+
"name": "_t",
|
|
7678
|
+
"type": "Time",
|
|
7679
|
+
"doc": ""
|
|
7680
|
+
},
|
|
7681
|
+
{
|
|
7682
|
+
"name": "_tz",
|
|
7683
|
+
"type": "string",
|
|
7684
|
+
"doc": ""
|
|
7685
|
+
}
|
|
7686
|
+
],
|
|
7687
|
+
"examples": [
|
|
7688
|
+
"const fn: typeof time.month = time.month;\nvoid fn;"
|
|
7689
|
+
],
|
|
7690
|
+
"since": "1.5",
|
|
7691
|
+
"stability": "stable"
|
|
7692
|
+
},
|
|
7693
|
+
"time.second": {
|
|
7694
|
+
"fqn": "time.second",
|
|
7695
|
+
"kind": "function",
|
|
7696
|
+
"title": "time.second(_t, _tz?)",
|
|
7697
|
+
"summary": "Second-of-minute of `t`, `0..59`.",
|
|
7698
|
+
"paramTable": [
|
|
7699
|
+
{
|
|
7700
|
+
"name": "_t",
|
|
7701
|
+
"type": "Time",
|
|
7702
|
+
"doc": ""
|
|
7703
|
+
},
|
|
7704
|
+
{
|
|
7705
|
+
"name": "_tz",
|
|
7706
|
+
"type": "string",
|
|
7707
|
+
"doc": ""
|
|
7708
|
+
}
|
|
7709
|
+
],
|
|
7710
|
+
"examples": [
|
|
7711
|
+
"const fn: typeof time.second = time.second;\nvoid fn;"
|
|
7712
|
+
],
|
|
7713
|
+
"since": "1.5",
|
|
7714
|
+
"stability": "stable"
|
|
7715
|
+
},
|
|
7716
|
+
"time.timeClose": {
|
|
7717
|
+
"fqn": "time.timeClose",
|
|
7718
|
+
"kind": "function",
|
|
7719
|
+
"title": "time.timeClose(_t, _tz?)",
|
|
7720
|
+
"summary": "Close timestamp of the bar that starts at `t` — Pine's no-arg\n`time_close()`. Equals `t + interval`, where the interval is the active\nbar's `timeframe.inSeconds` the runtime reads internally (so this mirrors\nPine's \"current bar's interval\" without an explicit interval argument).\n`tz` is accepted for surface symmetry with the other `time.*` accessors.",
|
|
7721
|
+
"paramTable": [
|
|
7722
|
+
{
|
|
7723
|
+
"name": "_t",
|
|
7724
|
+
"type": "Time",
|
|
7725
|
+
"doc": ""
|
|
7726
|
+
},
|
|
7727
|
+
{
|
|
7728
|
+
"name": "_tz",
|
|
7729
|
+
"type": "string",
|
|
7730
|
+
"doc": ""
|
|
7731
|
+
}
|
|
7732
|
+
],
|
|
7733
|
+
"examples": [
|
|
7734
|
+
"const fn: typeof time.timeClose = time.timeClose;\nvoid fn;"
|
|
7735
|
+
],
|
|
7736
|
+
"since": "1.5",
|
|
7737
|
+
"stability": "stable"
|
|
7738
|
+
},
|
|
7739
|
+
"time.timestamp": {
|
|
7740
|
+
"fqn": "time.timestamp",
|
|
7741
|
+
"kind": "function",
|
|
7742
|
+
"title": "time.timestamp(_year, _month, _day, _hour?, _minute?, _second?, _tz?)",
|
|
7743
|
+
"summary": "Build a `Time` (UTC ms epoch) from calendar fields. `month` is `1..12`\nand `day` is `1..31`; `hour`/`minute`/`second` default to `0`. The\nfields are interpreted in `tz` (default `syminfo.timezone`, fallback\n`\"UTC\"`).",
|
|
7744
|
+
"paramTable": [
|
|
7745
|
+
{
|
|
7746
|
+
"name": "_year",
|
|
7747
|
+
"type": "number",
|
|
7748
|
+
"doc": ""
|
|
7749
|
+
},
|
|
7750
|
+
{
|
|
7751
|
+
"name": "_month",
|
|
7752
|
+
"type": "number",
|
|
7753
|
+
"doc": ""
|
|
7754
|
+
},
|
|
7755
|
+
{
|
|
7756
|
+
"name": "_day",
|
|
7757
|
+
"type": "number",
|
|
7758
|
+
"doc": ""
|
|
7759
|
+
},
|
|
7760
|
+
{
|
|
7761
|
+
"name": "_hour",
|
|
7762
|
+
"type": "number",
|
|
7763
|
+
"doc": ""
|
|
7764
|
+
},
|
|
7765
|
+
{
|
|
7766
|
+
"name": "_minute",
|
|
7767
|
+
"type": "number",
|
|
7768
|
+
"doc": ""
|
|
7769
|
+
},
|
|
7770
|
+
{
|
|
7771
|
+
"name": "_second",
|
|
7772
|
+
"type": "number",
|
|
7773
|
+
"doc": ""
|
|
7774
|
+
},
|
|
7775
|
+
{
|
|
7776
|
+
"name": "_tz",
|
|
7777
|
+
"type": "string",
|
|
7778
|
+
"doc": ""
|
|
7779
|
+
}
|
|
7780
|
+
],
|
|
7781
|
+
"examples": [
|
|
7782
|
+
"const fn: typeof time.timestamp = time.timestamp;\nvoid fn;"
|
|
7783
|
+
],
|
|
7784
|
+
"since": "1.5",
|
|
7785
|
+
"stability": "stable"
|
|
7786
|
+
},
|
|
7787
|
+
"time.year": {
|
|
7788
|
+
"fqn": "time.year",
|
|
7789
|
+
"kind": "function",
|
|
7790
|
+
"title": "time.year(_t, _tz?)",
|
|
7791
|
+
"summary": "Calendar year of `t` (e.g. `2024`).",
|
|
7792
|
+
"paramTable": [
|
|
7793
|
+
{
|
|
7794
|
+
"name": "_t",
|
|
7795
|
+
"type": "Time",
|
|
7796
|
+
"doc": ""
|
|
7797
|
+
},
|
|
7798
|
+
{
|
|
7799
|
+
"name": "_tz",
|
|
7800
|
+
"type": "string",
|
|
7801
|
+
"doc": ""
|
|
7802
|
+
}
|
|
7803
|
+
],
|
|
7804
|
+
"examples": [
|
|
7805
|
+
"const fn: typeof time.year = time.year;\nvoid fn;"
|
|
7806
|
+
],
|
|
7807
|
+
"since": "1.5",
|
|
7808
|
+
"stability": "stable"
|
|
7809
|
+
},
|
|
7361
7810
|
"TimeCyclesState": {
|
|
7362
7811
|
"fqn": "TimeCyclesState",
|
|
7363
7812
|
"kind": "type",
|
|
@@ -7402,6 +7851,17 @@ export const HOVER_REGISTRY = Object.freeze({
|
|
|
7402
7851
|
"since": "0.4",
|
|
7403
7852
|
"stability": "stable"
|
|
7404
7853
|
},
|
|
7854
|
+
"TimeNamespace": {
|
|
7855
|
+
"fqn": "TimeNamespace",
|
|
7856
|
+
"kind": "type",
|
|
7857
|
+
"title": "TimeNamespace",
|
|
7858
|
+
"summary": "Static type of the `time` namespace. Runtime implementations satisfy this\nshape structurally when installed on `ComputeContext.time`.",
|
|
7859
|
+
"examples": [
|
|
7860
|
+
"const ns: TimeNamespace = time;\nvoid ns;"
|
|
7861
|
+
],
|
|
7862
|
+
"since": "1.5",
|
|
7863
|
+
"stability": "stable"
|
|
7864
|
+
},
|
|
7405
7865
|
"TrendAngleState": {
|
|
7406
7866
|
"fqn": "TrendAngleState",
|
|
7407
7867
|
"kind": "type",
|