@malloydata/render 0.0.391 → 0.0.393
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/.storybook/main.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {join, dirname} from 'path';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type {InlineConfig} from 'vite';
|
|
3
|
+
import {mergeConfig} from 'vite';
|
|
4
|
+
import type {StorybookConfig} from '@storybook/html-vite';
|
|
4
5
|
import {
|
|
5
6
|
malloyStoriesIndexer,
|
|
6
7
|
viteMalloyStoriesPlugin,
|
|
@@ -20,17 +21,17 @@ const config: StorybookConfig = {
|
|
|
20
21
|
'../src/**/*.stories.malloy',
|
|
21
22
|
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
|
|
22
23
|
],
|
|
23
|
-
experimental_indexers: async existingIndexers => [
|
|
24
|
+
'experimental_indexers': async existingIndexers => [
|
|
24
25
|
...(existingIndexers ?? []),
|
|
25
26
|
malloyStoriesIndexer,
|
|
26
27
|
],
|
|
27
|
-
staticDirs: ['../src/stories/static'],
|
|
28
|
+
'staticDirs': ['../src/stories/static'],
|
|
28
29
|
'addons': [
|
|
29
30
|
getAbsolutePath('@storybook/addon-links'),
|
|
30
31
|
getAbsolutePath('@storybook/addon-essentials'),
|
|
31
32
|
getAbsolutePath('@storybook/addon-interactions'),
|
|
32
33
|
],
|
|
33
|
-
core: {
|
|
34
|
+
'core': {
|
|
34
35
|
builder: '@storybook/builder-vite',
|
|
35
36
|
disableTelemetry: true,
|
|
36
37
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import {PluginOption} from 'vite';
|
|
2
|
+
import type {PluginOption} from 'vite';
|
|
3
3
|
import type {IndexInput, Indexer} from '@storybook/types';
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import {DuckDBConnection} from '@malloydata/db-duckdb';
|
|
6
|
-
import {Model,
|
|
6
|
+
import type {Model, URLReader} from '@malloydata/malloy';
|
|
7
|
+
import {SingleConnectionRuntime} from '@malloydata/malloy';
|
|
7
8
|
|
|
8
9
|
const STORY_MODEL_PREFIX = /##\(story\)\s/;
|
|
9
10
|
const STORY_PREFIX = /#\(story\)\s/;
|
|
@@ -39,7 +40,7 @@ type ModelIndexInput = IndexInput & {
|
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
function fileNameToComponentName(fileName: string) {
|
|
42
|
-
const regex = /\/([
|
|
43
|
+
const regex = /\/([^/]+)\.stories\.malloy$/;
|
|
43
44
|
const match = fileName.match(regex);
|
|
44
45
|
const name = match && match[1];
|
|
45
46
|
if (name) {
|
|
@@ -54,7 +55,7 @@ function fileNameToComponentName(fileName: string) {
|
|
|
54
55
|
|
|
55
56
|
function getModelStories(materializedModel: Model, fileName: string) {
|
|
56
57
|
const models = materializedModel.explores;
|
|
57
|
-
|
|
58
|
+
const modelStories: ModelIndexInput[] = [];
|
|
58
59
|
|
|
59
60
|
const isLegacy = materializedModel.tagParse().tag.has('renderer_legacy');
|
|
60
61
|
const componentName =
|
package/.storybook/preview.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {DuckDBWASMConnection} from '@malloydata/db-duckdb/wasm';
|
|
2
|
-
import {Preview} from '@storybook/html';
|
|
2
|
+
import type {Preview} from '@storybook/html';
|
|
3
3
|
import registeredData from './registered_data.json';
|
|
4
4
|
import theme from './theme';
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ async function createConnection() {
|
|
|
10
10
|
rowLimit: 1000,
|
|
11
11
|
});
|
|
12
12
|
await connection.connecting;
|
|
13
|
-
for (
|
|
13
|
+
for (const tableName of registeredData) {
|
|
14
14
|
const tableUrl = `data/${tableName}`;
|
|
15
15
|
const fullTableName = `static/${tableUrl}`;
|
|
16
16
|
await connection.registerRemoteTable(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function mergeVegaConfigs(target:
|
|
1
|
+
export declare function mergeVegaConfigs(target: object, source: object): object;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/render",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.393",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/module/index.umd.js",
|
|
6
6
|
"types": "dist/module/index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"generate-flow": "ts-node ../../scripts/gen-flow.ts"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@malloydata/malloy-interfaces": "0.0.
|
|
33
|
-
"@malloydata/malloy-tag": "0.0.
|
|
32
|
+
"@malloydata/malloy-interfaces": "0.0.393",
|
|
33
|
+
"@malloydata/malloy-tag": "0.0.393",
|
|
34
34
|
"@tanstack/solid-virtual": "^3.10.4",
|
|
35
35
|
"lodash": "^4.18.1",
|
|
36
36
|
"luxon": "^3.5.0",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"vega-lite": "^5.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@malloydata/db-duckdb": "0.0.
|
|
46
|
-
"@malloydata/malloy": "0.0.
|
|
45
|
+
"@malloydata/db-duckdb": "0.0.393",
|
|
46
|
+
"@malloydata/malloy": "0.0.393",
|
|
47
47
|
"@storybook/addon-essentials": "^8.6.15",
|
|
48
48
|
"@storybook/addon-interactions": "^8.6.15",
|
|
49
49
|
"@storybook/addon-links": "^8.6.15",
|