@toclocoinc/lattice-grid 1.59.0 → 1.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +3 -3
  2. package/docs/API.html +1623 -91
  3. package/docs/api-detail.html +270 -5
  4. package/lattice-grid.d.ts +100 -2880
  5. package/lattice-grid.esm.min.js +449 -66
  6. package/lattice-grid.min.cjs +449 -66
  7. package/lattice-grid.min.js +449 -66
  8. package/modules/ai.d.ts +401 -0
  9. package/modules/ai.esm.min.js +43 -6
  10. package/modules/ai.min.cjs +43 -6
  11. package/modules/ai.min.js +43 -6
  12. package/modules/angular.d.ts +31 -0
  13. package/modules/angular.esm.min.js +3 -3
  14. package/modules/angular.min.cjs +3 -3
  15. package/modules/angular.min.js +3 -3
  16. package/modules/chart-alluvial.d.ts +18 -0
  17. package/modules/chart-alluvial.esm.min.js +1 -1
  18. package/modules/chart-arc.d.ts +18 -0
  19. package/modules/chart-arc.esm.min.js +1 -1
  20. package/modules/chart-bubblemap.d.ts +18 -0
  21. package/modules/chart-bubblemap.esm.min.js +1 -1
  22. package/modules/chart-bump.d.ts +12 -0
  23. package/modules/chart-bump.esm.min.js +1 -1
  24. package/modules/chart-calendar.d.ts +12 -0
  25. package/modules/chart-calendar.esm.min.js +1 -1
  26. package/modules/chart-decomposition.d.ts +20 -0
  27. package/modules/chart-decomposition.esm.min.js +1 -1
  28. package/modules/chart-diverging.d.ts +12 -0
  29. package/modules/chart-diverging.esm.min.js +1 -1
  30. package/modules/chart-dumbbell.d.ts +18 -0
  31. package/modules/chart-dumbbell.esm.min.js +1 -1
  32. package/modules/chart-fan.d.ts +18 -0
  33. package/modules/chart-fan.esm.min.js +1 -1
  34. package/modules/chart-hexbin.d.ts +18 -0
  35. package/modules/chart-hexbin.esm.min.js +1 -1
  36. package/modules/chart-hexmap.d.ts +18 -0
  37. package/modules/chart-hexmap.esm.min.js +1 -1
  38. package/modules/chart-icicle.d.ts +12 -0
  39. package/modules/chart-icicle.esm.min.js +1 -1
  40. package/modules/chart-parallel.d.ts +19 -0
  41. package/modules/chart-parallel.esm.min.js +1 -1
  42. package/modules/chart-ridgeline.d.ts +14 -0
  43. package/modules/chart-ridgeline.esm.min.js +1 -1
  44. package/modules/chart-roc.d.ts +20 -0
  45. package/modules/chart-roc.esm.min.js +1 -1
  46. package/modules/chart-slope.d.ts +12 -0
  47. package/modules/chart-slope.esm.min.js +1 -1
  48. package/modules/chart-splom.d.ts +19 -0
  49. package/modules/chart-splom.esm.min.js +1 -1
  50. package/modules/chart-waffle.d.ts +12 -0
  51. package/modules/chart-waffle.esm.min.js +1 -1
  52. package/modules/charts.d.ts +122 -0
  53. package/modules/charts.esm.min.js +35 -8
  54. package/modules/charts.min.cjs +35 -8
  55. package/modules/charts.min.js +35 -8
  56. package/modules/data-router.d.ts +91 -0
  57. package/modules/data-router.esm.min.js +109 -17
  58. package/modules/data-router.min.cjs +109 -17
  59. package/modules/data-router.min.js +109 -17
  60. package/modules/devtools.d.ts +28 -0
  61. package/modules/devtools.esm.min.js +2 -2
  62. package/modules/devtools.min.cjs +2 -2
  63. package/modules/devtools.min.js +2 -2
  64. package/modules/dhtmlx-compat.d.ts +19 -0
  65. package/modules/dhtmlx-compat.esm.min.js +4 -4
  66. package/modules/dhtmlx-compat.min.cjs +4 -4
  67. package/modules/dhtmlx-compat.min.js +4 -4
  68. package/modules/gantt.d.ts +647 -0
  69. package/modules/gantt.esm.min.js +1070 -201
  70. package/modules/gantt.min.cjs +1070 -201
  71. package/modules/gantt.min.js +1070 -201
  72. package/modules/htmx.d.ts +176 -0
  73. package/modules/htmx.esm.min.js +449 -66
  74. package/modules/htmx.min.cjs +449 -66
  75. package/modules/htmx.min.js +449 -66
  76. package/modules/kanban.d.ts +492 -0
  77. package/modules/kanban.esm.min.js +4 -4
  78. package/modules/kanban.min.cjs +4 -4
  79. package/modules/kanban.min.js +4 -4
  80. package/modules/kpi.d.ts +255 -0
  81. package/modules/kpi.esm.min.js +40 -7
  82. package/modules/kpi.min.cjs +40 -7
  83. package/modules/kpi.min.js +40 -7
  84. package/modules/layout.d.ts +332 -0
  85. package/modules/layout.esm.min.js +4 -4
  86. package/modules/layout.min.cjs +4 -4
  87. package/modules/layout.min.js +4 -4
  88. package/modules/mock-socket.d.ts +114 -0
  89. package/modules/mock-socket.esm.min.js +2 -2
  90. package/modules/mock-socket.min.cjs +2 -2
  91. package/modules/mock-socket.min.js +2 -2
  92. package/modules/react.d.ts +25 -0
  93. package/modules/react.esm.min.js +3 -3
  94. package/modules/react.min.cjs +3 -3
  95. package/modules/react.min.js +3 -3
  96. package/modules/svelte.d.ts +26 -0
  97. package/modules/svelte.esm.min.js +3 -3
  98. package/modules/svelte.min.cjs +3 -3
  99. package/modules/svelte.min.js +3 -3
  100. package/modules/tabs.d.ts +133 -0
  101. package/modules/tabs.esm.min.js +11 -4
  102. package/modules/tabs.min.cjs +11 -4
  103. package/modules/tabs.min.js +11 -4
  104. package/modules/vue.d.ts +24 -0
  105. package/modules/vue.esm.min.js +3 -3
  106. package/modules/vue.min.cjs +3 -3
  107. package/modules/vue.min.js +3 -3
  108. package/modules/webcomponent.d.ts +47 -0
  109. package/modules/webcomponent.esm.min.js +449 -66
  110. package/modules/webcomponent.min.cjs +449 -66
  111. package/modules/webcomponent.min.js +449 -66
  112. package/package.json +2 -2
@@ -0,0 +1,114 @@
1
+ /*!
2
+ * Lattice Grid 1.61.0, mock-socket module type declarations
3
+ * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
+ * https://latticegrid.dev
5
+ */
6
+ /** One record on a feed: any object. Its partition comes from a property and its identity from `rowKey`. */
7
+ type FeedRow = Record<string, unknown>;
8
+
9
+ /** One change in a delta batch, in the shape the data router applies. */
10
+ interface FeedChange { op: 'upsert' | 'delete'; row: FeedRow }
11
+
12
+ /**
13
+ * A message on the wire. A snapshot carries the full opening set; a delta
14
+ * carries the changes since. The reader parses `event.data` and switches on
15
+ * `kind`, exactly as against a real feed that framed its messages the same way.
16
+ */
17
+ interface FeedMessage {
18
+ kind: 'snapshot' | 'delta';
19
+ /** Present on a snapshot: the full opening set of rows. */
20
+ rows?: FeedRow[];
21
+ /** Present on a delta: the changes to apply. */
22
+ changes?: FeedChange[];
23
+ }
24
+
25
+ /** A feed: any iterator that yields a snapshot first, then deltas forever. */
26
+ type Feed = Iterator<FeedMessage>;
27
+
28
+ /**
29
+ * A serverless stand-in for a live `WebSocket`. It presents the same surface
30
+ * as the browser's `WebSocket` — `readyState` and the state constants,
31
+ * `onopen`/`onmessage`/`onclose`/`onerror`, `addEventListener`, `send` and
32
+ * `close` — so the code that reads it does not change when it is swapped for a
33
+ * real socket. It opens after a short delay, emits the feed's first value as a
34
+ * snapshot, then pumps one value per tick as a delta.
35
+ */
36
+ export class MockWebSocket {
37
+ static readonly CONNECTING: 0;
38
+ static readonly OPEN: 1;
39
+ static readonly CLOSING: 2;
40
+ static readonly CLOSED: 3;
41
+ readonly CONNECTING: 0;
42
+ readonly OPEN: 1;
43
+ readonly CLOSING: 2;
44
+ readonly CLOSED: 3;
45
+ readyState: number;
46
+ url: string;
47
+ onopen: ((event: { type: string }) => void) | null;
48
+ onmessage: ((event: { type: string; data: string }) => void) | null;
49
+ onclose: ((event: { type: string; code: number; reason: string; wasClean: boolean }) => void) | null;
50
+ onerror: ((event: { type: string; error: unknown }) => void) | null;
51
+ /**
52
+ * @param init the feed and its timing: `feed` (snapshot first, then deltas);
53
+ * `rate` ms between deltas (default 1000); `jitter` random plus-or-minus ms
54
+ * per gap (default 0); `seed` for that jitter (default 1); `snapshotDelay`
55
+ * ms before opening (default 60); `pauseWhenHidden` stops while the tab is
56
+ * hidden (default true); `url` a cosmetic address.
57
+ */
58
+ constructor(init: {
59
+ feed: Feed;
60
+ rate?: number;
61
+ jitter?: number;
62
+ seed?: number;
63
+ snapshotDelay?: number;
64
+ pauseWhenHidden?: boolean;
65
+ url?: string;
66
+ });
67
+ addEventListener(type: string, fn: (event: unknown) => void): void;
68
+ removeEventListener(type: string, fn: (event: unknown) => void): void;
69
+ /** A real socket sends upstream; here it is accepted and ignored. */
70
+ send(data?: unknown): void;
71
+ /** Stop the feed until `resume()`; the socket stays open (a demo/test affordance). */
72
+ pause(): void;
73
+ /** Resume a paused feed. */
74
+ resume(): void;
75
+ /** Close the socket, stop the feed and emit a clean `close`. */
76
+ close(): void;
77
+ }
78
+
79
+ /**
80
+ * mulberry32: a small seeded pseudo-random generator, so a custom feed can be
81
+ * seeded the same way the shipped ones are. The same seed yields the same
82
+ * sequence of values in `[0, 1)`.
83
+ */
84
+ export function rng(seed: number): () => number;
85
+
86
+ /**
87
+ * A mixed operations feed — orders, shipments and incidents across three
88
+ * regions plus a throughput rollup — the Data Router tutorial partitions
89
+ * across several grids and a chart from one source. Yields a snapshot, then
90
+ * deltas forever. Seedable for a repeatable stream.
91
+ */
92
+ export function opsFeed(options?: {
93
+ seed?: number;
94
+ orders?: number;
95
+ shipments?: number;
96
+ incidents?: number;
97
+ batch?: number;
98
+ }): Generator<FeedMessage>;
99
+
100
+ /**
101
+ * A market-data feed: instruments whose prices random-walk each tick, each
102
+ * record carrying `type: 'price'`, `symbol`, `last`, `chg` and a bid/ask. The
103
+ * price/random-walk feed behind the trading-terminal tutorial. Yields a
104
+ * snapshot, then deltas forever. Seedable for a repeatable stream.
105
+ */
106
+ export function priceFeed(options?: {
107
+ seed?: number;
108
+ symbols?: { symbol: string; last: number }[];
109
+ move?: number;
110
+ batch?: number;
111
+ spread?: number;
112
+ }): Generator<FeedMessage>;
113
+
114
+ export default MockWebSocket;