@lobb-js/studio 0.28.2 → 0.28.4

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 (40) hide show
  1. package/dist/actions.js +50 -137
  2. package/dist/components/dataTable/footer.svelte.d.ts +1 -1
  3. package/dist/components/dataTable/header.svelte.d.ts +1 -1
  4. package/dist/components/dataTable/utils.js +25 -29
  5. package/dist/components/detailView/utils.js +19 -21
  6. package/dist/components/landing.svelte.d.ts +1 -1
  7. package/dist/components/routes/data_model/utils.js +19 -23
  8. package/dist/components/ui/accordion/index.d.ts +1 -1
  9. package/dist/components/ui/accordion/index.js +1 -1
  10. package/dist/components/ui/alert-dialog/index.js +3 -3
  11. package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
  12. package/dist/components/ui/command/command-input.svelte.d.ts +1 -1
  13. package/dist/components/ui/command/command.svelte.d.ts +1 -1
  14. package/dist/components/ui/command/index.js +1 -1
  15. package/dist/components/ui/dialog/index.js +4 -4
  16. package/dist/components/ui/input/input.svelte.d.ts +1 -1
  17. package/dist/components/ui/popover/index.js +3 -3
  18. package/dist/components/ui/range-calendar/range-calendar-day.svelte.d.ts +1 -1
  19. package/dist/components/ui/range-calendar/range-calendar.svelte.d.ts +1 -1
  20. package/dist/components/ui/select/index.d.ts +1 -1
  21. package/dist/components/ui/select/index.js +2 -2
  22. package/dist/components/ui/textarea/textarea.svelte.d.ts +1 -1
  23. package/dist/components/ui/tooltip/index.js +3 -3
  24. package/dist/context.js +1 -1
  25. package/dist/eventSystem.js +24 -84
  26. package/dist/extensions/extension.types.js +9 -1
  27. package/dist/extensions/extensionUtils.js +42 -112
  28. package/dist/relations.d.ts +1 -1
  29. package/dist/relations.js +9 -10
  30. package/dist/store.svelte.d.ts +2 -1
  31. package/dist/store.svelte.js +7 -53
  32. package/dist/utils.js +8 -13
  33. package/package.json +9 -6
  34. package/src/app.d.ts +19 -0
  35. package/src/app.html +13 -0
  36. package/src/routes/+page.svelte +6 -0
  37. package/vite-plugins/index.js +1 -1
  38. package/vite-plugins/{monorepo-workspace.js → workspace-optimize.js} +1 -33
  39. package/src/App.svelte +0 -5
  40. package/src/main.ts +0 -18
@@ -11,8 +11,6 @@ import { join, resolve, dirname } from "node:path";
11
11
  * - entries: Tells Vite to crawl workspace packages at startup so
12
12
  * all their deps are discovered and pre-bundled upfront
13
13
  * (avoids 504 timeouts on first browser load).
14
- * - include: Re-includes leaf CJS deps of excluded packages so
15
- * Vite still pre-bundles them for the browser.
16
14
  * - holdUntilCrawlEnd: Blocks the first response until optimization is done.
17
15
  * - server.fs.allow: Allows Vite to serve files from the monorepo root
18
16
  * (needed to follow symlinks into workspace packages).
@@ -36,7 +34,6 @@ export function lobbWorkspaceOptimize() {
36
34
  holdUntilCrawlEnd: true,
37
35
  entries: getWorkspaceEntries(workspacePkgs),
38
36
  exclude: workspacePkgs,
39
- include: getCjsDepsOf(workspacePkgs),
40
37
  },
41
38
  server: {
42
39
  fs: {
@@ -59,6 +56,7 @@ function getLobbWorkspacePackages() {
59
56
  }
60
57
  }
61
58
 
59
+
62
60
  function getMonorepoRoot(pkgNames) {
63
61
  for (const name of pkgNames) {
64
62
  try {
@@ -98,36 +96,6 @@ function getWorkspaceEntries(pkgNames) {
98
96
  return entries;
99
97
  }
100
98
 
101
- function readPkgFrom(name, baseDir) {
102
- let dir = baseDir;
103
- for (let i = 0; i < 8; i++) {
104
- const pkg = tryReadJson(join(dir, "node_modules", name, "package.json"));
105
- if (pkg) return pkg;
106
- const parent = dirname(dir);
107
- if (parent === dir) break;
108
- dir = parent;
109
- }
110
- return null;
111
- }
112
-
113
- function getCjsDepsOf(pkgNames) {
114
- const deps = [];
115
- for (const name of pkgNames) {
116
- try {
117
- const realPath = realpathSync(resolve(`node_modules/${name}`));
118
- const pkg = tryReadJson(join(realPath, "package.json"));
119
- if (!pkg) continue;
120
- for (const dep of Object.keys(pkg.dependencies ?? {})) {
121
- const depPkg = readPkgFrom(dep, realPath);
122
- if (!depPkg) continue;
123
- const isCjs = depPkg.type !== "module";
124
- const isLeaf = Object.keys(depPkg.dependencies ?? {}).length === 0;
125
- if (isCjs && isLeaf) deps.push(dep);
126
- }
127
- } catch { /* skip */ }
128
- }
129
- return [...new Set(deps)];
130
- }
131
99
 
132
100
  function tryReadJson(filePath) {
133
101
  try {
package/src/App.svelte DELETED
@@ -1,5 +0,0 @@
1
- <script lang="ts">
2
- import Studio from "./lib/components/Studio.svelte";
3
- </script>
4
-
5
- <Studio />
package/src/main.ts DELETED
@@ -1,18 +0,0 @@
1
- import "./app.css";
2
-
3
- import { mount } from 'svelte'
4
- import App from './App.svelte'
5
-
6
- declare global {
7
- interface Window {
8
- APP_ENV: {
9
- LOBB_URL: string
10
- }
11
- }
12
- }
13
-
14
- const app = mount(App, {
15
- target: document.getElementById('app')!,
16
- })
17
-
18
- export default app