juxscript 1.0.119 → 1.0.122
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/index.js +4 -4
- package/lib/componentsv2/element/{component.d.ts → Element.d.ts} +2 -2
- package/lib/componentsv2/element/{component.js → Element.js} +3 -3
- package/lib/componentsv2/element/{engine.d.ts → ElementEngine.d.ts} +1 -1
- package/lib/componentsv2/element/{engine.js → ElementEngine.js} +1 -1
- package/lib/componentsv2/element/{skin.d.ts → ElementSkin.d.ts} +2 -2
- package/lib/componentsv2/element/{skin.js → ElementSkin.js} +5 -3
- package/lib/componentsv2/grid/{component.d.ts → Grid.d.ts} +2 -2
- package/lib/componentsv2/grid/{component.js → Grid.js} +3 -3
- package/lib/componentsv2/grid/{engine.d.ts → GridEngine.d.ts} +1 -1
- package/lib/componentsv2/grid/{engine.js → GridEngine.js} +1 -1
- package/lib/componentsv2/grid/{skin.d.ts → GridSkin.d.ts} +2 -2
- package/lib/componentsv2/grid/{skin.js → GridSkin.js} +1 -1
- package/lib/componentsv2/input/{component.d.ts → Input.d.ts} +2 -2
- package/lib/componentsv2/input/{component.js → Input.js} +3 -3
- package/lib/componentsv2/input/{engine.d.ts → InputEngine.d.ts} +1 -1
- package/lib/componentsv2/input/{engine.js → InputEngine.js} +1 -1
- package/lib/componentsv2/input/{skin.d.ts → InputSkin.d.ts} +2 -2
- package/lib/componentsv2/input/{skin.js → InputSkin.js} +1 -1
- package/lib/componentsv2/list/{component.d.ts → List.d.ts} +2 -2
- package/lib/componentsv2/list/{component.js → List.js} +3 -3
- package/lib/componentsv2/list/{engine.d.ts → ListEngine.d.ts} +1 -1
- package/lib/componentsv2/list/{engine.js → ListEngine.js} +1 -1
- package/lib/componentsv2/list/{skin.d.ts → ListSkin.d.ts} +2 -2
- package/lib/componentsv2/list/{skin.js → ListSkin.js} +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// Core Components
|
|
9
|
-
export { Element } from './lib/componentsv2/element/
|
|
10
|
-
export { Grid } from './lib/componentsv2/grid/
|
|
11
|
-
export { Input } from './lib/componentsv2/input/
|
|
12
|
-
export { List } from './lib/componentsv2/list/
|
|
9
|
+
export { Element } from './lib/componentsv2/element/Element.js';
|
|
10
|
+
export { Grid } from './lib/componentsv2/grid/Grid.js';
|
|
11
|
+
export { Input } from './lib/componentsv2/input/Input.js';
|
|
12
|
+
export { List } from './lib/componentsv2/list/List.js';
|
|
13
13
|
|
|
14
14
|
// Base Classes (for extension)
|
|
15
15
|
// Note: BaseState is a TypeScript interface, not exported at runtime
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementEngine, ElementOptions } from './
|
|
1
|
+
import { ElementEngine, ElementOptions } from './ElementEngine.js';
|
|
2
2
|
export type ElementComponent = ElementEngine & {
|
|
3
3
|
render: (targetId: string | HTMLElement) => ElementComponent;
|
|
4
4
|
injectCSS: (id: string, cssContent: string) => void;
|
|
@@ -26,4 +26,4 @@ export type ElementComponent = ElementEngine & {
|
|
|
26
26
|
* - .style(css) → .inlineStyle(css)
|
|
27
27
|
*/
|
|
28
28
|
export declare function Element(id: string, options?: ElementOptions): ElementComponent;
|
|
29
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=Element.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ElementEngine } from './
|
|
2
|
-
import { ElementSkin } from './
|
|
1
|
+
import { ElementEngine } from './ElementEngine.js';
|
|
2
|
+
import { ElementSkin } from './ElementSkin.js';
|
|
3
3
|
/**
|
|
4
4
|
* OPTIONS CONTRACT for Element:
|
|
5
5
|
*
|
|
@@ -42,4 +42,4 @@ export function Element(id, options = {}) {
|
|
|
42
42
|
engine.injectCSS = (id, css) => skin.injectCSS(id, css);
|
|
43
43
|
return engine;
|
|
44
44
|
}
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=Element.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSkin } from '../base/BaseSkin.js';
|
|
2
|
-
import { ElementEngine, ElementState } from './
|
|
2
|
+
import { ElementEngine, ElementState } from './ElementEngine.js';
|
|
3
3
|
export declare class ElementSkin extends BaseSkin<ElementState, ElementEngine> {
|
|
4
4
|
constructor(engine: ElementEngine);
|
|
5
5
|
protected get structureCss(): string;
|
|
@@ -7,4 +7,4 @@ export declare class ElementSkin extends BaseSkin<ElementState, ElementEngine> {
|
|
|
7
7
|
protected bindEvents(root: HTMLElement): void;
|
|
8
8
|
protected updateSkin(state: ElementState): void;
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=
|
|
10
|
+
//# sourceMappingURL=ElementSkin.d.ts.map
|
|
@@ -24,8 +24,10 @@ export class ElementSkin extends BaseSkin {
|
|
|
24
24
|
}
|
|
25
25
|
updateSkin(state) {
|
|
26
26
|
// 1. Tag Replacement Logic (uses state.tag)
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const currentTag = this.root ? this.root.tagName.toLowerCase() : '';
|
|
28
|
+
const desiredTag = (state.tag || 'div').toLowerCase();
|
|
29
|
+
if (this.root && currentTag !== desiredTag) {
|
|
30
|
+
const newRoot = document.createElement(desiredTag);
|
|
29
31
|
if (this.root.parentNode) {
|
|
30
32
|
this.root.parentNode.replaceChild(newRoot, this.root);
|
|
31
33
|
}
|
|
@@ -50,4 +52,4 @@ export class ElementSkin extends BaseSkin {
|
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
|
-
//# sourceMappingURL=
|
|
55
|
+
//# sourceMappingURL=ElementSkin.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridEngine, GridOptions, GridInput } from './
|
|
1
|
+
import { GridEngine, GridOptions, GridInput } from './GridEngine.js';
|
|
2
2
|
export type GridComponent = GridEngine & {
|
|
3
3
|
render: (targetId: string | HTMLElement) => GridComponent;
|
|
4
4
|
injectCSS: (id: string, cssContent: string) => void;
|
|
@@ -11,4 +11,4 @@ export type GridComponent = GridEngine & {
|
|
|
11
11
|
getCellId: (row: number, col: number) => string;
|
|
12
12
|
};
|
|
13
13
|
export declare function Grid(id: string, options?: GridOptions): GridComponent;
|
|
14
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GridEngine } from './
|
|
2
|
-
import { GridSkin } from './
|
|
1
|
+
import { GridEngine } from './GridEngine.js';
|
|
2
|
+
import { GridSkin } from './GridSkin.js';
|
|
3
3
|
export function Grid(id, options = {}) {
|
|
4
4
|
const engine = new GridEngine(id, options);
|
|
5
5
|
if (typeof window !== 'undefined') {
|
|
@@ -24,4 +24,4 @@ export function Grid(id, options = {}) {
|
|
|
24
24
|
engine.getCellId = (row, col) => `${id}-${row}-${col}`;
|
|
25
25
|
return engine;
|
|
26
26
|
}
|
|
27
|
-
//# sourceMappingURL=
|
|
27
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSkin } from '../base/BaseSkin.js';
|
|
2
|
-
import { GridEngine, GridState } from './
|
|
2
|
+
import { GridEngine, GridState } from './GridEngine.js';
|
|
3
3
|
export declare class GridSkin extends BaseSkin<GridState, GridEngine> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(engine: GridEngine);
|
|
@@ -8,4 +8,4 @@ export declare class GridSkin extends BaseSkin<GridState, GridEngine> {
|
|
|
8
8
|
protected updateSkin(state: GridState): void;
|
|
9
9
|
protected createRoot(): HTMLElement;
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=GridSkin.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InputEngine, InputOptions } from './
|
|
1
|
+
import { InputEngine, InputOptions } from './InputEngine.js';
|
|
2
2
|
export type InputComponent = InputEngine & {
|
|
3
3
|
render: (targetId: string | HTMLElement) => InputComponent;
|
|
4
4
|
};
|
|
5
5
|
export declare function Input(id: string, options?: InputOptions): InputComponent;
|
|
6
|
-
//# sourceMappingURL=
|
|
6
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputEngine } from './
|
|
2
|
-
import { InputSkin } from './
|
|
1
|
+
import { InputEngine } from './InputEngine.js';
|
|
2
|
+
import { InputSkin } from './InputSkin.js';
|
|
3
3
|
export function Input(id, options = {}) {
|
|
4
4
|
const engine = new InputEngine(id, options);
|
|
5
5
|
if (typeof window !== 'undefined') {
|
|
@@ -18,4 +18,4 @@ export function Input(id, options = {}) {
|
|
|
18
18
|
};
|
|
19
19
|
return engine;
|
|
20
20
|
}
|
|
21
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSkin } from '../base/BaseSkin.js';
|
|
2
|
-
import { InputEngine, InputState } from './
|
|
2
|
+
import { InputEngine, InputState } from './InputEngine.js';
|
|
3
3
|
export declare class InputSkin extends BaseSkin<InputState, InputEngine> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(engine: InputEngine);
|
|
@@ -8,4 +8,4 @@ export declare class InputSkin extends BaseSkin<InputState, InputEngine> {
|
|
|
8
8
|
protected bindEvents(root: HTMLElement): void;
|
|
9
9
|
protected updateSkin(state: InputState): void;
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=InputSkin.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ListEngine, ListOptions } from './
|
|
1
|
+
import { ListEngine, ListOptions } from './ListEngine.js';
|
|
2
2
|
import { JuxServiceContract } from '../base/BaseEngine.js';
|
|
3
3
|
export type ListKnob = 'add' | 'edit' | 'move' | 'search' | 'delete' | 'sort';
|
|
4
4
|
export type ListComponent = ListEngine & {
|
|
@@ -46,4 +46,4 @@ export type ListComponent = ListEngine & {
|
|
|
46
46
|
* - .toggleListType() → toggles listType state
|
|
47
47
|
*/
|
|
48
48
|
export declare function List(id: string, options?: ListOptions): ListComponent;
|
|
49
|
-
//# sourceMappingURL=
|
|
49
|
+
//# sourceMappingURL=List.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ListEngine } from './
|
|
2
|
-
import { ListSkin } from './
|
|
1
|
+
import { ListEngine } from './ListEngine.js';
|
|
2
|
+
import { ListSkin } from './ListSkin.js';
|
|
3
3
|
/**
|
|
4
4
|
* OPTIONS CONTRACT for List:
|
|
5
5
|
*
|
|
@@ -102,4 +102,4 @@ export function List(id, options = {}) {
|
|
|
102
102
|
};
|
|
103
103
|
return engine;
|
|
104
104
|
}
|
|
105
|
-
//# sourceMappingURL=
|
|
105
|
+
//# sourceMappingURL=List.js.map
|
|
@@ -118,4 +118,4 @@ export declare class ListEngine extends BaseEngine<ListState, ListOptions> {
|
|
|
118
118
|
moveItem(fromIndex: number, toIndex: number): this;
|
|
119
119
|
toggleSelection(index: number): this;
|
|
120
120
|
}
|
|
121
|
-
//# sourceMappingURL=
|
|
121
|
+
//# sourceMappingURL=ListEngine.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSkin } from '../base/BaseSkin.js';
|
|
2
|
-
import { ListEngine, ListState } from './
|
|
2
|
+
import { ListEngine, ListState } from './ListEngine.js';
|
|
3
3
|
export declare class ListSkin extends BaseSkin<ListState, ListEngine> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(engine: ListEngine);
|
|
@@ -17,4 +17,4 @@ export declare class ListSkin extends BaseSkin<ListState, ListEngine> {
|
|
|
17
17
|
*/
|
|
18
18
|
protected updateSkin(state: ListState): void;
|
|
19
19
|
}
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=ListSkin.d.ts.map
|