@altertable/data-app 0.67.0 → 0.69.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 (183) hide show
  1. package/AGENTS.md +6 -0
  2. package/CONTRIBUTING.md +27 -1
  3. package/README.md +18 -21
  4. package/THIRD_PARTY_NOTICES +18 -0
  5. package/dist/chunks/index-22d576sn.js +153 -0
  6. package/dist/chunks/index-22d576sn.js.map +11 -0
  7. package/dist/chunks/{index-ktmvs916.js → index-2sbp9h2b.js} +37 -21
  8. package/dist/chunks/index-2sbp9h2b.js.map +13 -0
  9. package/dist/chunks/{index-23dktynd.js → index-ap60vggk.js} +4 -4
  10. package/dist/chunks/{index-m6n8ctfc.js → index-cv36cyna.js} +4 -4
  11. package/dist/chunks/index-cv36cyna.js.map +10 -0
  12. package/dist/chunks/{index-ag0cgnvq.js → index-k766wwwr.js} +13 -9
  13. package/dist/chunks/index-k766wwwr.js.map +13 -0
  14. package/dist/chunks/{index-mt93ff2b.js → index-kwnqycjt.js} +2 -2
  15. package/dist/chunks/index-kwnqycjt.js.map +10 -0
  16. package/dist/chunks/index-m0gbxtgp.js +355 -0
  17. package/dist/chunks/index-m0gbxtgp.js.map +13 -0
  18. package/dist/chunks/{index-8qfxv0h5.js → index-qhzdzca2.js} +3951 -2242
  19. package/dist/chunks/index-qhzdzca2.js.map +118 -0
  20. package/dist/chunks/{index-x69p7cv7.js → index-r7b1ftwy.js} +3 -3
  21. package/dist/chunks/index-r7b1ftwy.js.map +10 -0
  22. package/dist/chunks/{index-ev2b5aaf.js → index-sx488hvs.js} +4 -4
  23. package/dist/chunks/{index-f5cnbrjz.js → index-wss3gd3h.js} +39 -9
  24. package/dist/chunks/index-wss3gd3h.js.map +13 -0
  25. package/dist/chunks/{index-qd5xgx6y.js → index-zcqxfwdq.js} +5 -12
  26. package/dist/chunks/index-zcqxfwdq.js.map +13 -0
  27. package/dist/client/index.js +6 -6
  28. package/dist/core/appearance.js +1 -1
  29. package/dist/core/config.js +3 -3
  30. package/dist/core/contract.js +3 -3
  31. package/dist/core/format.js +10 -2
  32. package/dist/core/format.js.map +1 -1
  33. package/dist/embed/index.js +26 -25
  34. package/dist/embed/index.js.map +4 -4
  35. package/dist/index.js +3 -3
  36. package/dist/local.js +166 -144
  37. package/dist/local.js.map +8 -7
  38. package/dist/preview.js +1456 -0
  39. package/dist/preview.js.map +17 -0
  40. package/dist/react/embed/index.js +1 -1
  41. package/dist/react/index.js +272 -103
  42. package/dist/react/index.js.map +10 -11
  43. package/dist/react/ui/index.js +2124 -1254
  44. package/dist/react/ui/index.js.map +20 -13
  45. package/dist/server.js +68 -57
  46. package/dist/server.js.map +7 -6
  47. package/dist/types/client/download.d.ts +5 -0
  48. package/dist/types/client/iframe.d.ts +4 -2
  49. package/dist/types/client/logger.d.ts +10 -2
  50. package/dist/types/core/annotations.d.ts +5 -0
  51. package/dist/types/core/appearance.d.ts +2 -0
  52. package/dist/types/core/bridge-endpoint.d.ts +2 -2
  53. package/dist/types/core/bridge.d.ts +22 -0
  54. package/dist/types/core/config.d.ts +5 -0
  55. package/dist/types/core/contract.d.ts +3 -1
  56. package/dist/types/core/date-format.d.ts +24 -0
  57. package/dist/types/core/dimension.d.ts +2 -1
  58. package/dist/types/core/filters.d.ts +4 -3
  59. package/dist/types/core/format.d.ts +5 -3
  60. package/dist/types/core/messages.d.ts +3 -1
  61. package/dist/types/core/operation-types.d.ts +7 -7
  62. package/dist/types/core/time-interval.d.ts +96 -0
  63. package/dist/types/core/variables.d.ts +13 -4
  64. package/dist/types/embed/host.d.ts +4 -4
  65. package/dist/types/react/annotations/annotation-editor-state.d.ts +2 -0
  66. package/dist/types/react/annotations/annotation-targets.d.ts +1 -0
  67. package/dist/types/react/annotations/getAnnotationProps.d.ts +5 -3
  68. package/dist/types/react/annotations/useAnnotationGeometry.d.ts +2 -2
  69. package/dist/types/react/bindings.d.ts +26 -3
  70. package/dist/types/react/date-formatting.d.ts +12 -0
  71. package/dist/types/react/hooks.d.ts +10 -9
  72. package/dist/types/react/index.d.ts +7 -2
  73. package/dist/types/react/search-suggestions.d.ts +8 -0
  74. package/dist/types/react/style-contract.d.ts +13 -5
  75. package/dist/types/react/ui/ChartLegend.d.ts +4 -3
  76. package/dist/types/react/ui/ChoicePicker.d.ts +2 -0
  77. package/dist/types/react/ui/ComposedChart.d.ts +1 -1
  78. package/dist/types/react/ui/DataApp.d.ts +5 -4
  79. package/dist/types/react/ui/DataAppFrame.d.ts +14 -3
  80. package/dist/types/react/ui/DataTable.d.ts +6 -4
  81. package/dist/types/react/ui/DataWidget.d.ts +4 -0
  82. package/dist/types/react/ui/DateDisplay.d.ts +9 -0
  83. package/dist/types/react/ui/DateRangePicker.d.ts +3 -1
  84. package/dist/types/react/ui/DateTimeTooltip.d.ts +3 -2
  85. package/dist/types/react/ui/DimensionPicker.d.ts +3 -1
  86. package/dist/types/react/ui/EmptyState.d.ts +1 -1
  87. package/dist/types/react/ui/FunnelChart.d.ts +20 -0
  88. package/dist/types/react/ui/GradientScroll.d.ts +8 -0
  89. package/dist/types/react/ui/Grid.d.ts +1 -1
  90. package/dist/types/react/ui/JourneyChart.d.ts +10 -0
  91. package/dist/types/react/ui/MetricWidget.d.ts +2 -0
  92. package/dist/types/react/ui/NumberFilterPicker.d.ts +3 -1
  93. package/dist/types/react/ui/PeriodSummary.d.ts +2 -1
  94. package/dist/types/react/ui/PickerField.d.ts +15 -0
  95. package/dist/types/react/ui/PopoverSurface.d.ts +5 -0
  96. package/dist/types/react/ui/RequestHint.d.ts +2 -2
  97. package/dist/types/react/ui/RetentionChart.d.ts +27 -0
  98. package/dist/types/react/ui/SearchField.d.ts +3 -1
  99. package/dist/types/react/ui/SearchTypeahead.d.ts +15 -0
  100. package/dist/types/react/ui/SectionHeading.d.ts +8 -0
  101. package/dist/types/react/ui/Select.d.ts +5 -1
  102. package/dist/types/react/ui/Sheet.d.ts +3 -1
  103. package/dist/types/react/ui/TableWidget.d.ts +8 -0
  104. package/dist/types/react/ui/Tabs.d.ts +4 -3
  105. package/dist/types/react/ui/VariableBar.d.ts +1 -1
  106. package/dist/types/react/ui/VisualizationWidget.d.ts +1 -1
  107. package/dist/types/react/ui/chart-data.d.ts +9 -0
  108. package/dist/types/react/ui/chart-date-axis.d.ts +15 -0
  109. package/dist/types/react/ui/chart-interaction.d.ts +21 -0
  110. package/dist/types/react/ui/chart-primitives.d.ts +7 -5
  111. package/dist/types/react/ui/chart-time.d.ts +16 -0
  112. package/dist/types/react/ui/chartColor.d.ts +1 -0
  113. package/dist/types/react/ui/icons.d.ts +3 -1
  114. package/dist/types/react/ui/index.d.ts +15 -4
  115. package/dist/types/react/ui/journey-flow.d.ts +49 -0
  116. package/dist/types/react/ui/metric-comparison.d.ts +2 -2
  117. package/dist/types/react/ui/metric.d.ts +2 -2
  118. package/dist/types/react/ui/presentation.d.ts +2 -0
  119. package/dist/types/react/ui/searchItems.d.ts +2 -0
  120. package/dist/types/react/ui/useSvgId.d.ts +2 -0
  121. package/dist/types/react/ui/variables.d.ts +1 -1
  122. package/dist/types/react/view-control-bar.d.ts +16 -0
  123. package/dist/types/react/view-controls.d.ts +3 -2
  124. package/dist/types/react/view-runtime.d.ts +3 -1
  125. package/dist/types/react/view.d.ts +14 -2
  126. package/dist/types/server/local.d.ts +3 -1
  127. package/dist/types/server/preview/host.d.ts +1 -0
  128. package/dist/types/server/preview/index.d.ts +16 -0
  129. package/dist/types/server/reload-channel.d.ts +6 -0
  130. package/dist/types/server/request-body.d.ts +4 -0
  131. package/dist/worker.js +2 -2
  132. package/docs/app-authoring.md +17 -9
  133. package/docs/client.md +1 -1
  134. package/docs/contract.md +10 -10
  135. package/docs/embed.md +11 -3
  136. package/docs/formatting-and-appearance.md +36 -5
  137. package/docs/layout.md +31 -8
  138. package/docs/react-embed.md +4 -4
  139. package/docs/react.md +1 -1
  140. package/docs/server-bun.md +25 -0
  141. package/docs/server.md +1 -1
  142. package/docs/styling.md +7 -28
  143. package/docs/ui.md +33 -12
  144. package/docs/variables.md +92 -15
  145. package/docs/views.md +13 -36
  146. package/docs/widgets.md +38 -23
  147. package/docs/worker.md +2 -1
  148. package/examples/starter-data-app/index.tsx +0 -1
  149. package/examples/starter-local-data-app/.bun-version +1 -0
  150. package/examples/starter-local-data-app/.node-version +1 -0
  151. package/examples/starter-local-data-app/.oxfmtrc.json +4 -0
  152. package/examples/starter-local-data-app/.oxlintrc.json +33 -0
  153. package/examples/starter-local-data-app/AGENTS.md +22 -0
  154. package/examples/starter-local-data-app/README.md +54 -0
  155. package/examples/starter-local-data-app/app.ts +22 -0
  156. package/examples/starter-local-data-app/bunfig.toml +2 -0
  157. package/examples/starter-local-data-app/package.json +33 -0
  158. package/examples/starter-local-data-app/src/App.tsx +8 -0
  159. package/examples/starter-local-data-app/src/assets.d.ts +1 -0
  160. package/examples/starter-local-data-app/src/data-context.ts +21 -0
  161. package/examples/starter-local-data-app/src/favicon.svg +13 -0
  162. package/examples/starter-local-data-app/src/index.html +14 -0
  163. package/examples/starter-local-data-app/src/main.tsx +7 -0
  164. package/examples/starter-local-data-app/src/operations.ts +6 -0
  165. package/examples/starter-local-data-app/src/server.ts +6 -0
  166. package/examples/starter-local-data-app/tsconfig.json +15 -0
  167. package/package.json +13 -3
  168. package/dist/chunks/index-8qfxv0h5.js.map +0 -108
  169. package/dist/chunks/index-ag0cgnvq.js.map +0 -13
  170. package/dist/chunks/index-dq7b35fn.js +0 -307
  171. package/dist/chunks/index-dq7b35fn.js.map +0 -13
  172. package/dist/chunks/index-f5cnbrjz.js.map +0 -13
  173. package/dist/chunks/index-ktmvs916.js.map +0 -13
  174. package/dist/chunks/index-m6n8ctfc.js.map +0 -10
  175. package/dist/chunks/index-mev09s5v.js +0 -77
  176. package/dist/chunks/index-mev09s5v.js.map +0 -10
  177. package/dist/chunks/index-mt93ff2b.js.map +0 -10
  178. package/dist/chunks/index-qd5xgx6y.js.map +0 -13
  179. package/dist/chunks/index-x69p7cv7.js.map +0 -10
  180. package/dist/types/react/shellStyles.d.ts +0 -3
  181. package/dist/types/react/ui/DataAppSkeleton.d.ts +0 -7
  182. /package/dist/chunks/{index-23dktynd.js.map → index-ap60vggk.js.map} +0 -0
  183. /package/dist/chunks/{index-ev2b5aaf.js.map → index-sx488hvs.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ [install]
2
+ exact = true
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "data-app-starter",
3
+ "private": true,
4
+ "type": "module",
5
+ "imports": {
6
+ "#app/*": "./src/*",
7
+ "#config": "./app.ts"
8
+ },
9
+ "scripts": {
10
+ "typecheck": "tsc --noEmit",
11
+ "lint": "oxlint --type-aware src",
12
+ "format": "oxfmt src app.ts",
13
+ "format:check": "oxfmt --check src app.ts",
14
+ "dev": "bun --hot src/server.ts",
15
+ "build": "bun run typecheck && bun build src/index.html --outdir=dist --production",
16
+ "check": "bun run lint && bun run format:check && bun run build"
17
+ },
18
+ "dependencies": {
19
+ "@altertable/data-app": "file:../..",
20
+ "react": "19.3.0",
21
+ "react-dom": "19.3.0"
22
+ },
23
+ "devDependencies": {
24
+ "@types/bun": "1.4.2",
25
+ "@types/react": "19.3.0",
26
+ "@types/react-dom": "19.3.0",
27
+ "oxfmt": "0.70.0",
28
+ "oxlint": "1.85.0",
29
+ "oxlint-tsgolint": "7.0.2003",
30
+ "typescript": "7.0.2"
31
+ },
32
+ "packageManager": "bun@1.4.2"
33
+ }
@@ -0,0 +1,8 @@
1
+ import { GettingStarted } from "@altertable/data-app/react/ui";
2
+ import { dataContext } from "#app/data-context.ts";
3
+
4
+ /** Connectivity-only screen. Investigate the requested question, then replace this with a view
5
+ * that leads with a supported finding and explores the useful angles behind it. */
6
+ export function App() {
7
+ return <GettingStarted dataContext={dataContext} />;
8
+ }
@@ -0,0 +1 @@
1
+ declare module "*.css";
@@ -0,0 +1,21 @@
1
+ import { createDataContext } from "@altertable/data-app/react";
2
+ import { dataApp } from "#config";
3
+
4
+ const connectionQueryNames = { connection: "connection" } satisfies Record<
5
+ string,
6
+ keyof typeof dataApp.queries
7
+ >;
8
+
9
+ /** Setup context only. Replace it with the exploration's scope, exact definitions, limitations,
10
+ * and query evidence after inspecting the source data. */
11
+ export const dataContext = createDataContext(connectionQueryNames)({
12
+ description:
13
+ "This starter runs a lightweight query to verify that the selected lakehouse profile can execute SQL. It does not check access to individual datasets. Replace the check with a query that answers a real question before sharing the app.",
14
+ glossary: {
15
+ connectionVerified: {
16
+ term: "Connected",
17
+ definition: "The latest connection-check query completed successfully.",
18
+ queryNames: [connectionQueryNames.connection],
19
+ },
20
+ },
21
+ });
@@ -0,0 +1,13 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 51 44">
2
+ <style>
3
+ path { fill: #01050b; }
4
+ @media (prefers-color-scheme: dark) {
5
+ path { fill: #fff; }
6
+ }
7
+ </style>
8
+ <path
9
+ fill-rule="evenodd"
10
+ clip-rule="evenodd"
11
+ d="M40.3274 28.9788L35.9663 28.8378L34.9541 28.6881L18.1066 10.301L24.1073 0L26.8738 0.545413L41.5212 25.6848L40.3274 28.9788ZM20.5319 20.1112L18.1894 15.6731L14.6154 16.2904L0 41.378L0.894584 44H12.9453L20.5769 20.4134L20.5319 20.1112ZM44.9804 31.6253L20.3808 36.9197L17.5838 41.2974L19.9001 44H49.2036L51 41.9551L44.9804 31.6253Z"
12
+ />
13
+ </svg>
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="theme-color" content="#ffffff" />
7
+ <title>Altertable app</title>
8
+ <link rel="icon" href="./favicon.svg" type="image/svg+xml" />
9
+ <script type="module" src="./main.tsx"></script>
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ </body>
14
+ </html>
@@ -0,0 +1,7 @@
1
+ import { injectDataAppStyles, mountDataApp } from "@altertable/data-app/react";
2
+ import { App } from "#app/App.tsx";
3
+ import { dataApp as app } from "#config";
4
+
5
+ injectDataAppStyles();
6
+
7
+ mountDataApp({ app, component: App });
@@ -0,0 +1,6 @@
1
+ import { dataApp } from "#config";
2
+ import { connectionCheck } from "@altertable/data-app/contract";
3
+
4
+ /** Connectivity probe only: its successful query supplies no analytical result. Replace it with
5
+ * bounded, validated operations that cover the questions the finished app will answer. */
6
+ export const operations = { connection: connectionCheck(dataApp.queries) };
@@ -0,0 +1,6 @@
1
+ import page from "#app/index.html";
2
+ import { serveLocalApp } from "@altertable/data-app/server/bun";
3
+ import { operations } from "#app/operations.ts";
4
+ import { dataApp as app } from "#config";
5
+
6
+ serveLocalApp({ page, operations, title: app.title });
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "Preserve",
5
+ "moduleResolution": "bundler",
6
+ "allowImportingTsExtensions": true,
7
+ "resolveJsonModule": true,
8
+ "jsx": "react-jsx",
9
+ "strict": true,
10
+ "noEmit": true,
11
+ "skipLibCheck": true,
12
+ "types": ["bun"]
13
+ },
14
+ "include": ["src", "app.ts"]
15
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@altertable/data-app",
3
- "version": "0.67.0",
4
- "description": "Contracts, transport, and React UI for Altertable data apps",
3
+ "version": "0.69.0",
4
+ "description": "A TypeScript and React toolkit with APIs, components, and authoring guides for developers and AI agents to build data apps powered by Altertable.",
5
5
  "keywords": [
6
6
  "altertable",
7
7
  "analytics",
@@ -29,9 +29,11 @@
29
29
  "dist",
30
30
  "docs",
31
31
  "examples/starter-data-app",
32
+ "examples/starter-local-data-app",
32
33
  "README.md",
33
34
  "CONTRIBUTING.md",
34
- "AGENTS.md"
35
+ "AGENTS.md",
36
+ "THIRD_PARTY_NOTICES"
35
37
  ],
36
38
  "type": "module",
37
39
  "sideEffects": false,
@@ -68,6 +70,10 @@
68
70
  "types": "./dist/types/server/local.d.ts",
69
71
  "import": "./dist/local.js"
70
72
  },
73
+ "./server/bun/preview": {
74
+ "types": "./dist/types/server/preview/index.d.ts",
75
+ "import": "./dist/preview.js"
76
+ },
71
77
  "./react": {
72
78
  "types": "./dist/types/react/index.d.ts",
73
79
  "import": "./dist/react/index.js"
@@ -95,6 +101,8 @@
95
101
  "scripts": {
96
102
  "build": "bun run scripts/build.ts && tsc -p tsconfig.build.json && bun run scripts/build-declarations.ts",
97
103
  "dev": "bun run scripts/dev.ts",
104
+ "dev:file": "bun run scripts/dev-file.ts",
105
+ "dev:dir": "bun run scripts/dev-dir.ts",
98
106
  "typecheck": "bun install --frozen-lockfile && tsc --noEmit",
99
107
  "lint": "oxlint --type-aware src tests scripts dev examples/starter-data-app vitest.config.ts",
100
108
  "format": "oxfmt .",
@@ -111,6 +119,7 @@
111
119
  "check:styles": "bun run scripts/check-app-styles.ts"
112
120
  },
113
121
  "dependencies": {
122
+ "@altertable/lakehouse": "0.4.1",
114
123
  "@floating-ui/react": "0.27.20",
115
124
  "@internationalized/date": "3.12.4",
116
125
  "@tanstack/react-query": "5.104.0",
@@ -125,6 +134,7 @@
125
134
  "@types/bun": "1.4.2",
126
135
  "@types/react": "19.3.0",
127
136
  "@types/react-dom": "19.3.0",
137
+ "get-tsconfig": "4.14.3",
128
138
  "markdownlint-cli2": "0.23.3",
129
139
  "oxfmt": "0.70.0",
130
140
  "oxlint": "1.85.0",