@domicile-desktop/component-library 0.0.0-alpha-e4b4097b35a2 → 0.0.0-alpha-9d1a96dddb37

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/package.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "dependencies": {
3
3
  "@base-ui/react": "^1.8.0",
4
4
  "@cprussin/option-result": "^2.0.1",
5
- "@domicile-desktop/sdk": "0.0.0-alpha-e4b4097b35a2",
6
- "@domicile-desktop/system-apps": "0.0.0-alpha-e4b4097b35a2",
5
+ "@domicile-desktop/sdk": "0.0.0-alpha-9d1a96dddb37",
6
+ "@domicile-desktop/system-apps": "0.0.0-alpha-9d1a96dddb37",
7
7
  "@pandacss/dev": "^1.12.1",
8
8
  "@phosphor-icons/react": "^2.1.10"
9
9
  },
@@ -108,5 +108,5 @@
108
108
  "test:unit": "bun test"
109
109
  },
110
110
  "type": "module",
111
- "version": "0.0.0-alpha-e4b4097b35a2"
111
+ "version": "0.0.0-alpha-9d1a96dddb37"
112
112
  }
package/src/vite-shell.ts CHANGED
@@ -1,6 +1,6 @@
1
- // Vite config for a shell, which Domicile loads as a module instead of an HTML
2
- // page. The build emits a fixed `shell.js`, keeps the entry's exports, and
3
- // inlines CSS into the module. Mistakes here give a blank or unstyled desktop
1
+ // Vite config for a shell or an app module, which Domicile loads as a module
2
+ // instead of an HTML page. The build emits a fixed file name (`shell.js` by
3
+ // default), keeps the entry's exports, and inlines CSS into the module. Mistakes here give a blank or unstyled desktop
4
4
  // with no error. See docs/SHELL-PACKAGING.md.
5
5
  //
6
6
  // CSS goes in the module to avoid a theme flash. A stylesheet `<link>` blocks
@@ -56,13 +56,15 @@ const installStyles = (css: string): string =>
56
56
  export type ShellBuild = {
57
57
  /** The shell's entry module, relative to the config. */
58
58
  readonly entry: string;
59
+ /** The module's file name; `shell.js` by default. An app names its own. */
60
+ readonly fileName?: string;
59
61
  };
60
62
 
61
63
  /**
62
64
  * The `build` and `plugins` a shell's vite config needs. Spread it into the
63
65
  * shell's own config.
64
66
  */
65
- export const shellBuild = ({ entry }: ShellBuild) => ({
67
+ export const shellBuild = ({ entry, fileName = "shell.js" }: ShellBuild) => ({
66
68
  build: {
67
69
  // No content hash, so configs and packages can name the module path.
68
70
  //
@@ -70,7 +72,7 @@ export const shellBuild = ({ entry }: ShellBuild) => ({
70
72
  // `Shell` and all code only it reaches.
71
73
  rollupOptions: {
72
74
  input: entry,
73
- output: { entryFileNames: "shell.js" },
75
+ output: { entryFileNames: fileName },
74
76
  preserveEntrySignatures: "exports-only" as const,
75
77
  },
76
78
  sourcemap: true,