juxscript 1.1.88 → 1.1.89
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/dom-structure-map.json +1 -1
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js +6 -6
- package/lib/components/stack/HStack.d.ts +5 -0
- package/lib/components/stack/HStack.d.ts.map +1 -1
- package/lib/components/stack/HStack.js +14 -0
- package/lib/components/stack/HStack.ts +17 -0
- package/lib/components/stack/VStack.d.ts +5 -0
- package/lib/components/stack/VStack.d.ts.map +1 -1
- package/lib/components/stack/VStack.js +16 -0
- package/lib/components/stack/VStack.ts +19 -0
- package/lib/components/stack/ZStack.d.ts +5 -0
- package/lib/components/stack/ZStack.d.ts.map +1 -1
- package/lib/components/stack/ZStack.js +14 -0
- package/lib/components/stack/ZStack.ts +17 -0
- package/package.json +1 -1
package/dom-structure-map.json
CHANGED
package/index.d.ts
CHANGED
|
@@ -46,9 +46,9 @@ import { registry } from './lib/components/registry.js';
|
|
|
46
46
|
import { stateHistory } from './lib/components/history/StateHistory.js';
|
|
47
47
|
import { watcher } from './lib/components/watcher.js';
|
|
48
48
|
export { state, registry, stateHistory };
|
|
49
|
-
import { vstack } from './lib/components/stack/VStack.js';
|
|
50
|
-
import { hstack } from './lib/components/stack/HStack.js';
|
|
51
|
-
import { zstack } from './lib/components/stack/ZStack.js';
|
|
49
|
+
import { VStack, vstack } from './lib/components/stack/VStack.js';
|
|
50
|
+
import { HStack, hstack } from './lib/components/stack/HStack.js';
|
|
51
|
+
import { ZStack, zstack } from './lib/components/stack/ZStack.js';
|
|
52
52
|
export declare const jux: {
|
|
53
53
|
alert: typeof alert;
|
|
54
54
|
app: typeof app;
|
|
@@ -207,5 +207,5 @@ export declare const jux: {
|
|
|
207
207
|
getOrCreateContainer: typeof getOrCreateContainer;
|
|
208
208
|
watcher: typeof watcher;
|
|
209
209
|
};
|
|
210
|
-
export { vstack, hstack, zstack };
|
|
210
|
+
export { VStack, HStack, ZStack, vstack, hstack, zstack };
|
|
211
211
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MA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,UAAU,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AAGzC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAGlE,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDf,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC"}
|
package/index.js
CHANGED
|
@@ -48,10 +48,10 @@ import { registry } from './lib/components/registry.js'; // ✅ Import registry
|
|
|
48
48
|
import { stateHistory } from './lib/components/history/StateHistory.js'; // ✅ Import history
|
|
49
49
|
import { watcher } from './lib/components/watcher.js';
|
|
50
50
|
export { state, registry, stateHistory }; // ✅ Export history
|
|
51
|
-
// ✅ Import Stack components
|
|
52
|
-
import { vstack } from './lib/components/stack/VStack.js';
|
|
53
|
-
import { hstack } from './lib/components/stack/HStack.js';
|
|
54
|
-
import { zstack } from './lib/components/stack/ZStack.js';
|
|
51
|
+
// ✅ Import Stack components (already added earlier)
|
|
52
|
+
import { VStack, vstack } from './lib/components/stack/VStack.js';
|
|
53
|
+
import { HStack, hstack } from './lib/components/stack/HStack.js';
|
|
54
|
+
import { ZStack, zstack } from './lib/components/stack/ZStack.js';
|
|
55
55
|
// Utilities
|
|
56
56
|
export const jux = {
|
|
57
57
|
alert,
|
|
@@ -107,5 +107,5 @@ export const jux = {
|
|
|
107
107
|
getOrCreateContainer,
|
|
108
108
|
watcher
|
|
109
109
|
};
|
|
110
|
-
// ✅ Export Stack
|
|
111
|
-
export { vstack, hstack, zstack };
|
|
110
|
+
// ✅ Export Stack classes for .create() usage
|
|
111
|
+
export { VStack, HStack, ZStack, vstack, hstack, zstack };
|
|
@@ -6,6 +6,11 @@ import { BaseStack, StackOptions } from './BaseStack.js';
|
|
|
6
6
|
export declare class HStack extends BaseStack {
|
|
7
7
|
protected baseClassName: string;
|
|
8
8
|
constructor(id: string, children: Record<string, any> | any[], options?: StackOptions);
|
|
9
|
+
/**
|
|
10
|
+
* ✅ Static create method with auto-render
|
|
11
|
+
* Allows: hstack.create({ children }, options).padding('20px').render()
|
|
12
|
+
*/
|
|
13
|
+
static create(children: Record<string, any> | any[], options?: StackOptions): HStack;
|
|
9
14
|
}
|
|
10
15
|
export declare function hstack(id: string, children: Record<string, any> | any[], options?: StackOptions): HStack;
|
|
11
16
|
//# sourceMappingURL=HStack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HStack.d.ts","sourceRoot":"","sources":["HStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACjC,SAAS,CAAC,aAAa,SAAgB;gBAE3B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB;
|
|
1
|
+
{"version":3,"file":"HStack.d.ts","sourceRoot":"","sources":["HStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACjC,SAAS,CAAC,aAAa,SAAgB;gBAE3B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB;IAIzF;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB,GAAG,MAAM;CAY3F;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB,GAAG,MAAM,CAE5G"}
|
|
@@ -8,6 +8,20 @@ export class HStack extends BaseStack {
|
|
|
8
8
|
super(id, children, options);
|
|
9
9
|
this.baseClassName = 'jux-hstack';
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* ✅ Static create method with auto-render
|
|
13
|
+
* Allows: hstack.create({ children }, options).padding('20px').render()
|
|
14
|
+
*/
|
|
15
|
+
static create(children, options = {}) {
|
|
16
|
+
const id = `hstack-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
17
|
+
const instance = new HStack(id, children, options);
|
|
18
|
+
queueMicrotask(() => {
|
|
19
|
+
if (!instance.container) {
|
|
20
|
+
instance.render('app');
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return instance;
|
|
24
|
+
}
|
|
11
25
|
}
|
|
12
26
|
export function hstack(id, children, options = {}) {
|
|
13
27
|
return new HStack(id, children, options);
|
|
@@ -10,6 +10,23 @@ export class HStack extends BaseStack {
|
|
|
10
10
|
constructor(id: string, children: Record<string, any> | any[], options: StackOptions = {}) {
|
|
11
11
|
super(id, children, options);
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* ✅ Static create method with auto-render
|
|
16
|
+
* Allows: hstack.create({ children }, options).padding('20px').render()
|
|
17
|
+
*/
|
|
18
|
+
static create(children: Record<string, any> | any[], options: StackOptions = {}): HStack {
|
|
19
|
+
const id = `hstack-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
20
|
+
const instance = new HStack(id, children, options);
|
|
21
|
+
|
|
22
|
+
queueMicrotask(() => {
|
|
23
|
+
if (!instance.container) {
|
|
24
|
+
instance.render('app');
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return instance;
|
|
29
|
+
}
|
|
13
30
|
}
|
|
14
31
|
|
|
15
32
|
export function hstack(id: string, children: Record<string, any> | any[], options: StackOptions = {}): HStack {
|
|
@@ -6,6 +6,11 @@ import { BaseStack, StackOptions } from './BaseStack.js';
|
|
|
6
6
|
export declare class VStack extends BaseStack {
|
|
7
7
|
protected baseClassName: string;
|
|
8
8
|
constructor(id: string, children: Record<string, any> | any[], options?: StackOptions);
|
|
9
|
+
/**
|
|
10
|
+
* ✅ Static create method with auto-render
|
|
11
|
+
* Allows: vstack.create({ children }, options).padding('20px').render()
|
|
12
|
+
*/
|
|
13
|
+
static create(children: Record<string, any> | any[], options?: StackOptions): VStack;
|
|
9
14
|
}
|
|
10
15
|
export declare function vstack(id: string, children: Record<string, any> | any[], options?: StackOptions): VStack;
|
|
11
16
|
//# sourceMappingURL=VStack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VStack.d.ts","sourceRoot":"","sources":["VStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACjC,SAAS,CAAC,aAAa,SAAgB;gBAE3B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB;
|
|
1
|
+
{"version":3,"file":"VStack.d.ts","sourceRoot":"","sources":["VStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACjC,SAAS,CAAC,aAAa,SAAgB;gBAE3B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB;IAIzF;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB,GAAG,MAAM;CAc3F;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB,GAAG,MAAM,CAE5G"}
|
|
@@ -8,6 +8,22 @@ export class VStack extends BaseStack {
|
|
|
8
8
|
super(id, children, options);
|
|
9
9
|
this.baseClassName = 'jux-vstack';
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* ✅ Static create method with auto-render
|
|
13
|
+
* Allows: vstack.create({ children }, options).padding('20px').render()
|
|
14
|
+
*/
|
|
15
|
+
static create(children, options = {}) {
|
|
16
|
+
// Generate unique ID for anonymous stacks
|
|
17
|
+
const id = `vstack-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
18
|
+
const instance = new VStack(id, children, options);
|
|
19
|
+
// Auto-render after microtask to allow chaining
|
|
20
|
+
queueMicrotask(() => {
|
|
21
|
+
if (!instance.container) {
|
|
22
|
+
instance.render('app');
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return instance;
|
|
26
|
+
}
|
|
11
27
|
}
|
|
12
28
|
export function vstack(id, children, options = {}) {
|
|
13
29
|
return new VStack(id, children, options);
|
|
@@ -10,6 +10,25 @@ export class VStack extends BaseStack {
|
|
|
10
10
|
constructor(id: string, children: Record<string, any> | any[], options: StackOptions = {}) {
|
|
11
11
|
super(id, children, options);
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* ✅ Static create method with auto-render
|
|
16
|
+
* Allows: vstack.create({ children }, options).padding('20px').render()
|
|
17
|
+
*/
|
|
18
|
+
static create(children: Record<string, any> | any[], options: StackOptions = {}): VStack {
|
|
19
|
+
// Generate unique ID for anonymous stacks
|
|
20
|
+
const id = `vstack-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
21
|
+
const instance = new VStack(id, children, options);
|
|
22
|
+
|
|
23
|
+
// Auto-render after microtask to allow chaining
|
|
24
|
+
queueMicrotask(() => {
|
|
25
|
+
if (!instance.container) {
|
|
26
|
+
instance.render('app');
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return instance;
|
|
31
|
+
}
|
|
13
32
|
}
|
|
14
33
|
|
|
15
34
|
export function vstack(id: string, children: Record<string, any> | any[], options: StackOptions = {}): VStack {
|
|
@@ -6,6 +6,11 @@ import { BaseStack, StackOptions } from './BaseStack.js';
|
|
|
6
6
|
export declare class ZStack extends BaseStack {
|
|
7
7
|
protected baseClassName: string;
|
|
8
8
|
constructor(id: string, children: Record<string, any> | any[], options?: StackOptions);
|
|
9
|
+
/**
|
|
10
|
+
* ✅ Static create method with auto-render
|
|
11
|
+
* Allows: zstack.create({ children }, options).cascade(30).render()
|
|
12
|
+
*/
|
|
13
|
+
static create(children: Record<string, any> | any[], options?: StackOptions): ZStack;
|
|
9
14
|
}
|
|
10
15
|
export declare function zstack(id: string, children: Record<string, any> | any[], options?: StackOptions): ZStack;
|
|
11
16
|
//# sourceMappingURL=ZStack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZStack.d.ts","sourceRoot":"","sources":["ZStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACjC,SAAS,CAAC,aAAa,SAAgB;gBAE3B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB;
|
|
1
|
+
{"version":3,"file":"ZStack.d.ts","sourceRoot":"","sources":["ZStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;GAGG;AACH,qBAAa,MAAO,SAAQ,SAAS;IACjC,SAAS,CAAC,aAAa,SAAgB;gBAE3B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB;IAIzF;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB,GAAG,MAAM;CAY3F;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,OAAO,GAAE,YAAiB,GAAG,MAAM,CAE5G"}
|
|
@@ -8,6 +8,20 @@ export class ZStack extends BaseStack {
|
|
|
8
8
|
super(id, children, options);
|
|
9
9
|
this.baseClassName = 'jux-zstack';
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* ✅ Static create method with auto-render
|
|
13
|
+
* Allows: zstack.create({ children }, options).cascade(30).render()
|
|
14
|
+
*/
|
|
15
|
+
static create(children, options = {}) {
|
|
16
|
+
const id = `zstack-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
17
|
+
const instance = new ZStack(id, children, options);
|
|
18
|
+
queueMicrotask(() => {
|
|
19
|
+
if (!instance.container) {
|
|
20
|
+
instance.render('app');
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return instance;
|
|
24
|
+
}
|
|
11
25
|
}
|
|
12
26
|
export function zstack(id, children, options = {}) {
|
|
13
27
|
return new ZStack(id, children, options);
|
|
@@ -10,6 +10,23 @@ export class ZStack extends BaseStack {
|
|
|
10
10
|
constructor(id: string, children: Record<string, any> | any[], options: StackOptions = {}) {
|
|
11
11
|
super(id, children, options);
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* ✅ Static create method with auto-render
|
|
16
|
+
* Allows: zstack.create({ children }, options).cascade(30).render()
|
|
17
|
+
*/
|
|
18
|
+
static create(children: Record<string, any> | any[], options: StackOptions = {}): ZStack {
|
|
19
|
+
const id = `zstack-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
20
|
+
const instance = new ZStack(id, children, options);
|
|
21
|
+
|
|
22
|
+
queueMicrotask(() => {
|
|
23
|
+
if (!instance.container) {
|
|
24
|
+
instance.render('app');
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return instance;
|
|
29
|
+
}
|
|
13
30
|
}
|
|
14
31
|
|
|
15
32
|
export function zstack(id: string, children: Record<string, any> | any[], options: StackOptions = {}): ZStack {
|