@sqlrooms/mosaic 0.23.0 → 0.24.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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-mosaic.d.ts","sourceRoot":"","sources":["../src/use-mosaic.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,SAAS,EAA6B,MAAM,qBAAqB,CAAC;AA8B1E;;;;GAIG;AACH,wBAAgB,SAAS;;;EAUxB"}
1
+ {"version":3,"file":"use-mosaic.d.ts","sourceRoot":"","sources":["../src/use-mosaic.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,SAAS,EAA6B,MAAM,qBAAqB,CAAC;AA+B1E;;;;GAIG;AACH,wBAAgB,SAAS;;;EAUxB"}
@@ -17,6 +17,7 @@ async function getMosaicConnector(duckDb) {
17
17
  }
18
18
  await duckDb.initialize();
19
19
  mosaicConnector = await coordinator().databaseConnector(wasmConnector({
20
+ // @ts-ignore - We install a different version of duckdb-wasm
20
21
  duckDb: duckDb.getDb(),
21
22
  // @ts-ignore - We install a different version of duckdb-wasm
22
23
  connection: duckDb.getConnection(),
@@ -1 +1 @@
1
- {"version":3,"file":"use-mosaic.js","sourceRoot":"","sources":["../src/use-mosaic.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAY,WAAW,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAE1C,IAAI,eAA0B,CAAC;AAE/B,+DAA+D;AAE/D;;;;GAIG;AACH,KAAK,UAAU,kBAAkB,CAAC,MAAuB;IACvD,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;IAC1B,eAAe,GAAG,MAAM,WAAW,EAAE,CAAC,iBAAiB,CACrD,aAAa,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE;QACtB,6DAA6D;QAC7D,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE;KACnC,CAAC,CACH,CAAC;IACF,OAAO,eAAe,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS;IACvB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAa,CAAC;IACxD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,SAAS,CAAC,GAAG,EAAE;QACb,kBAAkB,CAAC,MAAM,CAAC;aACvB,IAAI,CAAC,YAAY,CAAC;aAClB,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACxC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,OAAO,EAAC,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAC,CAAC;AAClE,CAAC","sourcesContent":["import {\n DuckDbConnector,\n useDuckDb,\n isWasmDuckDbConnector,\n} from '@sqlrooms/duckdb';\nimport {Connector, coordinator, wasmConnector} from '@uwdata/mosaic-core';\nimport {useEffect, useState} from 'react';\n\nlet mosaicConnector: Connector;\n\n// TODO: Create MosaicSlice and keep the connector in the store\n\n/**\n * Retrieves a Mosaic connector for the DuckDB database.\n *\n * @returns {Promise<MosaicConnector>} The Mosaic connector for the DuckDB database.\n */\nasync function getMosaicConnector(duckDb: DuckDbConnector) {\n if (mosaicConnector) {\n return mosaicConnector;\n }\n if (!isWasmDuckDbConnector(duckDb)) {\n throw new Error('Only WasmDuckDbConnector is currently supported');\n }\n await duckDb.initialize();\n mosaicConnector = await coordinator().databaseConnector(\n wasmConnector({\n duckDb: duckDb.getDb(),\n // @ts-ignore - We install a different version of duckdb-wasm\n connection: duckDb.getConnection(),\n }),\n );\n return mosaicConnector;\n}\n\n/**\n * Hook to manage the Mosaic connector.\n *\n * @returns {Object} An object containing the Mosaic connector and a loading state.\n */\nexport function useMosaic() {\n const [isLoading, setIsLoading] = useState(true);\n const [connector, setConnector] = useState<Connector>();\n const duckDb = useDuckDb();\n useEffect(() => {\n getMosaicConnector(duckDb)\n .then(setConnector)\n .finally(() => setIsLoading(false));\n }, [duckDb]);\n return {isMosaicLoading: isLoading, mosaicConnector: connector};\n}\n"]}
1
+ {"version":3,"file":"use-mosaic.js","sourceRoot":"","sources":["../src/use-mosaic.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAY,WAAW,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAE1C,IAAI,eAA0B,CAAC;AAE/B,+DAA+D;AAE/D;;;;GAIG;AACH,KAAK,UAAU,kBAAkB,CAAC,MAAuB;IACvD,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;IAC1B,eAAe,GAAG,MAAM,WAAW,EAAE,CAAC,iBAAiB,CACrD,aAAa,CAAC;QACZ,6DAA6D;QAC7D,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE;QACtB,6DAA6D;QAC7D,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE;KACnC,CAAC,CACH,CAAC;IACF,OAAO,eAAe,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS;IACvB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAa,CAAC;IACxD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,SAAS,CAAC,GAAG,EAAE;QACb,kBAAkB,CAAC,MAAM,CAAC;aACvB,IAAI,CAAC,YAAY,CAAC;aAClB,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IACxC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,OAAO,EAAC,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAC,CAAC;AAClE,CAAC","sourcesContent":["import {\n DuckDbConnector,\n useDuckDb,\n isWasmDuckDbConnector,\n} from '@sqlrooms/duckdb';\nimport {Connector, coordinator, wasmConnector} from '@uwdata/mosaic-core';\nimport {useEffect, useState} from 'react';\n\nlet mosaicConnector: Connector;\n\n// TODO: Create MosaicSlice and keep the connector in the store\n\n/**\n * Retrieves a Mosaic connector for the DuckDB database.\n *\n * @returns {Promise<MosaicConnector>} The Mosaic connector for the DuckDB database.\n */\nasync function getMosaicConnector(duckDb: DuckDbConnector) {\n if (mosaicConnector) {\n return mosaicConnector;\n }\n if (!isWasmDuckDbConnector(duckDb)) {\n throw new Error('Only WasmDuckDbConnector is currently supported');\n }\n await duckDb.initialize();\n mosaicConnector = await coordinator().databaseConnector(\n wasmConnector({\n // @ts-ignore - We install a different version of duckdb-wasm\n duckDb: duckDb.getDb(),\n // @ts-ignore - We install a different version of duckdb-wasm\n connection: duckDb.getConnection(),\n }),\n );\n return mosaicConnector;\n}\n\n/**\n * Hook to manage the Mosaic connector.\n *\n * @returns {Object} An object containing the Mosaic connector and a loading state.\n */\nexport function useMosaic() {\n const [isLoading, setIsLoading] = useState(true);\n const [connector, setConnector] = useState<Connector>();\n const duckDb = useDuckDb();\n useEffect(() => {\n getMosaicConnector(duckDb)\n .then(setConnector)\n .finally(() => setIsLoading(false));\n }, [duckDb]);\n return {isMosaicLoading: isLoading, mosaicConnector: connector};\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlrooms/mosaic",
3
- "version": "0.23.0",
3
+ "version": "0.24.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@ai-sdk/provider": "^1.1.3",
22
- "@sqlrooms/duckdb": "0.23.0",
22
+ "@sqlrooms/duckdb": "0.24.1",
23
23
  "@uwdata/mosaic-core": "^0.16.2",
24
24
  "@uwdata/mosaic-spec": "^0.16.2",
25
25
  "@uwdata/vgplot": "^0.16.2"
@@ -35,5 +35,5 @@
35
35
  "typecheck": "tsc --noEmit",
36
36
  "typedoc": "typedoc"
37
37
  },
38
- "gitHead": "1bf514da4df13b8ce7cab1b4c1720fc5ad0e1c0e"
38
+ "gitHead": "4e19f7348a545023fefba724b18fbbad8bf87c32"
39
39
  }