sinwan-ui-core 1.3.1 → 1.4.0
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/CHANGELOG.md +10 -0
- package/dist/chunks/{chunk-rrvtbvbh.js → chunk-16d43dkc.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this package are documented in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this package uses [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [1.4.0]
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `voltzig` palette (Voltzig AI): `Palette` now accepts `"voltzig"` and `ThemeProvider`'s default `palettes` list is `["carzow", "jomlaty", "cazview", "voltzig"]`. Pair it with the registry stylesheet, which defines the `html[data-palette="voltzig"]` tokens: `#08090D` black and `#FFFFFF` white surfaces with a monochrome primary, `#A3A3A3` silver for secondary text in dark mode, and `#6C5CE7` electric violet for focus rings, accent tints, the first chart color and the brand gradient. Apps that pass their own `palettes` list are unaffected.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Breaking:** the default palette `"credit-blue"` is renamed `"carzow"`. `Palette` no longer accepts `"credit-blue"`, and `ThemeProvider`'s `defaultPalette` is now `"carzow"`, so `<html>` gets `data-palette="carzow"`. Replace `"credit-blue"` with `"carzow"` in `defaultPalette`, `forcedPalette`, `palettes` and `setPalette` calls. A saved `sinwan-ui-palette=credit-blue` value is ignored and falls back to `carzow`, which is the same set of colors. No alias is kept because sinwan-ui has no consumers yet.
|
|
14
|
+
|
|
5
15
|
## [1.3.1]
|
|
6
16
|
|
|
7
17
|
### Fixed
|
|
@@ -18,7 +18,7 @@ var _$tmpl_0 = {
|
|
|
18
18
|
{ path: [], type: "child" }
|
|
19
19
|
]
|
|
20
20
|
};
|
|
21
|
-
var DEFAULT_PALETTES = ["
|
|
21
|
+
var DEFAULT_PALETTES = ["carzow", "jomlaty", "cazview", "voltzig"];
|
|
22
22
|
var ThemeKey2 = Symbol("sinwan-ui.theme");
|
|
23
23
|
function isTheme(value) {
|
|
24
24
|
return value === "light" || value === "dark" || value === "system";
|
|
@@ -80,7 +80,7 @@ function writeDomPalette(next) {
|
|
|
80
80
|
var ThemeProvider2 = cc((props) => {
|
|
81
81
|
const allowedPalettes = () => (props.palettes === undefined ? DEFAULT_PALETTES : props.palettes).length > 0 ? props.palettes === undefined ? DEFAULT_PALETTES : props.palettes : DEFAULT_PALETTES;
|
|
82
82
|
const initialTheme = props.forcedTheme ?? readStoredTheme(props.storageKey === undefined ? "sinwan-ui-theme" : props.storageKey, props.defaultTheme === undefined ? "system" : props.defaultTheme);
|
|
83
|
-
const initialPalette = props.forcedPalette ?? readStoredPalette(props.paletteStorageKey === undefined ? "sinwan-ui-palette" : props.paletteStorageKey, props.defaultPalette === undefined ? "
|
|
83
|
+
const initialPalette = props.forcedPalette ?? readStoredPalette(props.paletteStorageKey === undefined ? "sinwan-ui-palette" : props.paletteStorageKey, props.defaultPalette === undefined ? "carzow" : props.defaultPalette, allowedPalettes());
|
|
84
84
|
const theme = signal(initialTheme);
|
|
85
85
|
const palette = signal(initialPalette);
|
|
86
86
|
const resolved = signal(initialTheme === "system" ? getSystemTheme() : initialTheme);
|
package/dist/index.js
CHANGED
package/dist/theme.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type InjectionKey, type SinwanNode } from "sinwan/component";
|
|
|
2
2
|
import { type Signal } from "sinwan/reactivity";
|
|
3
3
|
export type Theme = "light" | "dark" | "system";
|
|
4
4
|
export type ResolvedTheme = "light" | "dark";
|
|
5
|
-
export type Palette = "
|
|
5
|
+
export type Palette = "carzow" | "jomlaty" | "cazview" | "voltzig";
|
|
6
6
|
export type ThemeApi = {
|
|
7
7
|
theme: Signal<Theme>;
|
|
8
8
|
resolved: Signal<ResolvedTheme>;
|
package/dist/theme.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sinwan-ui-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Headless behaviour primitives for Sinwan UI components: overlays, floating positioning, dismiss layers, controls, slots, theme and direction.",
|
|
5
5
|
"author": "Mohammed Ben Cheikh",
|
|
6
6
|
"license": "MIT",
|