@stacksjs/stx 0.2.21 → 0.2.24
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/animation.d.ts +30 -0
- package/dist/builtins/drawer.d.ts +2 -0
- package/dist/builtins/index.d.ts +6 -2
- package/dist/builtins/tooltip.d.ts +18 -0
- package/dist/caching.d.ts +8 -0
- package/dist/cli.js +728 -626
- package/dist/component-renderer.d.ts +1 -18
- package/dist/composables/use-fetch.d.ts +0 -29
- package/dist/composables/use-share.d.ts +4 -0
- package/dist/craft-bridge.d.ts +7 -0
- package/dist/craft-compiler.d.ts +13 -0
- package/dist/craft-components.d.ts +7 -0
- package/dist/craft-ssr.d.ts +13 -0
- package/dist/database.d.ts +1 -0
- package/dist/dev-server/crosswind.d.ts +24 -0
- package/dist/dev-server/types.d.ts +2 -0
- package/dist/devtools.d.ts +36 -0
- package/dist/docs.d.ts +1 -20
- package/dist/forms.d.ts +9 -9
- package/dist/hot-reload.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +666 -564
- package/dist/native-build.d.ts +10 -0
- package/dist/partial-hydration.d.ts +4 -0
- package/dist/public-env.d.ts +15 -0
- package/dist/pwa/workbox.d.ts +8 -0
- package/dist/pwa.js +482 -380
- package/dist/reactive.d.ts +4 -0
- package/dist/ssg.js +508 -406
- package/dist/story/cli.d.ts +10 -10
- package/dist/story/output.d.ts +28 -0
- package/dist/story/ui/code-panel.d.ts +0 -25
- package/dist/streaming.d.ts +60 -0
- package/dist/stx.d.ts +18 -0
- package/dist/testing.d.ts +52 -78
- package/dist/types/config-types.d.ts +6 -0
- package/dist/visual-editor.d.ts +4 -0
- package/package.json +5 -5
- package/stx.d.ts +18 -0
package/dist/native-build.d.ts
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Build an stx template into a native application
|
|
3
3
|
*/
|
|
4
4
|
export declare function buildNative(config: NativeBuildConfig): Promise<NativeBuildResult>;
|
|
5
|
+
/**
|
|
6
|
+
* Detect current platform
|
|
7
|
+
*/
|
|
8
|
+
declare function detectPlatform(): NativeTarget;
|
|
5
9
|
/**
|
|
6
10
|
* Get available targets for current platform
|
|
7
11
|
*/
|
|
@@ -10,6 +14,12 @@ export declare function getAvailableTargets(): NativeTarget[];
|
|
|
10
14
|
* Get available formats for a target
|
|
11
15
|
*/
|
|
12
16
|
export declare function getAvailableFormats(target: NativeTarget): NativeFormat[];
|
|
17
|
+
declare const nativeBuild: {
|
|
18
|
+
buildNative: typeof buildNative
|
|
19
|
+
getAvailableTargets: typeof getAvailableTargets
|
|
20
|
+
getAvailableFormats: typeof getAvailableFormats
|
|
21
|
+
detectPlatform: typeof detectPlatform
|
|
22
|
+
};
|
|
13
23
|
export declare interface NativeBuildConfig {
|
|
14
24
|
input: string
|
|
15
25
|
output?: string
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Create a registry for managing island components
|
|
3
3
|
*/
|
|
4
4
|
export declare function createIslandRegistry(): IslandRegistry;
|
|
5
|
+
/**
|
|
6
|
+
* Process all partial hydration directives
|
|
7
|
+
*/
|
|
8
|
+
export declare function processPartialHydrationDirectives(template: string, context?: Record<string, unknown>, _filePath?: string): string;
|
|
5
9
|
/**
|
|
6
10
|
* Generate CSS for partial hydration
|
|
7
11
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the `define` map every client bundler/transpiler should pass to
|
|
3
|
+
* Bun.build / new Bun.Transpiler({ define }).
|
|
4
|
+
*
|
|
5
|
+
* Returns substitutions for both `import.meta.env.<KEY>` (preferred, Vite-
|
|
6
|
+
* compatible) and a single `import.meta.env` literal that maps to the full
|
|
7
|
+
* object so consumers can do `if (import.meta.env.X)` and similar idiomatic
|
|
8
|
+
* patterns.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getPublicEnvDefine(envPrefix?: string): Record<string, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the public env values as a plain object. Useful for places that want
|
|
13
|
+
* the raw map (e.g. tests, debugging) rather than the define-shaped strings.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getPublicEnv(envPrefix?: string): Record<string, string>;
|
package/dist/pwa/workbox.d.ts
CHANGED
|
@@ -7,6 +7,14 @@ export declare function generateWorkboxConfig(options: StxOptions, outputDir?: s
|
|
|
7
7
|
* Generate Workbox service worker JavaScript code
|
|
8
8
|
*/
|
|
9
9
|
export declare function generateWorkboxServiceWorker(options: StxOptions, outputDir?: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Check if Workbox mode is enabled in config
|
|
12
|
+
*/
|
|
13
|
+
export declare function isWorkboxEnabled(options: StxOptions): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Get the appropriate service worker generator based on config
|
|
16
|
+
*/
|
|
17
|
+
export declare function getServiceWorkerGenerator(options: StxOptions): (options: StxOptions, outputDir?: string) => string;
|
|
10
18
|
// ============================================================================
|
|
11
19
|
// Types
|
|
12
20
|
// ============================================================================
|