@happyvertical/smrt-ui 0.55.10 → 0.55.16

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/AGENTS.md CHANGED
@@ -59,6 +59,7 @@ components are exempt — they *are* the primitives.
59
59
  | `./registry` | `ModuleUIRegistry` for cross-package component discovery |
60
60
  | `./theme` | deprecated compatibility path forwarding to the canonical theme system |
61
61
  | `./themes` | canonical `ThemeProvider`, context, preset token system (material/glass/studio/smrt/happyvertical), and CSS generation |
62
+ | `./themes/presets` | Node-safe preset data (ids, labels, palettes, `themePresets`, theme definitions); imports no `.svelte`; `./themes` re-exports it, so it is the single source |
62
63
  | `./themes/styles/smrt.css` | static SMRT theme CSS (dark-first amber instrument-panel look) + signature `.smrt-*` flourish utilities |
63
64
  | `./themes/styles/fonts.css` | optional self-hosted `@font-face` for the SMRT type stack (Space Grotesk / Inter / JetBrains Mono) |
64
65
  | `./themes/styles/happyvertical.css` | static HappyVertical "Day Shift" brand CSS (enamel/faceplate calm instrument panel) + amber focus rule + `.hv-*` utilities |
@@ -21,13 +21,8 @@ export { getThemeContext, hasThemeContext, setThemeContext, tryGetThemeContext,
21
21
  export type { CreateThemeOptions } from './create-theme.js';
22
22
  export { createTheme, createThemeFromColor, getRegisteredTheme, isThemeRegistered, preloadThemeRegistry, registerTheme, } from './create-theme.js';
23
23
  export { generateAllThemesCSS, generateThemeCSS, generateThemeVariables, variablesToStyleString, } from './css-generator.js';
24
- export { glassTheme } from './glass/index.js';
25
- export { happyverticalTheme } from './happyvertical/index.js';
26
- export { materialTheme } from './material/index.js';
27
- export { availablePresets, getAllThemes, getTheme, getThemeName, getThemeOptions, isValidPreset, themes, } from './registry.js';
24
+ export { availablePresets, getAllThemes, getTheme, getThemeName, getThemeOptions, glassTheme, happyverticalTheme, isValidPreset, materialTheme, smrtTheme, studioTheme, type ThemePresetSummary, themePresets, themes, } from './presets.js';
28
25
  export { appleEasing, borderRadiusScale, durationScale, materialEasing, spacingScale, studioEasing, } from './shared.js';
29
- export { smrtTheme } from './smrt/index.js';
30
- export { studioTheme } from './studio/index.js';
31
26
  export { default as ThemeProvider } from './ThemeProvider.svelte';
32
27
  export { type ThemeScriptOptions, themeScript } from './theme-script.js';
33
28
  export type { BorderRadius, BorderRadiusScale, ColorPalette, ColorScheme, CSSVariableOptions, DurationScale, EasingScale, ElevationScale, GlassEffects, ResolvedScheme, SpacingScale, Theme, ThemeConfig, ThemeContext, ThemePreset, ThemeState, TypographyScale, TypographyToken, } from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EACL,eAAe,EACf,eAAe,EACf,eAAe,EACf,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,aAAa,EACb,MAAM,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,GACb,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AAkB,EACvB,YAAY,EACZ,MAAM,GACP,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEzE,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,KAAK,EACL,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,EACV,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
@@ -24,16 +24,10 @@ export { getThemeContext, hasThemeContext, setThemeContext, tryGetThemeContext,
24
24
  export { createTheme, createThemeFromColor, getRegisteredTheme, isThemeRegistered, preloadThemeRegistry, registerTheme, } from './create-theme.js';
25
25
  // CSS generation
26
26
  export { generateAllThemesCSS, generateThemeCSS, generateThemeVariables, variablesToStyleString, } from './css-generator.js';
27
- export { glassTheme } from './glass/index.js';
28
- export { happyverticalTheme } from './happyvertical/index.js';
29
- // Theme definitions
30
- export { materialTheme } from './material/index.js';
31
- // Registry
32
- export { availablePresets, getAllThemes, getTheme, getThemeName, getThemeOptions, isValidPreset, themes, } from './registry.js';
27
+ // Preset data and registry (single source: ./presets.ts, Node-safe)
28
+ export { availablePresets, getAllThemes, getTheme, getThemeName, getThemeOptions, glassTheme, happyverticalTheme, isValidPreset, materialTheme, smrtTheme, studioTheme, themePresets, themes, } from './presets.js';
33
29
  // Shared tokens (if needed for custom themes)
34
30
  export { appleEasing, borderRadiusScale, durationScale, materialEasing, spacingScale, studioEasing, } from './shared.js';
35
- export { smrtTheme } from './smrt/index.js';
36
- export { studioTheme } from './studio/index.js';
37
31
  // Main components
38
32
  export { default as ThemeProvider } from './ThemeProvider.svelte';
39
33
  // Pre-paint bootstrap script
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Theme presets: ids, labels, and palettes only.
3
+ *
4
+ * Node-safe subpath (`@happyvertical/smrt-ui/themes/presets`): it imports no
5
+ * `.svelte` file and no browser global, so a CLI, server, or build script can
6
+ * list the presets without a Svelte toolchain. `@happyvertical/smrt-ui/themes`
7
+ * re-exports everything here, so the preset data has exactly one source.
8
+ */
9
+ export { glassTheme } from './glass/index.js';
10
+ export { happyverticalTheme } from './happyvertical/index.js';
11
+ export { materialTheme } from './material/index.js';
12
+ export { availablePresets, getAllThemes, getTheme, getThemeName, getThemeOptions, isValidPreset, themes, } from './registry.js';
13
+ export { smrtTheme } from './smrt/index.js';
14
+ export { studioTheme } from './studio/index.js';
15
+ export type { ColorPalette, ColorScheme, ResolvedScheme, Theme, ThemePreset, } from './types.js';
16
+ import type { ColorPalette, ThemePreset } from './types.js';
17
+ /** A built-in preset reduced to its identity and palettes. */
18
+ export interface ThemePresetSummary {
19
+ id: ThemePreset;
20
+ label: string;
21
+ light: ColorPalette;
22
+ dark: ColorPalette;
23
+ }
24
+ /** Built-in presets in display order: id, label, and light/dark colors. */
25
+ export declare const themePresets: readonly ThemePresetSummary[];
26
+ //# sourceMappingURL=presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../src/themes/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,aAAa,EACb,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EACV,YAAY,EACZ,WAAW,EACX,cAAc,EACd,KAAK,EACL,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE5D,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,WAAW,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,2EAA2E;AAC3E,eAAO,MAAM,YAAY,EAAE,SAAS,kBAAkB,EAOrD,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Theme presets: ids, labels, and palettes only.
3
+ *
4
+ * Node-safe subpath (`@happyvertical/smrt-ui/themes/presets`): it imports no
5
+ * `.svelte` file and no browser global, so a CLI, server, or build script can
6
+ * list the presets without a Svelte toolchain. `@happyvertical/smrt-ui/themes`
7
+ * re-exports everything here, so the preset data has exactly one source.
8
+ */
9
+ export { glassTheme } from './glass/index.js';
10
+ export { happyverticalTheme } from './happyvertical/index.js';
11
+ export { materialTheme } from './material/index.js';
12
+ export { availablePresets, getAllThemes, getTheme, getThemeName, getThemeOptions, isValidPreset, themes, } from './registry.js';
13
+ export { smrtTheme } from './smrt/index.js';
14
+ export { studioTheme } from './studio/index.js';
15
+ import { availablePresets, themes } from './registry.js';
16
+ /** Built-in presets in display order: id, label, and light/dark colors. */
17
+ export const themePresets = availablePresets.map((id) => ({
18
+ id,
19
+ label: themes[id].name,
20
+ light: themes[id].light,
21
+ dark: themes[id].dark,
22
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-ui",
3
- "version": "0.55.10",
3
+ "version": "0.55.16",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Domain-agnostic Svelte 5 UI runtime for SMRT: primitives, i18n client, theme system, and module UI registry",
6
6
  "type": "module",
@@ -104,6 +104,11 @@
104
104
  "import": "./dist/themes/index.js",
105
105
  "default": "./dist/themes/index.js"
106
106
  },
107
+ "./themes/presets": {
108
+ "types": "./dist/themes/presets.d.ts",
109
+ "import": "./dist/themes/presets.js",
110
+ "default": "./dist/themes/presets.js"
111
+ },
107
112
  "./themes/styles/*": {
108
113
  "default": "./dist/themes/styles/*"
109
114
  },
@@ -144,7 +149,7 @@
144
149
  "access": "public"
145
150
  },
146
151
  "dependencies": {
147
- "@happyvertical/smrt-types": "0.55.10",
152
+ "@happyvertical/smrt-types": "0.55.16",
148
153
  "esm-env": "^1.2.2"
149
154
  },
150
155
  "peerDependencies": {
@@ -160,7 +165,7 @@
160
165
  }
161
166
  },
162
167
  "devDependencies": {
163
- "@happyvertical/speech": "^0.103.1",
168
+ "@happyvertical/speech": "^0.103.4",
164
169
  "@sveltejs/package": "^2.5.8",
165
170
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
166
171
  "@testing-library/jest-dom": "^7.0.1",