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.
Files changed (26) hide show
  1. package/index.js +4 -4
  2. package/lib/componentsv2/element/{component.d.ts → Element.d.ts} +2 -2
  3. package/lib/componentsv2/element/{component.js → Element.js} +3 -3
  4. package/lib/componentsv2/element/{engine.d.ts → ElementEngine.d.ts} +1 -1
  5. package/lib/componentsv2/element/{engine.js → ElementEngine.js} +1 -1
  6. package/lib/componentsv2/element/{skin.d.ts → ElementSkin.d.ts} +2 -2
  7. package/lib/componentsv2/element/{skin.js → ElementSkin.js} +5 -3
  8. package/lib/componentsv2/grid/{component.d.ts → Grid.d.ts} +2 -2
  9. package/lib/componentsv2/grid/{component.js → Grid.js} +3 -3
  10. package/lib/componentsv2/grid/{engine.d.ts → GridEngine.d.ts} +1 -1
  11. package/lib/componentsv2/grid/{engine.js → GridEngine.js} +1 -1
  12. package/lib/componentsv2/grid/{skin.d.ts → GridSkin.d.ts} +2 -2
  13. package/lib/componentsv2/grid/{skin.js → GridSkin.js} +1 -1
  14. package/lib/componentsv2/input/{component.d.ts → Input.d.ts} +2 -2
  15. package/lib/componentsv2/input/{component.js → Input.js} +3 -3
  16. package/lib/componentsv2/input/{engine.d.ts → InputEngine.d.ts} +1 -1
  17. package/lib/componentsv2/input/{engine.js → InputEngine.js} +1 -1
  18. package/lib/componentsv2/input/{skin.d.ts → InputSkin.d.ts} +2 -2
  19. package/lib/componentsv2/input/{skin.js → InputSkin.js} +1 -1
  20. package/lib/componentsv2/list/{component.d.ts → List.d.ts} +2 -2
  21. package/lib/componentsv2/list/{component.js → List.js} +3 -3
  22. package/lib/componentsv2/list/{engine.d.ts → ListEngine.d.ts} +1 -1
  23. package/lib/componentsv2/list/{engine.js → ListEngine.js} +1 -1
  24. package/lib/componentsv2/list/{skin.d.ts → ListSkin.d.ts} +2 -2
  25. package/lib/componentsv2/list/{skin.js → ListSkin.js} +1 -1
  26. 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/component.js';
10
- export { Grid } from './lib/componentsv2/grid/component.js';
11
- export { Input } from './lib/componentsv2/input/component.js';
12
- export { List } from './lib/componentsv2/list/component.js';
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 './engine.js';
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=component.d.ts.map
29
+ //# sourceMappingURL=Element.d.ts.map
@@ -1,5 +1,5 @@
1
- import { ElementEngine } from './engine.js';
2
- import { ElementSkin } from './skin.js';
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=component.js.map
45
+ //# sourceMappingURL=Element.js.map
@@ -55,4 +55,4 @@ export declare class ElementEngine extends BaseEngine<ElementState, ElementOptio
55
55
  */
56
56
  handleEvent(eventName: string, content: any): void;
57
57
  }
58
- //# sourceMappingURL=engine.d.ts.map
58
+ //# sourceMappingURL=ElementEngine.d.ts.map
@@ -109,4 +109,4 @@ export class ElementEngine extends BaseEngine {
109
109
  this.emit(eventName, content);
110
110
  }
111
111
  }
112
- //# sourceMappingURL=engine.js.map
112
+ //# sourceMappingURL=ElementEngine.js.map
@@ -1,5 +1,5 @@
1
1
  import { BaseSkin } from '../base/BaseSkin.js';
2
- import { ElementEngine, ElementState } from './engine.js';
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=skin.d.ts.map
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
- if (this.root) {
28
- const newRoot = document.createElement(state.tag.toLowerCase());
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=skin.js.map
55
+ //# sourceMappingURL=ElementSkin.js.map
@@ -1,4 +1,4 @@
1
- import { GridEngine, GridOptions, GridInput } from './engine.js';
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=component.d.ts.map
14
+ //# sourceMappingURL=Grid.d.ts.map
@@ -1,5 +1,5 @@
1
- import { GridEngine } from './engine.js';
2
- import { GridSkin } from './skin.js';
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=component.js.map
27
+ //# sourceMappingURL=Grid.js.map
@@ -72,4 +72,4 @@ export declare class GridEngine extends BaseEngine<GridState, GridOptions> {
72
72
  */
73
73
  toggleGridder(active?: boolean): this;
74
74
  }
75
- //# sourceMappingURL=engine.d.ts.map
75
+ //# sourceMappingURL=GridEngine.d.ts.map
@@ -144,4 +144,4 @@ export class GridEngine extends BaseEngine {
144
144
  return this.gridder(next);
145
145
  }
146
146
  }
147
- //# sourceMappingURL=engine.js.map
147
+ //# sourceMappingURL=GridEngine.js.map
@@ -1,5 +1,5 @@
1
1
  import { BaseSkin } from '../base/BaseSkin.js';
2
- import { GridEngine, GridState } from './engine.js';
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=skin.d.ts.map
11
+ //# sourceMappingURL=GridSkin.d.ts.map
@@ -92,4 +92,4 @@ export class GridSkin extends BaseSkin {
92
92
  }
93
93
  }
94
94
  _GridSkin_cells = new WeakMap();
95
- //# sourceMappingURL=skin.js.map
95
+ //# sourceMappingURL=GridSkin.js.map
@@ -1,6 +1,6 @@
1
- import { InputEngine, InputOptions } from './engine.js';
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=component.d.ts.map
6
+ //# sourceMappingURL=Input.d.ts.map
@@ -1,5 +1,5 @@
1
- import { InputEngine } from './engine.js';
2
- import { InputSkin } from './skin.js';
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=component.js.map
21
+ //# sourceMappingURL=Input.js.map
@@ -67,4 +67,4 @@ export declare class InputEngine extends BaseEngine<InputState, InputOptions> {
67
67
  /** @alias for readonly() */
68
68
  setReadonly(isReadonly: boolean): this;
69
69
  }
70
- //# sourceMappingURL=engine.d.ts.map
70
+ //# sourceMappingURL=InputEngine.d.ts.map
@@ -140,4 +140,4 @@ export class InputEngine extends BaseEngine {
140
140
  return this.readonly(isReadonly);
141
141
  }
142
142
  }
143
- //# sourceMappingURL=engine.js.map
143
+ //# sourceMappingURL=InputEngine.js.map
@@ -1,5 +1,5 @@
1
1
  import { BaseSkin } from '../base/BaseSkin.js';
2
- import { InputEngine, InputState } from './engine.js';
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=skin.d.ts.map
11
+ //# sourceMappingURL=InputSkin.d.ts.map
@@ -86,4 +86,4 @@ export class InputSkin extends BaseSkin {
86
86
  }
87
87
  }
88
88
  _InputSkin_labelEl = new WeakMap(), _InputSkin_inputEl = new WeakMap(), _InputSkin_errorEl = new WeakMap();
89
- //# sourceMappingURL=skin.js.map
89
+ //# sourceMappingURL=InputSkin.js.map
@@ -1,4 +1,4 @@
1
- import { ListEngine, ListOptions } from './engine.js';
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=component.d.ts.map
49
+ //# sourceMappingURL=List.d.ts.map
@@ -1,5 +1,5 @@
1
- import { ListEngine } from './engine.js';
2
- import { ListSkin } from './skin.js';
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=component.js.map
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=engine.d.ts.map
121
+ //# sourceMappingURL=ListEngine.d.ts.map
@@ -319,4 +319,4 @@ export class ListEngine extends BaseEngine {
319
319
  return this;
320
320
  }
321
321
  }
322
- //# sourceMappingURL=engine.js.map
322
+ //# sourceMappingURL=ListEngine.js.map
@@ -1,5 +1,5 @@
1
1
  import { BaseSkin } from '../base/BaseSkin.js';
2
- import { ListEngine, ListState } from './engine.js';
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=skin.d.ts.map
20
+ //# sourceMappingURL=ListSkin.d.ts.map
@@ -342,4 +342,4 @@ _ListSkin_showSearch = new WeakMap(), _ListSkin_showAdd = new WeakMap(), _ListSk
342
342
  </div>
343
343
  </li>`;
344
344
  };
345
- //# sourceMappingURL=skin.js.map
345
+ //# sourceMappingURL=ListSkin.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.0.119",
3
+ "version": "1.0.122",
4
4
  "type": "module",
5
5
  "description": "A JavaScript UX authorship platform",
6
6
  "main": "./index.js",