@stacksjs/stx 0.2.152 → 0.2.153
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/dist/app-shell.js +28 -1
- package/dist/browser-composables.d.ts +8 -0
- package/dist/build-id.d.ts +49 -0
- package/dist/build-id.js +20 -0
- package/dist/cli.js +886 -648
- package/dist/client-script.js +2 -2
- package/dist/color-mode-boot.d.ts +15 -10
- package/dist/color-mode-boot.js +12 -8
- package/dist/component-client-factories.js +3 -2
- package/dist/composables/index.d.ts +6 -1
- package/dist/composables/use-color-mode.d.ts +19 -4
- package/dist/composables/use-color-mode.js +37 -24
- package/dist/composables/use-storage.d.ts +14 -15
- package/dist/composables/use-storage.js +63 -2
- package/dist/craft.js +622 -384
- package/dist/dev-server/serve-app.js +9 -5
- package/dist/dev-server/types.d.ts +8 -1
- package/dist/document-shell.d.ts +55 -0
- package/dist/document-shell.js +103 -3
- package/dist/head.js +5 -1
- package/dist/includes.js +2 -2
- package/dist/index.d.ts +17 -0
- package/dist/index.js +9 -0
- package/dist/process.js +7 -3
- package/dist/production-builder.js +3 -1
- package/dist/pwa.js +581 -343
- package/dist/signals.js +280 -44
- package/dist/ssg.js +571 -333
- package/dist/stx.d.ts +14 -6
- package/dist/types/config-types.d.ts +1 -0
- package/package.json +5 -5
- package/stx.d.ts +14 -6
package/dist/stx.d.ts
CHANGED
|
@@ -237,11 +237,19 @@ interface StxColorModeOptions {
|
|
|
237
237
|
/** localStorage key holding the preference. @default 'stx-color-mode' */
|
|
238
238
|
storageKey?: string
|
|
239
239
|
/** Mode used when nothing valid is stored. @default 'auto' */
|
|
240
|
-
initialMode?: 'light' | 'dark' | 'auto'
|
|
241
|
-
/**
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
initialMode?: 'light' | 'dark' | 'auto' | 'system'
|
|
241
|
+
/**
|
|
242
|
+
* Class applied to `<html>` when dark. @default 'dark'
|
|
243
|
+
* Applied alongside `attribute`; pass `null` to opt out of the class.
|
|
244
|
+
*/
|
|
245
|
+
darkClass?: string | null
|
|
246
|
+
/** Attribute set to the resolved mode on `<html>`, e.g. 'data-theme'. */
|
|
247
|
+
attribute?: string | null
|
|
248
|
+
/**
|
|
249
|
+
* Spelling written to storage for "follow the system".
|
|
250
|
+
* @default whatever is already stored, else 'auto'
|
|
251
|
+
*/
|
|
252
|
+
autoValue?: 'auto' | 'system'
|
|
245
253
|
/** Suppress CSS transitions across a mode switch. @default true */
|
|
246
254
|
disableTransitions?: boolean
|
|
247
255
|
}
|
|
@@ -257,7 +265,7 @@ declare function useColorMode(_options?: StxColorModeOptions): {
|
|
|
257
265
|
/** User preference, which may be 'auto'. */
|
|
258
266
|
readonly preference: 'light' | 'dark' | 'auto'
|
|
259
267
|
readonly isDark: boolean
|
|
260
|
-
set: (mode: 'light' | 'dark' | 'auto') => void
|
|
268
|
+
set: (mode: 'light' | 'dark' | 'auto' | 'system') => void
|
|
261
269
|
toggle: () => void
|
|
262
270
|
subscribe: (fn: (mode: 'light' | 'dark', preference: 'light' | 'dark' | 'auto') => void) => () => void
|
|
263
271
|
}
|
|
@@ -242,6 +242,7 @@ export declare interface AppHeadConfig {
|
|
|
242
242
|
link?: Array<Record<string, string>>
|
|
243
243
|
script?: Array<{ src?: string, content?: string, [key: string]: any }>
|
|
244
244
|
headRaw?: string
|
|
245
|
+
htmlAttrs?: Record<string, string>
|
|
245
246
|
bodyClass?: string
|
|
246
247
|
bodyAttrs?: Record<string, string>
|
|
247
248
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.153",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"dependencies": {
|
|
118
118
|
"@cwcss/crosswind": "^0.2.14",
|
|
119
119
|
"@stacksjs/clapp": "^0.2.0",
|
|
120
|
-
"@stacksjs/desktop": "0.2.
|
|
121
|
-
"@stacksjs/sanitizer": "0.2.
|
|
120
|
+
"@stacksjs/desktop": "0.2.153",
|
|
121
|
+
"@stacksjs/sanitizer": "0.2.153",
|
|
122
122
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
123
|
-
"bun-plugin-stx": "0.2.
|
|
123
|
+
"bun-plugin-stx": "0.2.153",
|
|
124
124
|
"bunfig": "^0.15.17",
|
|
125
|
-
"stx-router": "0.2.
|
|
125
|
+
"stx-router": "0.2.153",
|
|
126
126
|
"ts-broadcasting": "^0.0.9",
|
|
127
127
|
"ts-images": "^0.1.9",
|
|
128
128
|
"ts-syntax-highlighter": "^0.2.1"
|
package/stx.d.ts
CHANGED
|
@@ -237,11 +237,19 @@ interface StxColorModeOptions {
|
|
|
237
237
|
/** localStorage key holding the preference. @default 'stx-color-mode' */
|
|
238
238
|
storageKey?: string
|
|
239
239
|
/** Mode used when nothing valid is stored. @default 'auto' */
|
|
240
|
-
initialMode?: 'light' | 'dark' | 'auto'
|
|
241
|
-
/**
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
initialMode?: 'light' | 'dark' | 'auto' | 'system'
|
|
241
|
+
/**
|
|
242
|
+
* Class applied to `<html>` when dark. @default 'dark'
|
|
243
|
+
* Applied alongside `attribute`; pass `null` to opt out of the class.
|
|
244
|
+
*/
|
|
245
|
+
darkClass?: string | null
|
|
246
|
+
/** Attribute set to the resolved mode on `<html>`, e.g. 'data-theme'. */
|
|
247
|
+
attribute?: string | null
|
|
248
|
+
/**
|
|
249
|
+
* Spelling written to storage for "follow the system".
|
|
250
|
+
* @default whatever is already stored, else 'auto'
|
|
251
|
+
*/
|
|
252
|
+
autoValue?: 'auto' | 'system'
|
|
245
253
|
/** Suppress CSS transitions across a mode switch. @default true */
|
|
246
254
|
disableTransitions?: boolean
|
|
247
255
|
}
|
|
@@ -257,7 +265,7 @@ declare function useColorMode(_options?: StxColorModeOptions): {
|
|
|
257
265
|
/** User preference, which may be 'auto'. */
|
|
258
266
|
readonly preference: 'light' | 'dark' | 'auto'
|
|
259
267
|
readonly isDark: boolean
|
|
260
|
-
set: (mode: 'light' | 'dark' | 'auto') => void
|
|
268
|
+
set: (mode: 'light' | 'dark' | 'auto' | 'system') => void
|
|
261
269
|
toggle: () => void
|
|
262
270
|
subscribe: (fn: (mode: 'light' | 'dark', preference: 'light' | 'dark' | 'auto') => void) => () => void
|
|
263
271
|
}
|