snice 2.2.2 → 2.2.3
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/index.cjs +163 -129
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +163 -129
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +163 -129
- package/dist/index.iife.js.map +1 -1
- package/dist/symbols.cjs.map +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/symbols.esm.js.map +1 -1
- package/dist/transitions.cjs.map +1 -1
- package/dist/transitions.esm.js +1 -1
- package/dist/transitions.esm.js.map +1 -1
- package/dist/types/controller.d.ts +1 -7
- package/dist/types/element.d.ts +3 -44
- package/dist/types/events.d.ts +2 -26
- package/dist/types/global.d.ts +1 -5
- package/dist/types/index.d.ts +2 -8
- package/dist/types/observe.d.ts +1 -16
- package/dist/types/request-response.d.ts +2 -28
- package/dist/types/router.d.ts +2 -81
- package/dist/types/transitions.d.ts +2 -30
- package/dist/types/types/DispatchOptions.d.ts +10 -0
- package/dist/types/types/IController.d.ts +8 -0
- package/dist/types/types/ObserveOptions.d.ts +16 -0
- package/dist/types/types/OnOptions.d.ts +16 -0
- package/dist/types/types/PageOptions.d.ts +30 -0
- package/dist/types/types/PartOptions.d.ts +4 -0
- package/dist/types/types/PropertyConverter.d.ts +4 -0
- package/dist/types/types/PropertyOptions.d.ts +9 -0
- package/dist/types/types/QueryOptions.d.ts +4 -0
- package/dist/types/types/RequestOptions.d.ts +18 -0
- package/dist/types/types/RespondOptions.d.ts +10 -0
- package/dist/types/types/RouterInstance.d.ts +10 -0
- package/dist/types/types/RouterOptions.d.ts +32 -0
- package/dist/types/types/SimpleArray.d.ts +17 -0
- package/dist/types/types/SniceElement.d.ts +8 -0
- package/dist/types/types/SniceGlobal.d.ts +5 -0
- package/dist/types/types/Transition.d.ts +33 -0
- package/dist/types/types/index.d.ts +17 -0
- package/dist/types/utils.d.ts +16 -0
- package/package.json +2 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './QueryOptions';
|
|
2
|
+
export * from './PropertyOptions';
|
|
3
|
+
export * from './PropertyConverter';
|
|
4
|
+
export * from './SniceElement';
|
|
5
|
+
export * from './PartOptions';
|
|
6
|
+
export * from './SimpleArray';
|
|
7
|
+
export * from './RouterOptions';
|
|
8
|
+
export * from './PageOptions';
|
|
9
|
+
export * from './RouterInstance';
|
|
10
|
+
export * from './OnOptions';
|
|
11
|
+
export * from './DispatchOptions';
|
|
12
|
+
export * from './IController';
|
|
13
|
+
export * from './Transition';
|
|
14
|
+
export * from './ObserveOptions';
|
|
15
|
+
export * from './RequestOptions';
|
|
16
|
+
export * from './RespondOptions';
|
|
17
|
+
export * from './SniceGlobal';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropertyOptions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Detects the type constructor from an initial value
|
|
4
|
+
* @param initialValue - The default value assigned to a property field (e.g., `name = "default"` -> "default")
|
|
5
|
+
* @returns The constructor function (String, Number, Boolean, etc.) or undefined if type can't be determined
|
|
6
|
+
*/
|
|
7
|
+
export declare function detectType(initialValue: any): any;
|
|
8
|
+
/**
|
|
9
|
+
* Parses an attribute value based on the property type
|
|
10
|
+
* @param attributeValue - The raw string value from the HTML attribute (e.g., "123", "true", "hello")
|
|
11
|
+
* @param propertyOptions - The options from @property decorator (contains explicit type, attribute name, etc.)
|
|
12
|
+
* @param currentValue - The current stored value of the property (used for type inference when no explicit type)
|
|
13
|
+
* @param initialValue - The default value assigned to the property field (used for type detection as fallback)
|
|
14
|
+
* @returns The parsed value in the correct JavaScript type
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseAttributeValue(attributeValue: string | null, propertyOptions: PropertyOptions, currentValue?: any, initialValue?: any): any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snice",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Imperative TypeScript framework for building vanilla web components with decorators, routing, and controllers. No virtual DOM, no build complexity.",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -83,8 +83,7 @@
|
|
|
83
83
|
"test:watch": "vitest",
|
|
84
84
|
"test:ui": "vitest --ui",
|
|
85
85
|
"test:coverage": "vitest --coverage",
|
|
86
|
-
"
|
|
87
|
-
"prerelease": "npm run build && npm run test:publish",
|
|
86
|
+
"prerelease": "npm run build",
|
|
88
87
|
"release": "semantic-release --no-ci",
|
|
89
88
|
"release:dry": "semantic-release --dry-run --no-ci"
|
|
90
89
|
},
|