diff --git a/demos/gallery/.vscode/tasks.json b/demos/gallery/.vscode/tasks.json index e734416fad..120545d06c 100644 --- a/demos/gallery/.vscode/tasks.json +++ b/demos/gallery/.vscode/tasks.json @@ -1,15 +1,36 @@ { "version": "2.0.0", "tasks": [ + { + "label": "gen-types-watch", + "type": "npm", + "script": "gen-types-watch", + "problemMatcher": [ + "$tsc-watch" + ], + "presentation": { + "group": "group-build" + } + }, + { + "label": "bundle-watch", + "type": "npm", + "script": "bundle-watch", + "problemMatcher": [], + "presentation": { + "group": "group-build" + } + }, { "label": "build", - "type": "shell", - "command": "npm run dev", + "dependsOn": [ + "gen-types-watch", + "bundle-watch", + ], "group": { "kind": "build", "isDefault": true - }, - "problemMatcher": [] + } } ] } \ No newline at end of file diff --git a/demos/gallery/index.html b/demos/gallery/index.html index f3cfe7cec9..ce8863467b 100644 --- a/demos/gallery/index.html +++ b/demos/gallery/index.html @@ -11,7 +11,12 @@
- + \ No newline at end of file diff --git a/demos/gallery/package.json b/demos/gallery/package.json index b1cc5a25e4..c04e21e658 100644 --- a/demos/gallery/package.json +++ b/demos/gallery/package.json @@ -4,12 +4,15 @@ "version": "0.0.0", "type": "module", "scripts": { - "clean": "rimraf --glob types dist *.tsbuildinfo", + "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", + "bundle": "vite build", + "bundle-watch": "vite", + "gen-types": "tsc --project tsconfig.json", + "gen-types-watch": "npm run gen-types -- --watch", + "build": "run-p gen-types bundle", "lint": "eslint ./src", - "dev": "vite", - "preview": "vite preview", + "lint-fix": "eslint --fix src/**/*.ts", "gen-filejson": "node ./util/dir2json ./samples", - "build": "npm run gen-filejson", "update": "npx --yes npm-check-updates -u -t minor" }, "dependencies": { @@ -17,7 +20,9 @@ "@fluentui/react-hooks": "8.8.16", "@fluentui/react-icons-mdl2": "1.3.80", "@fluentui/react-nav-preview": "0.10.1", - "d3-random": "3" + "d3-random": "3", + "@hpcc-js/composite": "3.1.1", + "@hpcc-js/map": "3.1.1" }, "devDependencies": { "@types/react": "18.3.12", @@ -26,5 +31,9 @@ "react": "18.3.1", "react-dom": "18.3.1", "vite": "5.4.11" + }, + "peerDependencies": { + "react": "18.3.1", + "react-dom": "18.3.1" } } \ No newline at end of file diff --git a/demos/gallery/samples/samples.json b/demos/gallery/samples/samples.json index 39d68aff9f..b4559fbb98 100644 --- a/demos/gallery/samples/samples.json +++ b/demos/gallery/samples/samples.json @@ -299,6 +299,27 @@ } ] }, + { + "path": "./samples/chart/dataMeta", + "name": "dataMeta", + "type": "folder", + "children": [ + { + "path": "./samples/chart/dataMeta/PieColumn.js", + "name": "PieColumn.js", + "type": "file", + "imports": { + "@hpcc-js/chart": [ + "Column", + "Pie" + ], + "@hpcc-js/layout": [ + "FlexGrid" + ] + } + } + ] + }, { "path": "./samples/chart/Gantt", "name": "Gantt", @@ -681,27 +702,6 @@ "SummaryC" ] } - }, - { - "path": "./samples/chart/dataMeta", - "name": "dataMeta", - "type": "folder", - "children": [ - { - "path": "./samples/chart/dataMeta/PieColumn.js", - "name": "PieColumn.js", - "type": "file", - "imports": { - "@hpcc-js/chart": [ - "Column", - "Pie" - ], - "@hpcc-js/layout": [ - "FlexGrid" - ] - } - } - ] } ] }, @@ -901,22 +901,22 @@ } }, { - "path": "./samples/common/SVGWidget.js", - "name": "SVGWidget.js", + "path": "./samples/common/Shape.js", + "name": "Shape.js", "type": "file", "imports": { "@hpcc-js/common": [ - "SVGWidget" + "Shape" ] } }, { - "path": "./samples/common/Shape.js", - "name": "Shape.js", + "path": "./samples/common/SVGWidget.js", + "name": "SVGWidget.js", "type": "file", "imports": { "@hpcc-js/common": [ - "Shape" + "SVGWidget" ] } }, diff --git a/demos/gallery/src/App.tsx b/demos/gallery/src/App.tsx index 4305fb4043..af01fe48c2 100644 --- a/demos/gallery/src/App.tsx +++ b/demos/gallery/src/App.tsx @@ -3,8 +3,8 @@ import { DrawerProps, makeStyles, tokens } from "@fluentui/react-components"; import { useConst } from "@fluentui/react-hooks"; import { NavDrawer, NavDrawerBody, NavDrawerHeader } from "@fluentui/react-nav-preview"; import { JSEditor } from "@hpcc-js/codemirror"; -import { AutosizeHpccJSComponent } from "./HpccJSAdapter"; -import { Samples } from "./Samples"; +import { AutosizeHpccJSComponent } from "./HpccJSAdapter.tsx"; +import { Samples } from "./Samples.tsx"; function useLocationSearch() { const [search, setSearch] = React.useState(window.location.search); diff --git a/demos/gallery/src/index.tsx b/demos/gallery/src/index.tsx new file mode 100644 index 0000000000..cae57daa00 --- /dev/null +++ b/demos/gallery/src/index.tsx @@ -0,0 +1,14 @@ +import React, { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import { FluentProvider, webLightTheme } from "@fluentui/react-components"; +import { App } from "./App.tsx"; + +export function main() { + createRoot(document.getElementById("root")!).render( + + + + + + ); +} diff --git a/demos/gallery/src/main.tsx b/demos/gallery/src/main.tsx deleted file mode 100644 index 3d2d16566d..0000000000 --- a/demos/gallery/src/main.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { StrictMode } from "react"; -import { createRoot } from "react-dom/client"; -import { FluentProvider, webLightTheme } from "@fluentui/react-components"; -import { App } from "./App.tsx"; - -import "@hpcc-js/common/font-awesome/css/font-awesome.min.css"; - -createRoot(document.getElementById("root")!).render( - - - - - -); diff --git a/demos/gallery/tsconfig.json b/demos/gallery/tsconfig.json index 7b89992693..86f3d32424 100644 --- a/demos/gallery/tsconfig.json +++ b/demos/gallery/tsconfig.json @@ -7,6 +7,7 @@ "emitDeclarationOnly": true, "declaration": true, "declarationDir": "types", + "jsx": "react", "strict": false, "noImplicitAny": false, "noImplicitThis": false, diff --git a/demos/gallery/vite.config.ts b/demos/gallery/vite.config.ts new file mode 100644 index 0000000000..54448997c8 --- /dev/null +++ b/demos/gallery/vite.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from "vite"; +import { resolve } from "path"; +import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"; +import { hpccBundleNames } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +const { alias, external, globals } = hpccBundleNames(pkg); + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, "src/index.tsx"), + name: pkg.name, + fileName: "index", + }, + rollupOptions: { + external, + output: { + globals, + }, + }, + sourcemap: true + }, + resolve: { + alias + }, + esbuild: { + minifyIdentifiers: false + }, + plugins: [ + cssInjectedByJsPlugin() + ], +}); diff --git a/package-lock.json b/package-lock.json index 283723ab07..734e175e1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,10 @@ "npm-run-all": "4.1.5", "playwright": "1.49.0", "rimraf": "5.0.10", - "typescript": "5.6.3", + "typescript": "5.7.2", + "vite": "5.4.11", + "vite-plugin-css-injected-by-js": "3.5.2", + "vite-plugin-static-copy": "2.1.0", "vitest": "2.1.5" } }, @@ -43,6 +46,10 @@ "react": "18.3.1", "react-dom": "18.3.1", "vite": "5.4.11" + }, + "peerDependencies": { + "react": "18.3.1", + "react-dom": "18.3.1" } }, "demos/imdb": { @@ -101,6 +108,173 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/compat-data": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-string-parser": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", @@ -121,6 +295,30 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-validator-option": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/parser": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", @@ -137,6 +335,58 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.9.tgz", + "integrity": "sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-jsx": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-development": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.25.9.tgz", + "integrity": "sha512-9mj6rm7XVYs4mdLIpbZnHOYdpW42uoiBCTVowg7sP1thUOiANgMb4UtpRivR0pp5iL+ocvUv7X4mZgFRpJEzGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-transform-react-jsx": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/runtime": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", @@ -149,6 +399,50 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/template": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", @@ -238,26 +532,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@dagrejs/dagre": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@dagrejs/dagre/-/dagre-1.1.4.tgz", - "integrity": "sha512-QUTc54Cg/wvmlEUxB+uvoPVKFazM1H18kVHBQNmK2NbrDR5ihOCR6CXLnDSZzMcSQKJtabPUWridBOlJM3WkDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@dagrejs/graphlib": "2.2.4" - } - }, - "node_modules/@dagrejs/graphlib": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@dagrejs/graphlib/-/graphlib-2.2.4.tgz", - "integrity": "sha512-mepCf/e9+SKYy1d02/UkvSy6+6MoyXhVxP8lLDfA7BPE1X1d4dR0sZznmbM8/XVJ1GPM+Svnx7Xj6ZweByWUkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">17.0.0" - } - }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -4922,6 +5196,138 @@ "dev": true, "license": "MIT" }, + "node_modules/@preact/preset-vite": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.9.1.tgz", + "integrity": "sha512-JecWzrOx7ogFhklSMhY+aH/24pajL0Vx+beEgau3WDMUUAo32cpUo/UqerPhLOyhCKXlxK9a3cRoa8g68ZAp5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/plugin-transform-react-jsx": "^7.22.15", + "@babel/plugin-transform-react-jsx-development": "^7.22.5", + "@prefresh/vite": "^2.4.1", + "@rollup/pluginutils": "^4.1.1", + "babel-plugin-transform-hook-names": "^1.0.2", + "debug": "^4.3.4", + "kolorist": "^1.8.0", + "magic-string": "0.30.5", + "node-html-parser": "^6.1.10", + "source-map": "^0.7.4", + "stack-trace": "^1.0.0-pre2" + }, + "peerDependencies": { + "@babel/core": "7.x", + "vite": "2.x || 3.x || 4.x || 5.x" + } + }, + "node_modules/@preact/preset-vite/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@preact/preset-vite/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@preact/preset-vite/node_modules/magic-string": { + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@preact/preset-vite/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@prefresh/babel-plugin": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@prefresh/babel-plugin/-/babel-plugin-0.5.1.tgz", + "integrity": "sha512-uG3jGEAysxWoyG3XkYfjYHgaySFrSsaEb4GagLzYaxlydbuREtaX+FTxuIidp241RaLl85XoHg9Ej6E4+V1pcg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@prefresh/core": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@prefresh/core/-/core-1.5.3.tgz", + "integrity": "sha512-nDzxj0tA1/M6APNAWqaxkZ+3sTdPHESa+gol4+Bw7rMc2btWdkLoNH7j9rGhUb8SThC0Vz0VoXtq+U+9azGLHg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "preact": "^10.0.0" + } + }, + "node_modules/@prefresh/utils": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@prefresh/utils/-/utils-1.2.0.tgz", + "integrity": "sha512-KtC/fZw+oqtwOLUFM9UtiitB0JsVX0zLKNyRTA332sqREqSALIIQQxdUCS1P3xR/jT1e2e8/5rwH6gdcMLEmsQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@prefresh/vite": { + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@prefresh/vite/-/vite-2.4.6.tgz", + "integrity": "sha512-miYbTl2J1YNaQJWyWHJzyIpNh7vKUuXC1qCDRzPeWjhQ+9bxeXkUBGDGd9I1f37R5GQYi1S65AN5oR0BR2WzvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.22.1", + "@prefresh/babel-plugin": "0.5.1", + "@prefresh/core": "^1.5.1", + "@prefresh/utils": "^1.2.0", + "@rollup/pluginutils": "^4.2.1" + }, + "peerDependencies": { + "preact": "^10.4.0", + "vite": ">=2.0.0" + } + }, + "node_modules/@prefresh/vite/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@prefresh/vite/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, "node_modules/@rodrigoff/ajv-cli": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@rodrigoff/ajv-cli/-/ajv-cli-5.2.0.tgz", @@ -6129,6 +6535,13 @@ "@types/d3-selection": "^1" } }, + "node_modules/@types/dagre": { + "version": "0.7.52", + "resolved": "https://registry.npmjs.org/@types/dagre/-/dagre-0.7.52.tgz", + "integrity": "sha512-XKJdy+OClLk3hketHi9Qg6gTfe1F3y+UFnHxKA2rn9Dw+oXa4Gb378Ztz9HlMgZKSxpPmn4BNVh9wgkpvrK1uw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/dojo": { "version": "1.9.48", "resolved": "https://registry.npmjs.org/@types/dojo/-/dojo-1.9.48.tgz", @@ -7244,6 +7657,20 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/apache-arrow": { "version": "17.0.0", "resolved": "https://registry.npmjs.org/apache-arrow/-/apache-arrow-17.0.0.tgz", @@ -7469,6 +7896,16 @@ "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", "license": "Apache-2.0" }, + "node_modules/babel-plugin-transform-hook-names": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-hook-names/-/babel-plugin-transform-hook-names-1.0.2.tgz", + "integrity": "sha512-5gafyjyyBTTdX/tQQ0hRgu4AhNHG/hqWi0ZZmg2xvs2FgRkJXzDNKBZCyoYqgFkovfDrgM8OoKg8karoUvWeCw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@babel/core": "^7.12.10" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -7545,6 +7982,19 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -7557,6 +8007,13 @@ "readable-stream": "^3.4.0" } }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true, + "license": "ISC" + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -7882,6 +8339,44 @@ "node": ">= 16" } }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -8432,6 +8927,13 @@ "resolved": "https://registry.npmjs.org/convert-hex/-/convert-hex-0.1.0.tgz", "integrity": "sha512-w20BOb1PiR/sEJdS6wNrUjF5CSfscZFUp7R9NSlXH8h2wynzXVEPFPJECAnkNylZ+cvf3p7TyRUHggDmrwXT9A==" }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, "node_modules/convert-string": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/convert-string/-/convert-string-0.1.0.tgz", @@ -8503,6 +9005,23 @@ "license": "ISC", "peer": true }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, "node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", @@ -8516,6 +9035,19 @@ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" } }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -9042,6 +9574,17 @@ "d3-transition": "^1.3.2" } }, + "node_modules/dagre": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/dagre/-/dagre-0.8.5.tgz", + "integrity": "sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graphlib": "^2.1.8", + "lodash": "^4.17.15" + } + }, "node_modules/dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -9605,6 +10148,65 @@ "csstype": "^3.0.2" } }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -11076,6 +11678,16 @@ "resolved": "demos/gallery", "link": true }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -11497,6 +12109,16 @@ "dev": true, "license": "MIT" }, + "node_modules/graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.15" + } + }, "node_modules/graphql": { "version": "16.9.0", "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz", @@ -12141,6 +12763,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -12945,6 +13580,19 @@ "node": ">=18" } }, + "node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/json-bignum": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz", @@ -13188,6 +13836,13 @@ "node": ">=0.10.0" } }, + "node_modules/kolorist": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", + "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", + "dev": true, + "license": "MIT" + }, "node_modules/leaflet": { "version": "1.9.4", "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", @@ -14722,6 +15377,17 @@ "node": "^16.13.0 || >=18.0.0" } }, + "node_modules/node-html-parser": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz", + "integrity": "sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "css-select": "^5.1.0", + "he": "1.2.0" + } + }, "node_modules/node-machine-id": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/node-machine-id/-/node-machine-id-1.1.12.tgz", @@ -14777,6 +15443,16 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/npm-bundled": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.1.tgz", @@ -15019,6 +15695,19 @@ "node": ">=8" } }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, "node_modules/nx": { "version": "20.1.2", "resolved": "https://registry.npmjs.org/nx/-/nx-20.1.2.tgz", @@ -16492,6 +17181,19 @@ "node": ">= 6" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/rechoir": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", @@ -17490,6 +18192,16 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/stack-trace": { + "version": "1.0.0-pre2", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-1.0.0-pre2.tgz", + "integrity": "sha512-2ztBJRek8IVofG9DBJqdy2N5kulaacX30Nz7xmkYF6ale9WBVmIy6mFBchvGX7Vx/MyjBhx+Rcxqrj+dbOnQ6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -18944,9 +19656,9 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "license": "Apache-2.0", "bin": { @@ -19414,6 +20126,35 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-plugin-css-injected-by-js": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/vite-plugin-css-injected-by-js/-/vite-plugin-css-injected-by-js-3.5.2.tgz", + "integrity": "sha512-2MpU/Y+SCZyWUB6ua3HbJCrgnF0KACAsmzOQt1UvRVJCGF6S8xdA3ZUhWcWdM9ivG4I5az8PnQmwwrkC2CAQrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "vite": ">2.0.0-0" + } + }, + "node_modules/vite-plugin-static-copy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vite-plugin-static-copy/-/vite-plugin-static-copy-2.1.0.tgz", + "integrity": "sha512-n8lEOIVM00Y/zronm0RG8RdPyFd0SAAFR0sii3NWmgG3PSCyYMsvUNRQTlb3onp1XeMrKIDwCrPGxthKvqX9OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.3", + "fast-glob": "^3.2.11", + "fs-extra": "^11.1.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0" + } + }, "node_modules/vite/node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -20470,7 +21211,8 @@ }, "devDependencies": { "@hpcc-js/esbuild-plugins": "^1.3.0", - "@hpcc-js/preact-shim": "^3.0.0", + "@preact/preset-vite": "2.9.1", + "preact": "10.24.3", "react-data-grid": "7.0.0-beta.47" } }, @@ -20946,17 +21688,18 @@ "@hpcc-js/util": "^3.2.0" }, "devDependencies": { - "@dagrejs/dagre": "1.1.4", "@hpcc-js/esbuild-plugins": "^1.3.0", "@hpcc-js/wasm-graphviz": "1.6.1", "@types/d3-transition": "1.3.6", + "@types/dagre": "0.7.52", "d3-force": "^1", "d3-geo": "^1", "d3-interpolate-path": "2.3.0", "d3-sankey": "^0", "d3-shape": "^1", "d3-tile": "^1", - "d3-transition": "^1" + "d3-transition": "^1", + "dagre": "0.8.5" } }, "packages/html": { diff --git a/package.json b/package.json index e8fe2e763e..0a6f577479 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,10 @@ "npm-run-all": "4.1.5", "playwright": "1.49.0", "rimraf": "5.0.10", - "typescript": "5.6.3", + "typescript": "5.7.2", + "vite": "5.4.11", + "vite-plugin-css-injected-by-js": "3.5.2", + "vite-plugin-static-copy": "2.1.0", "vitest": "2.1.5" }, "overrides": { diff --git a/packages/api/.vscode/launch.json b/packages/api/.vscode/launch.json index 3ee32e4122..f41798cc0a 100644 --- a/packages/api/.vscode/launch.json +++ b/packages/api/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "test-browser", "type": "msedge", "request": "launch", - "url": "http://localhost:8888", + "url": "http://localhost:63315", "webRoot": "${workspaceFolder}", "outFiles": [ "${workspaceFolder}/**/*.js", @@ -28,6 +28,34 @@ "${workspaceFolder}/**/*.js", "!**/node_modules/**" ], + }, + { + "name": "index.html", + "request": "launch", + "type": "msedge", + "url": "http://localhost:5173/index.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] + }, + { + "name": "index-preview.html", + "request": "launch", + "type": "msedge", + "url": "file://${workspaceFolder}/index-preview.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] } ] } \ No newline at end of file diff --git a/packages/api/package.json b/packages/api/package.json index 298ddf6933..902b8fea79 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -3,15 +3,17 @@ "version": "3.2.0", "description": "hpcc-js - Viz api", "type": "module", + "main": "./dist/index.umd.cjs", + "module": "./dist/index.js", "exports": { ".": { "types": "./types/index.d.ts", - "default": "./dist/index.js" + "import": "./dist/index.js", + "require": "./dist/index.umd.cjs" }, "./dist/*": "./dist/*" }, - "module": "./dist/index.js", - "browser": "./dist/index.js", + "browser": "./dist/index.umd.cjs", "types": "./types/index.d.ts", "files": [ "dist/*", @@ -20,8 +22,8 @@ ], "scripts": { "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", - "bundle": "node esbuild.js", - "bundle-watch": "npm run bundle -- --development --watch", + "bundle": "vite build", + "bundle-watch": "vite", "gen-types": "tsc --project tsconfig.json", "gen-types-watch": "npm run gen-types -- --watch", "build": "run-p gen-types bundle", @@ -31,7 +33,8 @@ "test-browser": "vitest run --project browser", "test": "vitest run", "coverage": "vitest run --coverage", - "update": "npx -y npm-check-updates -u -t minor" + "update": "npx --yes npm-check-updates -u -t minor", + "update-major": "npx --yes npm-check-updates -u" }, "dependencies": { "@hpcc-js/common": "^3.2.0" diff --git a/packages/api/tsconfig.json b/packages/api/tsconfig.json index 318ecdd23e..d0b91b3df7 100644 --- a/packages/api/tsconfig.json +++ b/packages/api/tsconfig.json @@ -10,6 +10,7 @@ "strict": true, "noImplicitAny": false, "strictNullChecks": false, + "isolatedModules": true, "skipLibCheck": true, "allowImportingTsExtensions": true, "lib": [ diff --git a/packages/api/vite.config.ts b/packages/api/vite.config.ts new file mode 100644 index 0000000000..0c0d753250 --- /dev/null +++ b/packages/api/vite.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from "vite"; +import { resolve } from "path"; +import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"; +import { hpccBundleNames } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +const { alias, external, globals } = hpccBundleNames(pkg); + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, "src/index.ts"), + name: pkg.name, + fileName: "index", + }, + rollupOptions: { + external, + output: { + globals, + }, + }, + sourcemap: true + }, + resolve: { + alias + }, + esbuild: { + minifyIdentifiers: false + }, + plugins: [ + cssInjectedByJsPlugin() + ], +}); diff --git a/packages/api/vitest.workspace.ts b/packages/api/vitest.workspace.ts index fa7bb0720b..722950dd03 100644 --- a/packages/api/vitest.workspace.ts +++ b/packages/api/vitest.workspace.ts @@ -1,6 +1,6 @@ -import { defineWorkspace } from 'vitest/config'; -import baseWorkspace from '../../vitest.workspace.ts'; +import { defineWorkspace } from "vitest/config"; +import baseWorkspace from "../../vitest.workspace.ts"; export default defineWorkspace([ ...baseWorkspace -]) \ No newline at end of file +]); \ No newline at end of file diff --git a/packages/chart/.vscode/launch.json b/packages/chart/.vscode/launch.json index 7c2436335f..6bb554878b 100644 --- a/packages/chart/.vscode/launch.json +++ b/packages/chart/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "test-browser", "type": "msedge", "request": "launch", - "url": "http://localhost:8888", + "url": "http://localhost:63315", "webRoot": "${workspaceFolder}", "outFiles": [ "${workspaceFolder}/**/*.js", @@ -33,7 +33,21 @@ "name": "index.html", "request": "launch", "type": "msedge", - "url": "file:///${workspaceFolder}/index.html", + "url": "http://localhost:5500/index.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] + }, + { + "name": "index-preview.html", + "request": "launch", + "type": "msedge", + "url": "file://${workspaceFolder}/index-preview.html", "runtimeArgs": [ "--disable-web-security" ], diff --git a/packages/chart/index-preview.html b/packages/chart/index-preview.html new file mode 100644 index 0000000000..778584f12d --- /dev/null +++ b/packages/chart/index-preview.html @@ -0,0 +1,97 @@ + + + + + Home + + + + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/chart/index.html b/packages/chart/index.html index 6f902b3894..4464af916e 100644 --- a/packages/chart/index.html +++ b/packages/chart/index.html @@ -23,21 +23,8 @@ margin-top: 20px; } - - - + + diff --git a/packages/chart/package.json b/packages/chart/package.json index 3f75cf0809..c6fd3e5740 100644 --- a/packages/chart/package.json +++ b/packages/chart/package.json @@ -3,26 +3,27 @@ "version": "3.2.0", "description": "hpcc-js - Viz Chart", "type": "module", + "main": "./dist/index.umd.cjs", + "module": "./dist/index.js", "exports": { ".": { "types": "./types/index.d.ts", - "default": "./dist/index.js" + "import": "./dist/index.js", + "require": "./dist/index.umd.cjs" }, "./dist/*": "./dist/*" }, - "module": "./dist/index.js", - "browser": "./dist/index.js", + "browser": "./dist/index.umd.cjs", "types": "./types/index.d.ts", "files": [ "dist/*", "src/*", - "types/*", - "font-awesome/**/*" + "types/*" ], "scripts": { "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", - "bundle": "node esbuild.js", - "bundle-watch": "npm run bundle -- --development --watch", + "bundle": "vite build", + "bundle-watch": "vite --port 5500", "gen-types": "tsc --project tsconfig.json", "gen-types-watch": "npm run gen-types -- --watch", "build": "run-p gen-types bundle", diff --git a/packages/chart/tsconfig.json b/packages/chart/tsconfig.json index 3cd3be3a69..22c2fb9695 100644 --- a/packages/chart/tsconfig.json +++ b/packages/chart/tsconfig.json @@ -11,6 +11,7 @@ "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, + "isolatedModules": true, "skipLibCheck": true, "allowImportingTsExtensions": true, "lib": [ diff --git a/packages/chart/vite.config.ts b/packages/chart/vite.config.ts new file mode 100644 index 0000000000..0c0d753250 --- /dev/null +++ b/packages/chart/vite.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from "vite"; +import { resolve } from "path"; +import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"; +import { hpccBundleNames } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +const { alias, external, globals } = hpccBundleNames(pkg); + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, "src/index.ts"), + name: pkg.name, + fileName: "index", + }, + rollupOptions: { + external, + output: { + globals, + }, + }, + sourcemap: true + }, + resolve: { + alias + }, + esbuild: { + minifyIdentifiers: false + }, + plugins: [ + cssInjectedByJsPlugin() + ], +}); diff --git a/packages/chart/vitest.workspace.ts b/packages/chart/vitest.workspace.ts index fa7bb0720b..722950dd03 100644 --- a/packages/chart/vitest.workspace.ts +++ b/packages/chart/vitest.workspace.ts @@ -1,6 +1,6 @@ -import { defineWorkspace } from 'vitest/config'; -import baseWorkspace from '../../vitest.workspace.ts'; +import { defineWorkspace } from "vitest/config"; +import baseWorkspace from "../../vitest.workspace.ts"; export default defineWorkspace([ ...baseWorkspace -]) \ No newline at end of file +]); \ No newline at end of file diff --git a/packages/codemirror/.vscode/launch.json b/packages/codemirror/.vscode/launch.json index 967172fec7..08c38b6a06 100644 --- a/packages/codemirror/.vscode/launch.json +++ b/packages/codemirror/.vscode/launch.json @@ -33,7 +33,21 @@ "name": "index.html", "request": "launch", "type": "msedge", - "url": "file:///${workspaceFolder}/index.html", + "url": "http://localhost:5501/index.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] + }, + { + "name": "index-preview.html", + "request": "launch", + "type": "msedge", + "url": "file://${workspaceFolder}/index-preview.html", "runtimeArgs": [ "--disable-web-security" ], diff --git a/packages/codemirror/index-preview.html b/packages/codemirror/index-preview.html new file mode 100644 index 0000000000..54f3b7f7db --- /dev/null +++ b/packages/codemirror/index-preview.html @@ -0,0 +1,85 @@ + + + + + Home + + + + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/codemirror/index.html b/packages/codemirror/index.html index a990e85ef4..bcf87546d6 100644 --- a/packages/codemirror/index.html +++ b/packages/codemirror/index.html @@ -25,35 +25,41 @@ - - -

ESM Quick Test

+ + + +

ESM Quick Test

+
+ + + + \ No newline at end of file diff --git a/packages/common/index.html b/packages/common/index.html index a4cc12208e..6eb04986a3 100644 --- a/packages/common/index.html +++ b/packages/common/index.html @@ -23,26 +23,13 @@ margin-top: 20px; } - - -

ESM Quick Test

- - - - - - + Home + + + -
- + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/composite/index.html b/packages/composite/index.html index cecdb20587..810ce3087b 100644 --- a/packages/composite/index.html +++ b/packages/composite/index.html @@ -16,38 +16,21 @@ margin-top: 50px; } - #placeholder { + #placeholder, + #placeholder2 { width: 100%; height: 500px; background-color: #fff; margin-top: 20px; } - - -

ESM Quick Test

+ + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/ddl-shim/index.html b/packages/ddl-shim/index.html new file mode 100644 index 0000000000..f75c0aec4f --- /dev/null +++ b/packages/ddl-shim/index.html @@ -0,0 +1,43 @@ + + + + + Home + + + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/ddl-shim/package.json b/packages/ddl-shim/package.json index 55f084ce07..b2199e86d2 100644 --- a/packages/ddl-shim/package.json +++ b/packages/ddl-shim/package.json @@ -3,15 +3,17 @@ "version": "3.0.0", "description": "hpcc-js DDL parser", "type": "module", + "main": "./dist/index.umd.cjs", + "module": "./dist/index.js", "exports": { ".": { "types": "./types/index.d.ts", - "default": "./dist/index.js" + "import": "./dist/index.js", + "require": "./dist/index.umd.cjs" }, "./dist/*": "./dist/*" }, - "module": "./dist/index.js", - "browser": "./dist/index.js", + "browser": "./dist/index.umd.cjs", "types": "./types/index.d.ts", "files": [ "dist/*", @@ -24,8 +26,8 @@ "generate-v1": "ts-json-schema-generator --tsconfig tsconfig-schema.json --type DDLSchema > ./schema/v1.json", "generate-v2": "ts-json-schema-generator --tsconfig tsconfig-schema.json --type Schema > ./schema/v2.json", "generate": "run-p generate-v1 generate-v2", - "bundle": "node esbuild.js", - "bundle-watch": "npm run bundle -- --development --watch", + "bundle": "vite build", + "bundle-watch": "vite", "gen-types": "tsc --project tsconfig.json", "gen-types-watch": "npm run gen-types -- --watch", "build": "npm-run-all --serial generate --parallel gen-types bundle", diff --git a/packages/ddl-shim/tsconfig.json b/packages/ddl-shim/tsconfig.json index 3cd3be3a69..22c2fb9695 100644 --- a/packages/ddl-shim/tsconfig.json +++ b/packages/ddl-shim/tsconfig.json @@ -11,6 +11,7 @@ "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, + "isolatedModules": true, "skipLibCheck": true, "allowImportingTsExtensions": true, "lib": [ diff --git a/packages/ddl-shim/vite.config.ts b/packages/ddl-shim/vite.config.ts new file mode 100644 index 0000000000..0c0d753250 --- /dev/null +++ b/packages/ddl-shim/vite.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from "vite"; +import { resolve } from "path"; +import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"; +import { hpccBundleNames } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +const { alias, external, globals } = hpccBundleNames(pkg); + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, "src/index.ts"), + name: pkg.name, + fileName: "index", + }, + rollupOptions: { + external, + output: { + globals, + }, + }, + sourcemap: true + }, + resolve: { + alias + }, + esbuild: { + minifyIdentifiers: false + }, + plugins: [ + cssInjectedByJsPlugin() + ], +}); diff --git a/packages/ddl-shim/vitest.workspace.ts b/packages/ddl-shim/vitest.workspace.ts index fa7bb0720b..722950dd03 100644 --- a/packages/ddl-shim/vitest.workspace.ts +++ b/packages/ddl-shim/vitest.workspace.ts @@ -1,6 +1,6 @@ -import { defineWorkspace } from 'vitest/config'; -import baseWorkspace from '../../vitest.workspace.ts'; +import { defineWorkspace } from "vitest/config"; +import baseWorkspace from "../../vitest.workspace.ts"; export default defineWorkspace([ ...baseWorkspace -]) \ No newline at end of file +]); \ No newline at end of file diff --git a/packages/dgrid/.vscode/launch.json b/packages/dgrid/.vscode/launch.json index 7c2436335f..c5cfcf1c82 100644 --- a/packages/dgrid/.vscode/launch.json +++ b/packages/dgrid/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "test-browser", "type": "msedge", "request": "launch", - "url": "http://localhost:8888", + "url": "http://localhost:63315", "webRoot": "${workspaceFolder}", "outFiles": [ "${workspaceFolder}/**/*.js", @@ -33,7 +33,21 @@ "name": "index.html", "request": "launch", "type": "msedge", - "url": "file:///${workspaceFolder}/index.html", + "url": "http://localhost:5506/index.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] + }, + { + "name": "index-preview.html", + "request": "launch", + "type": "msedge", + "url": "file://${workspaceFolder}/index-preview.html", "runtimeArgs": [ "--disable-web-security" ], diff --git a/packages/dgrid/index-preview.html b/packages/dgrid/index-preview.html new file mode 100644 index 0000000000..46b46ac818 --- /dev/null +++ b/packages/dgrid/index-preview.html @@ -0,0 +1,83 @@ + + + + + Home + + + + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/dgrid/index.html b/packages/dgrid/index.html index 1807e680fd..1ffc41f3cc 100644 --- a/packages/dgrid/index.html +++ b/packages/dgrid/index.html @@ -25,27 +25,13 @@ - - -

ESM Quick Test

+ + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/dgrid2/index.html b/packages/dgrid2/index.html index 3d9a327465..7b30996ed7 100644 --- a/packages/dgrid2/index.html +++ b/packages/dgrid2/index.html @@ -23,29 +23,13 @@ margin-top: 20px; } - - -

ESM Quick Test

+ + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/eclwatch/index.html b/packages/eclwatch/index.html index 86775a961c..10baeaa82f 100644 --- a/packages/eclwatch/index.html +++ b/packages/eclwatch/index.html @@ -23,81 +23,24 @@ margin-top: 20px; } - - +

ESM Quick Test

+ + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/form/index.html b/packages/form/index.html index 6f902b3894..e753f459be 100644 --- a/packages/form/index.html +++ b/packages/form/index.html @@ -23,67 +23,88 @@ margin-top: 20px; } - - - +

ESM Quick Test

diff --git a/packages/form/package.json b/packages/form/package.json index e79655596c..4c6056a7f8 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -3,26 +3,27 @@ "version": "3.1.0", "description": "hpcc-js - Viz Form", "type": "module", + "main": "./dist/index.umd.cjs", + "module": "./dist/index.js", "exports": { ".": { "types": "./types/index.d.ts", - "default": "./dist/index.js" + "import": "./dist/index.js", + "require": "./dist/index.umd.cjs" }, "./dist/*": "./dist/*" }, - "module": "./dist/index.js", - "browser": "./dist/index.js", + "browser": "./dist/index.umd.cjs", "types": "./types/index.d.ts", "files": [ "dist/*", "src/*", - "types/*", - "font-awesome/**/*" + "types/*" ], "scripts": { "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", - "bundle": "node esbuild.js", - "bundle-watch": "npm run bundle -- --development --watch", + "bundle": "vite build", + "bundle-watch": "vite --port 5508", "gen-types": "tsc --project tsconfig.json", "gen-types-watch": "npm run gen-types -- --watch", "build": "run-p gen-types bundle", diff --git a/packages/form/tsconfig.json b/packages/form/tsconfig.json index 3cd3be3a69..22c2fb9695 100644 --- a/packages/form/tsconfig.json +++ b/packages/form/tsconfig.json @@ -11,6 +11,7 @@ "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, + "isolatedModules": true, "skipLibCheck": true, "allowImportingTsExtensions": true, "lib": [ diff --git a/packages/form/vite.config.ts b/packages/form/vite.config.ts new file mode 100644 index 0000000000..0c0d753250 --- /dev/null +++ b/packages/form/vite.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from "vite"; +import { resolve } from "path"; +import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"; +import { hpccBundleNames } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +const { alias, external, globals } = hpccBundleNames(pkg); + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, "src/index.ts"), + name: pkg.name, + fileName: "index", + }, + rollupOptions: { + external, + output: { + globals, + }, + }, + sourcemap: true + }, + resolve: { + alias + }, + esbuild: { + minifyIdentifiers: false + }, + plugins: [ + cssInjectedByJsPlugin() + ], +}); diff --git a/packages/form/vitest.workspace.ts b/packages/form/vitest.workspace.ts index fa7bb0720b..722950dd03 100644 --- a/packages/form/vitest.workspace.ts +++ b/packages/form/vitest.workspace.ts @@ -1,6 +1,6 @@ -import { defineWorkspace } from 'vitest/config'; -import baseWorkspace from '../../vitest.workspace.ts'; +import { defineWorkspace } from "vitest/config"; +import baseWorkspace from "../../vitest.workspace.ts"; export default defineWorkspace([ ...baseWorkspace -]) \ No newline at end of file +]); \ No newline at end of file diff --git a/packages/graph/.vscode/launch.json b/packages/graph/.vscode/launch.json index 7c2436335f..811343de27 100644 --- a/packages/graph/.vscode/launch.json +++ b/packages/graph/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "test-browser", "type": "msedge", "request": "launch", - "url": "http://localhost:8888", + "url": "http://localhost:63315", "webRoot": "${workspaceFolder}", "outFiles": [ "${workspaceFolder}/**/*.js", @@ -33,7 +33,21 @@ "name": "index.html", "request": "launch", "type": "msedge", - "url": "file:///${workspaceFolder}/index.html", + "url": "http://localhost:5509/index.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] + }, + { + "name": "index-preview.html", + "request": "launch", + "type": "msedge", + "url": "file://${workspaceFolder}/index-preview.html", "runtimeArgs": [ "--disable-web-security" ], diff --git a/packages/graph/index-preview.html b/packages/graph/index-preview.html new file mode 100644 index 0000000000..cfbe3691d9 --- /dev/null +++ b/packages/graph/index-preview.html @@ -0,0 +1,144 @@ + + + + + Home + + + + + + + + + +

ESM Quick Test

+
+ +
+ + + + + \ No newline at end of file diff --git a/packages/graph/index.html b/packages/graph/index.html index 09b31d5b6e..6e2052755c 100644 --- a/packages/graph/index.html +++ b/packages/graph/index.html @@ -26,68 +26,16 @@ - - - - - -

ESM Quick Test

-
-
+
+ + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/html/index.html b/packages/html/index.html index 5342205e5b..b8d5167ed4 100644 --- a/packages/html/index.html +++ b/packages/html/index.html @@ -23,51 +23,41 @@ margin-top: 20px; } - - -

ESM Quick Test

+ + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/layout/index.html b/packages/layout/index.html index a76ccdd0a4..861e5cadca 100644 --- a/packages/layout/index.html +++ b/packages/layout/index.html @@ -23,27 +23,6 @@ margin-top: 20px; } - - @@ -51,12 +30,9 @@

ESM Quick Test

+ + + + +

ESM Quick Test

+
+ +
+ + + + + \ No newline at end of file diff --git a/packages/map/index.html b/packages/map/index.html index 799f119cc8..f3afc9a038 100644 --- a/packages/map/index.html +++ b/packages/map/index.html @@ -24,37 +24,13 @@ margin-top: 20px; } - -

ESM Quick Test

+ + + +
+ + + + \ No newline at end of file diff --git a/packages/markdown-it-plugins/index.html b/packages/markdown-it-plugins/index.html index 67702d5c13..c6f1120706 100644 --- a/packages/markdown-it-plugins/index.html +++ b/packages/markdown-it-plugins/index.html @@ -21,30 +21,13 @@ height: 100%; } - -
+ + + +

ESM Quick Test

+
+ + + + \ No newline at end of file diff --git a/packages/observablehq-compiler/index.html b/packages/observablehq-compiler/index.html index ed07c93d27..ada145f2e7 100644 --- a/packages/observablehq-compiler/index.html +++ b/packages/observablehq-compiler/index.html @@ -23,21 +23,6 @@ margin-top: 20px; } - - - @@ -45,24 +30,24 @@

ESM Quick Test

+ + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/other/index.html b/packages/other/index.html index 826a71ddba..617dcc9e3a 100644 --- a/packages/other/index.html +++ b/packages/other/index.html @@ -23,43 +23,31 @@ margin-top: 20px; } - - -

ESM Quick Test

diff --git a/packages/other/package.json b/packages/other/package.json index 65716bb292..d0fc9a5e06 100644 --- a/packages/other/package.json +++ b/packages/other/package.json @@ -3,26 +3,27 @@ "version": "3.1.1", "description": "hpcc-js - Viz Other", "type": "module", + "main": "./dist/index.umd.cjs", + "module": "./dist/index.js", "exports": { ".": { "types": "./types/index.d.ts", - "default": "./dist/index.js" + "import": "./dist/index.js", + "require": "./dist/index.umd.cjs" }, "./dist/*": "./dist/*" }, - "module": "./dist/index.js", - "browser": "./dist/index.js", + "browser": "./dist/index.umd.cjs", "types": "./types/index.d.ts", "files": [ "dist/*", "src/*", - "types/*", - "font-awesome/**/*" + "types/*" ], "scripts": { "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", - "bundle": "node esbuild.js", - "bundle-watch": "npm run bundle -- --development --watch", + "bundle": "vite build", + "bundle-watch": "vite --port 5515", "gen-types": "tsc --project tsconfig.json", "gen-types-watch": "npm run gen-types -- --watch", "build": "run-p gen-types bundle", diff --git a/packages/other/tsconfig.json b/packages/other/tsconfig.json index 3cd3be3a69..22c2fb9695 100644 --- a/packages/other/tsconfig.json +++ b/packages/other/tsconfig.json @@ -11,6 +11,7 @@ "noImplicitAny": false, "noImplicitThis": false, "strictNullChecks": false, + "isolatedModules": true, "skipLibCheck": true, "allowImportingTsExtensions": true, "lib": [ diff --git a/packages/other/vite.config.ts b/packages/other/vite.config.ts new file mode 100644 index 0000000000..0c0d753250 --- /dev/null +++ b/packages/other/vite.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from "vite"; +import { resolve } from "path"; +import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"; +import { hpccBundleNames } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +const { alias, external, globals } = hpccBundleNames(pkg); + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, "src/index.ts"), + name: pkg.name, + fileName: "index", + }, + rollupOptions: { + external, + output: { + globals, + }, + }, + sourcemap: true + }, + resolve: { + alias + }, + esbuild: { + minifyIdentifiers: false + }, + plugins: [ + cssInjectedByJsPlugin() + ], +}); diff --git a/packages/other/vitest.workspace.ts b/packages/other/vitest.workspace.ts index fa7bb0720b..722950dd03 100644 --- a/packages/other/vitest.workspace.ts +++ b/packages/other/vitest.workspace.ts @@ -1,6 +1,6 @@ -import { defineWorkspace } from 'vitest/config'; -import baseWorkspace from '../../vitest.workspace.ts'; +import { defineWorkspace } from "vitest/config"; +import baseWorkspace from "../../vitest.workspace.ts"; export default defineWorkspace([ ...baseWorkspace -]) \ No newline at end of file +]); \ No newline at end of file diff --git a/packages/phosphor/.vscode/launch.json b/packages/phosphor/.vscode/launch.json index 967172fec7..5ef13781dc 100644 --- a/packages/phosphor/.vscode/launch.json +++ b/packages/phosphor/.vscode/launch.json @@ -33,7 +33,21 @@ "name": "index.html", "request": "launch", "type": "msedge", - "url": "file:///${workspaceFolder}/index.html", + "url": "http://localhost:5516/index.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] + }, + { + "name": "index-preview.html", + "request": "launch", + "type": "msedge", + "url": "file://${workspaceFolder}/index-preview.html", "runtimeArgs": [ "--disable-web-security" ], diff --git a/packages/phosphor/index-preview.html b/packages/phosphor/index-preview.html new file mode 100644 index 0000000000..27ab6db9a0 --- /dev/null +++ b/packages/phosphor/index-preview.html @@ -0,0 +1,88 @@ + + + + + Home + + + + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/phosphor/index.html b/packages/phosphor/index.html index 6c9780af58..24f28793a1 100644 --- a/packages/phosphor/index.html +++ b/packages/phosphor/index.html @@ -25,23 +25,6 @@ - - - - @@ -49,7 +32,7 @@

ESM Quick Test

+ + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/react/index.html b/packages/react/index.html index fef20f8fb6..41d2d0c992 100644 --- a/packages/react/index.html +++ b/packages/react/index.html @@ -23,31 +23,13 @@ margin-top: 20px; } - - -

ESM Quick Test

+ + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/timeline/index.html b/packages/timeline/index.html index 325730588d..d70e585017 100644 --- a/packages/timeline/index.html +++ b/packages/timeline/index.html @@ -23,54 +23,32 @@ margin-top: 20px; } - -

ESM Quick Test

+ + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/tree/index.html b/packages/tree/index.html index 81b8836953..862d0d5411 100644 --- a/packages/tree/index.html +++ b/packages/tree/index.html @@ -23,28 +23,13 @@ margin-top: 20px; } - - -

ESM Quick Test