@stacksjs/stx 0.2.5 → 0.2.6
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/a11y.d.ts +2 -6
- package/dist/analytics.d.ts +1 -1
- package/dist/analyzer.d.ts +1 -1
- package/dist/animation.d.ts +10 -86
- package/dist/app.d.ts +2 -4
- package/dist/assets.d.ts +1 -1
- package/dist/ast.d.ts +3 -24
- package/dist/async-components.d.ts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/browser-composables.d.ts +6 -4
- package/dist/build-optimizer.d.ts +4 -29
- package/dist/build-views.d.ts +20 -1
- package/dist/bundle-analyzer/collector.d.ts +1 -1
- package/dist/bundle-analyzer/index.d.ts +40 -4
- package/dist/bundle-analyzer/report.d.ts +1 -1
- package/dist/bundle-analyzer/treemap.d.ts +1 -1
- package/dist/caching.d.ts +1 -1
- package/dist/cli.js +1323 -511
- package/dist/client/directive.d.ts +1 -1
- package/dist/client/index.d.ts +6 -1
- package/dist/client/router.d.ts +3 -11
- package/dist/client/stx-router.browser.d.ts +1 -0
- package/dist/client-script.d.ts +2 -1
- package/dist/client.d.ts +2 -2
- package/dist/component-hmr.d.ts +4 -18
- package/dist/components.d.ts +1 -1
- package/dist/composables/index.d.ts +114 -1
- package/dist/composables/use-battery.d.ts +1 -1
- package/dist/composables/use-broadcast-channel.d.ts +2 -2
- package/dist/composables/use-clipboard.d.ts +1 -1
- package/dist/composables/use-color-mode.d.ts +52 -0
- package/dist/composables/use-cookie.d.ts +1 -1
- package/dist/composables/use-device-orientation.d.ts +1 -1
- package/dist/composables/use-event-listener.d.ts +35 -0
- package/dist/composables/use-event-source.d.ts +1 -1
- package/dist/composables/use-eye-dropper.d.ts +3 -2
- package/dist/composables/use-fetch.d.ts +1 -1
- package/dist/composables/use-fullscreen.d.ts +1 -1
- package/dist/composables/use-geolocation.d.ts +1 -1
- package/dist/composables/use-idle.d.ts +2 -2
- package/dist/composables/use-intersection-observer.d.ts +1 -1
- package/dist/composables/use-keyboard.d.ts +1 -2
- package/dist/composables/use-media-query.d.ts +1 -1
- package/dist/composables/use-meta.d.ts +35 -0
- package/dist/composables/use-mouse.d.ts +1 -1
- package/dist/composables/use-mutation-observer.d.ts +1 -1
- package/dist/composables/use-network.d.ts +1 -1
- package/dist/composables/use-notification.d.ts +10 -1
- package/dist/composables/use-permissions.d.ts +17 -7
- package/dist/composables/use-query.d.ts +43 -0
- package/dist/composables/use-resize-observer.d.ts +1 -1
- package/dist/composables/use-router.d.ts +59 -0
- package/dist/composables/use-share.d.ts +1 -1
- package/dist/composables/use-speech.d.ts +1 -1
- package/dist/composables/use-storage.d.ts +1 -1
- package/dist/composables/use-text-selection.d.ts +1 -1
- package/dist/composables/use-timer.d.ts +92 -0
- package/dist/composables/use-utilities.d.ts +103 -0
- package/dist/composables/use-wake-lock.d.ts +1 -1
- package/dist/composables/use-websocket.d.ts +3 -3
- package/dist/composables/use-window.d.ts +1 -1
- package/dist/composables.d.ts +10 -7
- package/dist/composition-api.d.ts +1 -14
- package/dist/computed.d.ts +10 -4
- package/dist/conditionals.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/craft-bridge.d.ts +1 -1
- package/dist/craft-compiler.d.ts +6 -3
- package/dist/craft-components.d.ts +1 -8
- package/dist/craft-entry.d.ts +1 -1
- package/dist/craft-ssr.d.ts +1 -1
- package/dist/csp.d.ts +2 -2
- package/dist/csrf.d.ts +1 -1
- package/dist/custom-directives.d.ts +1 -1
- package/dist/database.d.ts +8 -26
- package/dist/defer.d.ts +1 -1
- package/dist/deploy/config-generators.d.ts +1 -1
- package/dist/deploy/index.d.ts +6 -3
- package/dist/deploy/netlify.d.ts +1 -1
- package/dist/dev-server/crosswind.d.ts +11 -1
- package/dist/dev-server/index.d.ts +16 -1
- package/dist/dev-server/keyboard-shortcuts.d.ts +1 -1
- package/dist/dev-server/native-window.d.ts +1 -1
- package/dist/dev-server/port-utils.d.ts +2 -2
- package/dist/dev-server/terminal-colors.d.ts +1 -5
- package/dist/dev-server/theme-selector.d.ts +1 -1
- package/dist/dev-server/types.d.ts +3 -8
- package/dist/dev-server.d.ts +1 -4
- package/dist/devtools.d.ts +4 -1
- package/dist/directive-api.d.ts +3 -3
- package/dist/docs.d.ts +2 -2
- package/dist/dynamic-components.d.ts +1 -1
- package/dist/edge-runtime.d.ts +3 -3
- package/dist/env.d.ts +1 -1
- package/dist/error-boundaries.d.ts +1 -1
- package/dist/error-handling.d.ts +14 -1
- package/dist/errors/codes.d.ts +2 -17
- package/dist/errors/formatter.d.ts +1 -1
- package/dist/errors/index.d.ts +13 -1
- package/dist/errors/logger.d.ts +2 -15
- package/dist/errors/sanitizer.d.ts +1 -1
- package/dist/errors/types.d.ts +1 -1
- package/dist/events.d.ts +1 -1
- package/dist/expressions.d.ts +64 -90
- package/dist/formatter.d.ts +1 -1
- package/dist/forms-validation.d.ts +23 -24
- package/dist/forms.d.ts +5 -22
- package/dist/head.d.ts +5 -1
- package/dist/heatmap.d.ts +4 -7
- package/dist/hot-reload.d.ts +3 -8
- package/dist/hydration-runtime.d.ts +1 -1
- package/dist/hydration.d.ts +5 -32
- package/dist/i18n.d.ts +1 -9
- package/dist/image-optimization/build-plugin.d.ts +2 -2
- package/dist/image-optimization/component.d.ts +2 -2
- package/dist/image-optimization/directive.d.ts +2 -2
- package/dist/image-optimization/index.d.ts +55 -1
- package/dist/image-optimization/processor.d.ts +9 -4
- package/dist/includes.d.ts +1 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +1387 -542
- package/dist/init.d.ts +1 -1
- package/dist/interactive.d.ts +1 -1
- package/dist/internal-markdown.d.ts +1 -1
- package/dist/js-ts.d.ts +1 -1
- package/dist/jsx-runtime.d.ts +1 -20
- package/dist/keep-alive.d.ts +1 -1
- package/dist/lazy-loader.d.ts +3 -35
- package/dist/loading-indicator.d.ts +2 -1
- package/dist/loops.d.ts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/media/client/blur-up.d.ts +1 -1
- package/dist/media/client/index.d.ts +17 -1
- package/dist/media/client/lazy-load.d.ts +1 -1
- package/dist/media/client/upload-handler.d.ts +1 -1
- package/dist/media/image/component.d.ts +2 -4
- package/dist/media/image/directive.d.ts +1 -1
- package/dist/media/image/editing.d.ts +1 -1
- package/dist/media/image/index.d.ts +25 -1
- package/dist/media/image/placeholder.d.ts +1 -1
- package/dist/media/image/processor/cache.d.ts +3 -4
- package/dist/media/image/processor/index.d.ts +9 -1
- package/dist/media/image/processor/optimizer.d.ts +2 -2
- package/dist/media/image/processor/responsive.d.ts +3 -2
- package/dist/media/image/srcset.d.ts +6 -4
- package/dist/media/index.d.ts +37 -1
- package/dist/media/manager/embed.d.ts +1 -1
- package/dist/media/protected/component.d.ts +2 -3
- package/dist/media/protected/index.d.ts +14 -1
- package/dist/media/protected/signature.d.ts +2 -2
- package/dist/media/shared/cache.d.ts +1 -1
- package/dist/media/shared/hash.d.ts +1 -1
- package/dist/media/shared/index.d.ts +6 -1
- package/dist/media/types.d.ts +16 -72
- package/dist/media/upload/component.d.ts +2 -16
- package/dist/media/upload/index.d.ts +8 -1
- package/dist/media/video/directive.d.ts +1 -1
- package/dist/media/video/index.d.ts +11 -2
- package/dist/media/video/processor/cache.d.ts +3 -4
- package/dist/media/video/processor/index.d.ts +9 -1
- package/dist/media/video/processor/streaming.d.ts +2 -2
- package/dist/media/video/processor/thumbnail.d.ts +2 -2
- package/dist/media/video/processor/transcoder.d.ts +2 -2
- package/dist/method-spoofing.d.ts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/native-build.d.ts +3 -6
- package/dist/parser/directive-parser.d.ts +1 -1
- package/dist/parser/expression-parser.d.ts +2 -1
- package/dist/parser/index.d.ts +14 -1
- package/dist/parser/tokenizer.d.ts +2 -18
- package/dist/partial-hydration.d.ts +5 -6
- package/dist/performance-utils.d.ts +5 -18
- package/dist/plugin-system.d.ts +2 -8
- package/dist/plugin.d.ts +1 -1
- package/dist/precompiler.d.ts +2 -67
- package/dist/process.d.ts +12 -2
- package/dist/production-build.d.ts +1 -37
- package/dist/props.d.ts +3 -30
- package/dist/pwa/audit.d.ts +1 -1
- package/dist/pwa/directives.d.ts +1 -1
- package/dist/pwa/icons.d.ts +7 -4
- package/dist/pwa/index.d.ts +46 -1
- package/dist/pwa/inject.d.ts +1 -1
- package/dist/pwa/manifest.d.ts +1 -1
- package/dist/pwa/offline.d.ts +1 -1
- package/dist/pwa/precache.d.ts +1 -1
- package/dist/pwa/service-worker.d.ts +1 -1
- package/dist/pwa/workbox-strategies.d.ts +1 -1
- package/dist/pwa/workbox.d.ts +1 -10
- package/dist/pwa.d.ts +1 -1
- package/dist/pwa.js +1242 -430
- package/dist/reactive-bindings.d.ts +1 -1
- package/dist/reactive.d.ts +1 -1
- package/dist/reactivity.d.ts +6 -50
- package/dist/release.d.ts +1 -1
- package/dist/route-middleware.d.ts +3 -3
- package/dist/router.d.ts +1 -1
- package/dist/routes.d.ts +2 -2
- package/dist/runtime.d.ts +4 -4
- package/dist/safe-evaluator.d.ts +1 -4
- package/dist/scaffolding.d.ts +1 -1
- package/dist/seo.d.ts +1 -5
- package/dist/serve.d.ts +1 -1
- package/dist/server-components.d.ts +1 -1
- package/dist/signals.d.ts +8 -168
- package/dist/slots.d.ts +2 -2
- package/dist/source-maps.d.ts +3 -22
- package/dist/spa-shell.d.ts +20 -0
- package/dist/ssg.d.ts +4 -6
- package/dist/ssg.js +1242 -430
- package/dist/ssr.d.ts +6 -14
- package/dist/state-management.d.ts +5 -45
- package/dist/stores-client.d.ts +3 -3
- package/dist/story/addons.d.ts +1 -1
- package/dist/story/analytics.d.ts +4 -11
- package/dist/story/auto-stories.d.ts +1 -1
- package/dist/story/bookmarks.d.ts +2 -6
- package/dist/story/bun-test.d.ts +1 -1
- package/dist/story/cli.d.ts +0 -25
- package/dist/story/collect/analyzer.d.ts +1 -1
- package/dist/story/collect/index.d.ts +5 -1
- package/dist/story/collect/parser.d.ts +1 -1
- package/dist/story/collect/scanner.d.ts +1 -1
- package/dist/story/collect/tree.d.ts +2 -2
- package/dist/story/commands/build.d.ts +1 -1
- package/dist/story/commands/dev.d.ts +1 -1
- package/dist/story/commands/index.d.ts +4 -1
- package/dist/story/commands/preview.d.ts +1 -1
- package/dist/story/compiled-output.d.ts +1 -1
- package/dist/story/composition.d.ts +1 -1
- package/dist/story/config-watcher.d.ts +1 -1
- package/dist/story/config.d.ts +2 -2
- package/dist/story/context.d.ts +1 -1
- package/dist/story/controls/index.d.ts +1 -1
- package/dist/story/crosswind.d.ts +1 -1
- package/dist/story/desktop-preview.d.ts +1 -1
- package/dist/story/docs-generator.d.ts +1 -1
- package/dist/story/errors.d.ts +1 -1
- package/dist/story/figma-export.d.ts +2 -2
- package/dist/story/generator.d.ts +1 -1
- package/dist/story/hmr.d.ts +1 -1
- package/dist/story/hot-swap.d.ts +1 -1
- package/dist/story/index.d.ts +49 -1
- package/dist/story/interactions.d.ts +1 -1
- package/dist/story/keyboard-shortcuts.d.ts +1 -1
- package/dist/story/output.d.ts +1 -1
- package/dist/story/performance.d.ts +3 -12
- package/dist/story/presets.d.ts +3 -8
- package/dist/story/props-validation.d.ts +11 -1
- package/dist/story/renderer.d.ts +1 -1
- package/dist/story/search-index.d.ts +2 -2
- package/dist/story/search.d.ts +2 -2
- package/dist/story/server.d.ts +1 -1
- package/dist/story/setup.d.ts +1 -1
- package/dist/story/snapshots.d.ts +1 -1
- package/dist/story/testing.d.ts +1 -1
- package/dist/story/theme.d.ts +1 -1
- package/dist/story/types.d.ts +3 -12
- package/dist/story/ui/code-panel.d.ts +1 -1
- package/dist/story/ui/controls-panel.d.ts +1 -1
- package/dist/story/ui/index.d.ts +5 -1
- package/dist/story/ui/navigation.d.ts +1 -1
- package/dist/story/ui/preview.d.ts +1 -1
- package/dist/story/visual-testing.d.ts +1 -1
- package/dist/streaming.d.ts +0 -59
- package/dist/suspense.d.ts +1 -1
- package/dist/teleport.d.ts +1 -1
- package/dist/testing.d.ts +62 -80
- package/dist/transitions.d.ts +1 -1
- package/dist/type-checker.d.ts +2 -26
- package/dist/types/component-types.d.ts +3 -3
- package/dist/types/config-types.d.ts +15 -30
- package/dist/types/context-types.d.ts +6 -5
- package/dist/types/csp-types.d.ts +2 -2
- package/dist/types/directive-types.d.ts +5 -5
- package/dist/types/index.d.ts +21 -1
- package/dist/types/pwa-types.d.ts +1 -6
- package/dist/types.d.ts +28 -1
- package/dist/typescript-templates.d.ts +1 -34
- package/dist/utils.d.ts +2 -1
- package/dist/validator.d.ts +1 -1
- package/dist/variable-extractor.d.ts +1 -1
- package/dist/view-composers.d.ts +1 -1
- package/dist/virtual-scrolling.d.ts +4 -1
- package/dist/visual-editor.d.ts +2 -30
- package/dist/visual-testing.d.ts +4 -1
- package/dist/vue-template.d.ts +1 -1
- package/dist/web-components/css-scoping.d.ts +1 -1
- package/dist/web-components/index.d.ts +10 -1
- package/dist/web-components/reactive-generator.d.ts +1 -1
- package/dist/web-components.d.ts +1 -1
- package/dist/x-element.d.ts +13 -6
- package/package.json +4 -4
package/dist/csp.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ export declare function getCspPreset(preset: CspPreset): CspConfig;
|
|
|
108
108
|
* // }
|
|
109
109
|
* ```
|
|
110
110
|
*/
|
|
111
|
-
export declare function mergeCspDirectives(base: CspDirectives,
|
|
111
|
+
export declare function mergeCspDirectives(base: CspDirectives, : CspDirectives): CspDirectives;
|
|
112
112
|
/**
|
|
113
113
|
* Inject CSP meta tag into HTML head
|
|
114
114
|
*
|
|
@@ -226,4 +226,4 @@ export declare const cspNonceDirective: CustomDirective;
|
|
|
226
226
|
/**
|
|
227
227
|
* Default CSP configuration - moderate preset
|
|
228
228
|
*/
|
|
229
|
-
export declare const defaultCspConfig: CspConfig;
|
|
229
|
+
export declare const defaultCspConfig: CspConfig;
|
package/dist/csrf.d.ts
CHANGED
|
@@ -25,4 +25,4 @@ export declare function processCsrfDirectives(template: string): string;
|
|
|
25
25
|
/**
|
|
26
26
|
* Middleware-like function to verify CSRF token
|
|
27
27
|
*/
|
|
28
|
-
export declare function verifyCsrfToken(token: string): boolean;
|
|
28
|
+
export declare function verifyCsrfToken(token: string): boolean;
|
|
@@ -2,4 +2,4 @@ import type { StxOptions } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Process all custom directives registered in the app
|
|
4
4
|
*/
|
|
5
|
-
export declare function processCustomDirectives(template: string, context: Record<string, any>, filePath: string, options: StxOptions): Promise<string>;
|
|
5
|
+
export declare function processCustomDirectives(template: string, context: Record<string, any>, filePath: string, options: StxOptions): Promise<string>;
|
package/dist/database.d.ts
CHANGED
|
@@ -249,6 +249,7 @@ export declare interface ModelInstance {
|
|
|
249
249
|
original: Row
|
|
250
250
|
attributes: Row
|
|
251
251
|
isDirty: (key?: string) => boolean
|
|
252
|
+
[key: string]: unknown
|
|
252
253
|
}
|
|
253
254
|
/**
|
|
254
255
|
* Model class
|
|
@@ -285,38 +286,25 @@ export declare interface DatabaseAdapter {
|
|
|
285
286
|
/**
|
|
286
287
|
* Supported database drivers
|
|
287
288
|
*/
|
|
288
|
-
export type DatabaseDriver = 'sqlite' | 'postgres' | 'mysql' | 'custom'
|
|
289
|
+
export type DatabaseDriver = 'sqlite' | 'postgres' | 'mysql' | 'custom';
|
|
289
290
|
/**
|
|
290
291
|
* Query operator types
|
|
291
292
|
*/
|
|
292
|
-
export type QueryOperator = '=' | '!=' | '<' | '<=' | '>' | '>=' | 'like' | 'in' | 'not in' | 'between' | 'is null' | 'is not null'
|
|
293
|
+
export type QueryOperator = '=' | '!=' | '<' | '<=' | '>' | '>=' | 'like' | 'in' | 'not in' | 'between' | 'is null' | 'is not null';
|
|
293
294
|
/**
|
|
294
295
|
* Query result row
|
|
295
296
|
*/
|
|
296
|
-
export type Row = Record<string, unknown
|
|
297
|
+
export type Row = Record<string, unknown>;
|
|
297
298
|
/**
|
|
298
299
|
* Fluent query builder class
|
|
299
300
|
*/
|
|
300
301
|
export declare class QueryBuilder {
|
|
301
|
-
private _table: string;
|
|
302
|
-
private _columns: (string | RawExpression)[];
|
|
303
|
-
private _wheres: WhereCondition[];
|
|
304
|
-
private _orders: OrderByClause[];
|
|
305
|
-
private _joins: JoinClause[];
|
|
306
|
-
private _groupBy: string[];
|
|
307
|
-
private _having: WhereCondition[];
|
|
308
|
-
private _limit?: number;
|
|
309
|
-
private _offset?: number;
|
|
310
|
-
private _distinct: boolean;
|
|
311
|
-
private _connection?: string;
|
|
312
|
-
private _bindings: unknown[];
|
|
313
|
-
private _modelDefinition?: ModelDefinition;
|
|
314
302
|
constructor(table?: string);
|
|
315
303
|
table(name: string): this;
|
|
316
304
|
from(name: string): this;
|
|
317
305
|
connection(name: string): this;
|
|
318
|
-
select(columns: (string | RawExpression)[]): this;
|
|
319
|
-
addSelect(columns: (string | RawExpression)[]): this;
|
|
306
|
+
select(...columns: (string | RawExpression)[]): this;
|
|
307
|
+
addSelect(...columns: (string | RawExpression)[]): this;
|
|
320
308
|
distinct(): this;
|
|
321
309
|
where(column: string, operatorOrValue: QueryOperator | unknown, value?: unknown): this;
|
|
322
310
|
orWhere(column: string, operatorOrValue: QueryOperator | unknown, value?: unknown): this;
|
|
@@ -331,7 +319,7 @@ export declare class QueryBuilder {
|
|
|
331
319
|
rightJoin(table: string, first: string, operator: string, second: string): this;
|
|
332
320
|
orderBy(column: string, direction?: 'asc' | 'desc'): this;
|
|
333
321
|
orderByDesc(column: string): this;
|
|
334
|
-
groupBy(columns: string[]): this;
|
|
322
|
+
groupBy(...columns: string[]): this;
|
|
335
323
|
having(column: string, operator: QueryOperator, value: unknown): this;
|
|
336
324
|
limit(count: number): this;
|
|
337
325
|
take(count: number): this;
|
|
@@ -359,8 +347,6 @@ export declare class QueryBuilder {
|
|
|
359
347
|
delete(): Promise<number>;
|
|
360
348
|
truncate(): Promise<void>;
|
|
361
349
|
toSql(): { sql: string, bindings: unknown[] };
|
|
362
|
-
private buildWhereClause(): string;
|
|
363
|
-
private getCacheKey(sql: string, bindings: unknown[]): string;
|
|
364
350
|
clone(): QueryBuilder;
|
|
365
351
|
}
|
|
366
352
|
/**
|
|
@@ -375,7 +361,6 @@ export declare class DatabaseError extends Error {
|
|
|
375
361
|
* Schema builder for database migrations
|
|
376
362
|
*/
|
|
377
363
|
export declare class SchemaBuilder {
|
|
378
|
-
private _connection?: string;
|
|
379
364
|
connection(name: string): this;
|
|
380
365
|
create(table: string, callback: (blueprint: Blueprint) => void): Promise<void>;
|
|
381
366
|
drop(table: string): Promise<void>;
|
|
@@ -386,9 +371,6 @@ export declare class SchemaBuilder {
|
|
|
386
371
|
* Table blueprint for schema definitions
|
|
387
372
|
*/
|
|
388
373
|
export declare class Blueprint {
|
|
389
|
-
private columns: string[];
|
|
390
|
-
private indices: string[];
|
|
391
|
-
private table: string;
|
|
392
374
|
constructor(table: string);
|
|
393
375
|
id(name?: string): this;
|
|
394
376
|
string(name: string, length?: number): this;
|
|
@@ -404,4 +386,4 @@ export declare class Blueprint {
|
|
|
404
386
|
unique(columns: string | string[]): this;
|
|
405
387
|
toCreateSQL(): string;
|
|
406
388
|
getIndexSQL(): string[];
|
|
407
|
-
}
|
|
389
|
+
}
|
package/dist/defer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Process @defer directives in template
|
|
3
3
|
*/
|
|
4
|
-
export declare function processDeferDirectives(template: string, _context: Record<string, unknown>, _filePath: string): string;
|
|
4
|
+
export declare function processDeferDirectives(template: string, _context: Record<string, unknown>, _filePath: string): string;
|
package/dist/deploy/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createNetlifyClient, collectDeployFiles, createFileManifest, filterRequiredFiles, formatSize, getTotalSize,
|
|
2
|
-
import { detectProjectConfig, createDefaultNetlifyConfig, generateNetlifyToml, writeNetlifyConfig, hasNetlifyConfig
|
|
1
|
+
import { createNetlifyClient, collectDeployFiles, createFileManifest, filterRequiredFiles, formatSize, getTotalSize, type NetlifyClient, type NetlifyDeploy, type DeployFile } from './netlify';
|
|
2
|
+
import { detectProjectConfig, createDefaultNetlifyConfig, generateNetlifyToml, writeNetlifyConfig, hasNetlifyConfig } from './config-generators';
|
|
3
3
|
export type {
|
|
4
4
|
NetlifyClient,
|
|
5
5
|
NetlifySite,
|
|
@@ -66,6 +66,9 @@ export declare class DeployError extends Error {
|
|
|
66
66
|
code: string;
|
|
67
67
|
constructor(message: string, code: string);
|
|
68
68
|
}
|
|
69
|
+
// ============================================================================
|
|
70
|
+
// Re-exports
|
|
71
|
+
// ============================================================================
|
|
69
72
|
export {
|
|
70
73
|
createNetlifyClient,
|
|
71
74
|
collectDeployFiles,
|
|
@@ -81,4 +84,4 @@ export {
|
|
|
81
84
|
createDefaultNetlifyConfig,
|
|
82
85
|
writeNetlifyConfig,
|
|
83
86
|
hasNetlifyConfig,
|
|
84
|
-
} from './config-generators';
|
|
87
|
+
} from './config-generators';
|
package/dist/deploy/netlify.d.ts
CHANGED
|
@@ -51,4 +51,14 @@ declare interface CrosswindConfig {
|
|
|
51
51
|
minify?: boolean
|
|
52
52
|
preflights?: unknown[]
|
|
53
53
|
safelist?: string[]
|
|
54
|
-
|
|
54
|
+
[key: string]: unknown
|
|
55
|
+
}
|
|
56
|
+
declare interface CrosswindBuildResult {
|
|
57
|
+
css: string
|
|
58
|
+
classes: Set<string>
|
|
59
|
+
duration: number
|
|
60
|
+
}
|
|
61
|
+
declare interface CSSGenerator {
|
|
62
|
+
generate(className: string): void
|
|
63
|
+
toCSS(preflight: boolean, minify: boolean): string
|
|
64
|
+
}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev Server Module
|
|
3
|
+
*
|
|
4
|
+
* This module provides a development server for STX templates and Markdown files.
|
|
5
|
+
* It has been split into focused sub-modules:
|
|
6
|
+
*
|
|
7
|
+
* - terminal-colors.ts - ANSI color codes for terminal output
|
|
8
|
+
* - crosswind.ts - Crosswind CSS generation
|
|
9
|
+
* - theme-selector.ts - Theme selector UI components
|
|
10
|
+
* - port-utils.ts - Port availability checking
|
|
11
|
+
* - native-window.ts - Native window handling
|
|
12
|
+
* - keyboard-shortcuts.ts - Keyboard shortcut handling
|
|
13
|
+
* - types.ts - Type definitions
|
|
14
|
+
*/
|
|
15
|
+
// Re-export all sub-modules
|
|
1
16
|
export * from './terminal-colors';
|
|
2
17
|
export * from './crosswind';
|
|
3
18
|
export * from './theme-selector';
|
|
4
19
|
export * from './port-utils';
|
|
5
20
|
export * from './native-window';
|
|
6
21
|
export * from './keyboard-shortcuts';
|
|
7
|
-
export * from './types';
|
|
22
|
+
export * from './types';
|
|
@@ -9,7 +9,7 @@ export declare function isPortAvailable(port: number): Promise<boolean>;
|
|
|
9
9
|
* @param maxAttempts - Maximum number of ports to try (default: 20)
|
|
10
10
|
* @throws Error if no available port is found within maxAttempts
|
|
11
11
|
*/
|
|
12
|
-
export declare function findAvailablePort(startPort: number, maxAttempts?:
|
|
12
|
+
export declare function findAvailablePort(startPort: number, maxAttempts?: number): Promise<number>;
|
|
13
13
|
/**
|
|
14
14
|
* Find an available port within a specific range
|
|
15
15
|
*/
|
|
@@ -24,4 +24,4 @@ export declare const DEFAULT_PORT: 3000;
|
|
|
24
24
|
export declare interface PortRange {
|
|
25
25
|
start: number
|
|
26
26
|
end: number
|
|
27
|
-
}
|
|
27
|
+
}
|
|
@@ -27,16 +27,13 @@ export declare function dim(text: string): string;
|
|
|
27
27
|
* Provides consistent coloring for CLI messages
|
|
28
28
|
*/
|
|
29
29
|
export declare const colors: {
|
|
30
|
-
// Reset
|
|
31
30
|
reset: '\x1B[0m';
|
|
32
|
-
// Text styles
|
|
33
31
|
bright: '\x1B[1m';
|
|
34
32
|
dim: '\x1B[2m';
|
|
35
33
|
underscore: '\x1B[4m';
|
|
36
34
|
blink: '\x1B[5m';
|
|
37
35
|
reverse: '\x1B[7m';
|
|
38
36
|
hidden: '\x1B[8m';
|
|
39
|
-
// Foreground colors
|
|
40
37
|
black: '\x1B[30m';
|
|
41
38
|
red: '\x1B[31m';
|
|
42
39
|
green: '\x1B[32m';
|
|
@@ -46,7 +43,6 @@ export declare const colors: {
|
|
|
46
43
|
cyan: '\x1B[36m';
|
|
47
44
|
white: '\x1B[37m';
|
|
48
45
|
gray: '\x1B[90m';
|
|
49
|
-
// Background colors
|
|
50
46
|
bgBlack: '\x1B[40m';
|
|
51
47
|
bgRed: '\x1B[41m';
|
|
52
48
|
bgGreen: '\x1B[42m';
|
|
@@ -57,4 +53,4 @@ export declare const colors: {
|
|
|
57
53
|
bgWhite: '\x1B[47m';
|
|
58
54
|
bgGray: '\x1B[100m'
|
|
59
55
|
};
|
|
60
|
-
export type ColorName = keyof typeof colors
|
|
56
|
+
export type ColorName = keyof typeof colors;
|
|
@@ -29,4 +29,4 @@ export declare function isDarkTheme(themeName: string): boolean;
|
|
|
29
29
|
/**
|
|
30
30
|
* List of dark theme keywords for theme detection
|
|
31
31
|
*/
|
|
32
|
-
export declare const DARK_THEME_KEYWORDS: readonly ['dark', 'night', 'monokai', 'dracula', 'nord', 'material', 'ayu', 'one-dark', 'tokyo', 'gruvbox', 'solarized-dark'];
|
|
32
|
+
export declare const DARK_THEME_KEYWORDS: readonly ['dark', 'night', 'monokai', 'dracula', 'nord', 'material', 'ayu', 'one-dark', 'tokyo', 'gruvbox', 'solarized-dark'];
|
|
@@ -44,15 +44,10 @@ export declare const DEFAULT_DEV_OPTIONS: Required<Omit<DevServerOptions, 'stxOp
|
|
|
44
44
|
*/
|
|
45
45
|
export declare interface MarkdownOptions {
|
|
46
46
|
syntaxHighlighting?: {
|
|
47
|
-
/** Enable server-side syntax highlighting */
|
|
48
47
|
serverSide?: boolean
|
|
49
|
-
/** Enable syntax highlighting (default: true) */
|
|
50
48
|
enabled?: boolean
|
|
51
|
-
/** Default theme for code blocks */
|
|
52
49
|
defaultTheme?: SyntaxHighlightTheme
|
|
53
|
-
/** Highlight code blocks with unknown languages */
|
|
54
50
|
highlightUnknownLanguages?: boolean
|
|
55
|
-
/** Additional themes to make available */
|
|
56
51
|
additionalThemes?: SyntaxHighlightTheme[]
|
|
57
52
|
}
|
|
58
53
|
}
|
|
@@ -81,12 +76,12 @@ export declare interface ServerInstance {
|
|
|
81
76
|
/**
|
|
82
77
|
* File watcher event types
|
|
83
78
|
*/
|
|
84
|
-
export type WatchEventType = 'change' | 'rename' | 'delete' | 'add'
|
|
79
|
+
export type WatchEventType = 'change' | 'rename' | 'delete' | 'add';
|
|
85
80
|
/**
|
|
86
81
|
* File watcher callback
|
|
87
82
|
*/
|
|
88
|
-
export type WatchCallback = (eventType: WatchEventType, filename: string) => void
|
|
83
|
+
export type WatchCallback = (eventType: WatchEventType, filename: string) => void;
|
|
89
84
|
/**
|
|
90
85
|
* Route handler function
|
|
91
86
|
*/
|
|
92
|
-
export type RouteHandler = (request: Request) => Promise<Response> | Response
|
|
87
|
+
export type RouteHandler = (request: Request) => Promise<Response> | Response;
|
package/dist/dev-server.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { } from './dev-server/index';
|
|
2
|
-
import { } from './hot-reload';
|
|
3
|
-
import { } from './route-middleware';
|
|
4
1
|
import type { SyntaxHighlightTheme } from './types';
|
|
5
2
|
// Build and serve a specific stx file
|
|
6
3
|
export declare function serveStxFile(filePath: string, options?: DevServerOptions): Promise<boolean>;
|
|
@@ -40,4 +37,4 @@ export declare interface DevServerOptions {
|
|
|
40
37
|
cache?: boolean
|
|
41
38
|
hotReload?: boolean
|
|
42
39
|
hmrPort?: number
|
|
43
|
-
}
|
|
40
|
+
}
|
package/dist/devtools.d.ts
CHANGED
|
@@ -129,6 +129,9 @@ export declare interface DevToolsState {
|
|
|
129
129
|
maxEvents: number
|
|
130
130
|
maxPerformance: number
|
|
131
131
|
}
|
|
132
|
+
// =============================================================================
|
|
133
|
+
// Exports
|
|
134
|
+
// =============================================================================
|
|
132
135
|
export {
|
|
133
136
|
devToolsState,
|
|
134
137
|
selectComponent,
|
|
@@ -139,4 +142,4 @@ export {
|
|
|
139
142
|
logComponentTree,
|
|
140
143
|
logStoreState,
|
|
141
144
|
timeTravel,
|
|
142
|
-
};
|
|
145
|
+
};
|
package/dist/directive-api.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare function unregisterDirective(name: string): boolean;
|
|
|
50
50
|
* })
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
export declare function defineDirective<P extends DirectiveParams = DirectiveParams, T = unknown
|
|
53
|
+
export declare function defineDirective<P extends DirectiveParams = DirectiveParams, T = unknown,>(definition: FullDirectiveDefinition<P, T>): CustomDirective;
|
|
54
54
|
/**
|
|
55
55
|
* Define a client-only directive.
|
|
56
56
|
*/
|
|
@@ -104,8 +104,8 @@ export declare interface ClientDirectiveDefinition<T = unknown> {
|
|
|
104
104
|
unmounted?: (el: HTMLElement, binding: DirectiveBinding<T>) => void
|
|
105
105
|
}
|
|
106
106
|
/** Combined directive (server + client) */
|
|
107
|
-
export declare interface FullDirectiveDefinition<P extends DirectiveParams = DirectiveParams, T = unknown
|
|
107
|
+
export declare interface FullDirectiveDefinition<P extends DirectiveParams = DirectiveParams, T = unknown,> extends DirectiveDefinition<P> {
|
|
108
108
|
client?: ClientDirectiveDefinition<T>
|
|
109
109
|
}
|
|
110
110
|
/** Directive parameter types */
|
|
111
|
-
export type DirectiveParams = Record<string, unknown
|
|
111
|
+
export type DirectiveParams = Record<string, unknown>;
|
package/dist/docs.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare function extractComponentDescription(componentPath: string): Prom
|
|
|
11
11
|
/**
|
|
12
12
|
* Generate documentation for a component
|
|
13
13
|
*/
|
|
14
|
-
export declare function generateComponentDoc(componentPath: string, isWebComponent?:
|
|
14
|
+
export declare function generateComponentDoc(componentPath: string, isWebComponent?: boolean, webComponentTag?: string): Promise<ComponentDoc>;
|
|
15
15
|
/**
|
|
16
16
|
* Find all component files in a directory
|
|
17
17
|
*/
|
|
@@ -53,4 +53,4 @@ export declare function generateDocs(options: {
|
|
|
53
53
|
/**
|
|
54
54
|
* Documentation generation command handler for CLI
|
|
55
55
|
*/
|
|
56
|
-
export declare function docsCommand(options: any): Promise<boolean>;
|
|
56
|
+
export declare function docsCommand(options: any): Promise<boolean>;
|
|
@@ -11,4 +11,4 @@ import type { StxOptions } from './types';
|
|
|
11
11
|
* @param dependencies - Dependency tracking set
|
|
12
12
|
* @returns Processed template with dynamic components resolved
|
|
13
13
|
*/
|
|
14
|
-
export declare function processDynamicComponents(template: string, context: Record<string, any>, filePath: string, options: StxOptions, dependencies?: Set<string>): Promise<string>;
|
|
14
|
+
export declare function processDynamicComponents(template: string, context: Record<string, any>, filePath: string, options: StxOptions, dependencies?: Set<string>): Promise<string>;
|
package/dist/edge-runtime.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export declare function redirect(url: string, status?: 301 | 302 | 303 | 307 | 3
|
|
|
83
83
|
/**
|
|
84
84
|
* Not found response helper.
|
|
85
85
|
*/
|
|
86
|
-
export declare function notFound(message?:
|
|
86
|
+
export declare function notFound(message?: string): Response;
|
|
87
87
|
/** Edge runtime detection result */
|
|
88
88
|
export declare interface RuntimeInfo {
|
|
89
89
|
platform: EdgePlatform
|
|
@@ -191,10 +191,10 @@ export type EdgePlatform = | 'cloudflare'
|
|
|
191
191
|
| 'fastly'
|
|
192
192
|
| 'node'
|
|
193
193
|
| 'bun'
|
|
194
|
-
| 'unknown'
|
|
194
|
+
| 'unknown';
|
|
195
195
|
/** Middleware function */
|
|
196
196
|
export type EdgeMiddleware = (
|
|
197
197
|
request: Request,
|
|
198
198
|
context: EdgeContext,
|
|
199
199
|
next: () => Promise<Response>
|
|
200
|
-
) => Promise<Response
|
|
200
|
+
) => Promise<Response>;
|
package/dist/env.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export declare function isProduction(): boolean;
|
|
|
6
6
|
* Returns true when NOT in production mode, or when debug is enabled.
|
|
7
7
|
* This covers development, test, and unset environments.
|
|
8
8
|
*/
|
|
9
|
-
export declare function isDevelopment(): boolean;
|
|
9
|
+
export declare function isDevelopment(): boolean;
|
package/dist/error-handling.d.ts
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Error Handling Module
|
|
3
|
+
*
|
|
4
|
+
* This module has been refactored into smaller, more focused files.
|
|
5
|
+
* All exports are re-exported from the errors/ directory.
|
|
6
|
+
*
|
|
7
|
+
* @module error-handling
|
|
8
|
+
* @see ./errors/codes.ts - Error codes and localized messages
|
|
9
|
+
* @see ./errors/types.ts - Error classes and configuration
|
|
10
|
+
* @see ./errors/formatter.ts - Error formatting utilities
|
|
11
|
+
* @see ./errors/sanitizer.ts - Parameter sanitization
|
|
12
|
+
* @see ./errors/logger.ts - Error logging and recovery
|
|
13
|
+
*/
|
|
14
|
+
export * from './errors';
|
package/dist/errors/codes.d.ts
CHANGED
|
@@ -40,50 +40,35 @@ export declare function getErrorCodeName(code: number): string | undefined;
|
|
|
40
40
|
* - 1600-1699: Expression errors
|
|
41
41
|
*/
|
|
42
42
|
export declare const ErrorCodes: {
|
|
43
|
-
// Syntax errors (1000-1099)
|
|
44
43
|
UNCLOSED_DIRECTIVE: 1001;
|
|
45
44
|
UNCLOSED_EXPRESSION: 1002;
|
|
46
45
|
INVALID_DIRECTIVE_SYNTAX: 1003;
|
|
47
46
|
MALFORMED_EXPRESSION: 1004;
|
|
48
47
|
UNEXPECTED_TOKEN: 1005;
|
|
49
|
-
// Runtime errors (1100-1199)
|
|
50
48
|
UNDEFINED_VARIABLE: 1101;
|
|
51
49
|
TYPE_ERROR: 1102;
|
|
52
50
|
EVALUATION_ERROR: 1103;
|
|
53
51
|
INFINITE_LOOP: 1104;
|
|
54
52
|
CIRCULAR_REFERENCE: 1105;
|
|
55
|
-
// Security errors (1200-1299)
|
|
56
53
|
UNSAFE_EXPRESSION: 1201;
|
|
57
54
|
PATH_TRAVERSAL: 1202;
|
|
58
55
|
XSS_ATTEMPT: 1203;
|
|
59
56
|
CODE_INJECTION: 1204;
|
|
60
57
|
DOM_API_VIOLATION: 1205;
|
|
61
|
-
// File errors (1300-1399)
|
|
62
58
|
FILE_NOT_FOUND: 1301;
|
|
63
59
|
FILE_READ_ERROR: 1302;
|
|
64
60
|
INVALID_FILE_PATH: 1303;
|
|
65
61
|
PERMISSION_DENIED: 1304;
|
|
66
|
-
// Configuration errors (1400-1499)
|
|
67
62
|
INVALID_CONFIG: 1401;
|
|
68
63
|
MISSING_REQUIRED_CONFIG: 1402;
|
|
69
64
|
DEPRECATED_CONFIG: 1403;
|
|
70
|
-
// Component errors (1500-1599)
|
|
71
65
|
COMPONENT_NOT_FOUND: 1501;
|
|
72
66
|
INVALID_PROPS: 1502;
|
|
73
67
|
COMPONENT_RENDER_ERROR: 1503;
|
|
74
|
-
// Expression errors (1600-1699)
|
|
75
68
|
FILTER_NOT_FOUND: 1601;
|
|
76
69
|
INVALID_FILTER_ARGS: 1602;
|
|
77
70
|
EXPRESSION_TIMEOUT: 1603
|
|
78
71
|
};
|
|
79
|
-
/**
|
|
80
|
-
* Error Codes and Localized Messages
|
|
81
|
-
*
|
|
82
|
-
* Provides numeric error codes for programmatic error handling
|
|
83
|
-
* and localized error message templates.
|
|
84
|
-
*
|
|
85
|
-
* @module errors/codes
|
|
86
|
-
*/
|
|
87
72
|
/**
|
|
88
73
|
* Error message template with placeholder support
|
|
89
74
|
* Placeholders use {{name}} syntax
|
|
@@ -95,5 +80,5 @@ export declare interface ErrorMessageTemplate {
|
|
|
95
80
|
/**
|
|
96
81
|
* Localized error messages by error code
|
|
97
82
|
*/
|
|
98
|
-
export type ErrorMessages = Record<number, ErrorMessageTemplate
|
|
99
|
-
export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes]
|
|
83
|
+
export type ErrorMessages = Record<number, ErrorMessageTemplate>;
|
|
84
|
+
export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes];
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error Handling Module
|
|
3
|
+
*
|
|
4
|
+
* Provides comprehensive error handling utilities for the stx framework.
|
|
5
|
+
*
|
|
6
|
+
* @module errors
|
|
7
|
+
*/
|
|
8
|
+
// Error codes and localization
|
|
1
9
|
export {
|
|
2
10
|
clearErrorMessages,
|
|
3
11
|
type ErrorCode,
|
|
@@ -11,6 +19,7 @@ export {
|
|
|
11
19
|
registerErrorMessages,
|
|
12
20
|
setErrorLocale,
|
|
13
21
|
} from './codes';
|
|
22
|
+
// Error formatting
|
|
14
23
|
export {
|
|
15
24
|
consoleError,
|
|
16
25
|
createEnhancedError,
|
|
@@ -22,6 +31,7 @@ export {
|
|
|
22
31
|
safeExecuteAsync,
|
|
23
32
|
type StandardizedError,
|
|
24
33
|
} from './formatter';
|
|
34
|
+
// Logger and recovery
|
|
25
35
|
export {
|
|
26
36
|
devHelpers,
|
|
27
37
|
type ErrorLogEntry,
|
|
@@ -30,6 +40,7 @@ export {
|
|
|
30
40
|
type ErrorLoggerOptions,
|
|
31
41
|
errorRecovery,
|
|
32
42
|
} from './logger';
|
|
43
|
+
// Sanitization
|
|
33
44
|
export {
|
|
34
45
|
sanitizeComponentProps,
|
|
35
46
|
sanitizeDirectiveParam,
|
|
@@ -40,6 +51,7 @@ export {
|
|
|
40
51
|
type SanitizeOptions,
|
|
41
52
|
validators,
|
|
42
53
|
} from './sanitizer';
|
|
54
|
+
// Error types and classes
|
|
43
55
|
export {
|
|
44
56
|
configureErrorHandling,
|
|
45
57
|
type ErrorConfig,
|
|
@@ -53,4 +65,4 @@ export {
|
|
|
53
65
|
StxSecurityError,
|
|
54
66
|
StxSyntaxError,
|
|
55
67
|
StxValidationError,
|
|
56
|
-
} from './types';
|
|
68
|
+
} from './types';
|
package/dist/errors/logger.d.ts
CHANGED
|
@@ -47,23 +47,10 @@ export declare interface DevHelpers {
|
|
|
47
47
|
* Error logging and monitoring with optional file persistence
|
|
48
48
|
*/
|
|
49
49
|
export declare class ErrorLogger {
|
|
50
|
-
private errors: ErrorLogEntry[];
|
|
51
|
-
private maxErrors: number;
|
|
52
|
-
private enableFileLogging: boolean;
|
|
53
|
-
private logFilePath: string;
|
|
54
|
-
private logFormat: 'json' | 'text';
|
|
55
|
-
private maxFileSize: number;
|
|
56
|
-
private maxLogFiles: number;
|
|
57
|
-
private minLevel: 'all' | 'error' | 'warning';
|
|
58
|
-
private writeQueue: Promise<void>;
|
|
59
50
|
constructor(options?: ErrorLoggerOptions);
|
|
60
51
|
configure(options: ErrorLoggerOptions): void;
|
|
61
52
|
log(error: Error, context?: unknown, level?: 'error' | 'warning' | 'info'): void;
|
|
62
|
-
|
|
63
|
-
private formatEntry(entry: ErrorLogEntry): string;
|
|
64
|
-
private writeToFile(entry: ErrorLogEntry): void;
|
|
65
|
-
private rotateIfNeeded(fs: typeof import('node:fs')): Promise<void>;
|
|
66
|
-
getRecentErrors(limit?: any): ErrorLogEntry[];
|
|
53
|
+
getRecentErrors(limit?: number): ErrorLogEntry[];
|
|
67
54
|
getErrorsByType(errorType: string): ErrorLogEntry[];
|
|
68
55
|
getErrorsByLevel(level: 'error' | 'warning' | 'info'): ErrorLogEntry[];
|
|
69
56
|
clear(): void;
|
|
@@ -71,4 +58,4 @@ export declare class ErrorLogger {
|
|
|
71
58
|
getStats(): { total: number, byType: Record<string, number>, byLevel: Record<string, number> };
|
|
72
59
|
exportToFile(filePath: string, format?: 'json' | 'text'): Promise<void>;
|
|
73
60
|
flush(): Promise<void>;
|
|
74
|
-
}
|
|
61
|
+
}
|
package/dist/errors/types.d.ts
CHANGED
|
@@ -76,4 +76,4 @@ export declare class StxFileError extends StxError {
|
|
|
76
76
|
export declare class StxValidationError extends StxError {
|
|
77
77
|
readonly isFatal: boolean;
|
|
78
78
|
constructor(message: string, filePath?: string, line?: number, column?: number, context?: string, numericCode?: ErrorCode);
|
|
79
|
-
}
|
|
79
|
+
}
|
package/dist/events.d.ts
CHANGED