aptechka 0.1.5 → 0.1.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.
Files changed (84) hide show
  1. package/lib/{Animated-CzBHCHNm.js → Animated-CJcYqJzq.js} +1 -1
  2. package/lib/{Animated-DZ_fbJmi.cjs → Animated-DyZuTEQE.cjs} +1 -1
  3. package/lib/{Damped--qBZAdEi.cjs → Damped-AHRBHNEQ.cjs} +1 -1
  4. package/lib/{Damped-Bm1kSn1f.js → Damped-Csj-9_gH.js} +1 -1
  5. package/lib/{Derived-BS2ja9qa.js → Derived-Bc88XJ8J.js} +1 -1
  6. package/lib/{Derived-CqmIkTGN.cjs → Derived-SjPdLJiZ.cjs} +1 -1
  7. package/lib/ElementConstructor-9f-12v7T.cjs +1 -0
  8. package/lib/ElementConstructor-CoKM2CTK.js +228 -0
  9. package/lib/{SourceManager-B44FUTig.js → SourceManager-BoP9RAJr.js} +1 -1
  10. package/lib/{SourceManager-D447KWpH.cjs → SourceManager-CI6NfLzW.cjs} +1 -1
  11. package/lib/Store-D0_rDIsE.cjs +1 -0
  12. package/lib/{Store-uTyReFzx.js → Store-JOKrNVEr.js} +18 -18
  13. package/lib/{Viewport-CDqiD8Ao.cjs → Viewport-COsaberc.cjs} +1 -1
  14. package/lib/{Viewport-Cj0i-H5d.js → Viewport-CXY5xcGJ.js} +1 -1
  15. package/lib/abstract-elements/index.cjs +1 -1
  16. package/lib/abstract-elements/index.js +1 -1
  17. package/lib/animation/index.cjs +1 -1
  18. package/lib/animation/index.js +2 -2
  19. package/lib/attribute/index.cjs +1 -1
  20. package/lib/attribute/index.js +1 -1
  21. package/lib/canvas/index.cjs +1 -1
  22. package/lib/canvas/index.js +3 -3
  23. package/lib/connector/index.cjs +1 -1
  24. package/lib/connector/index.d.ts +1 -0
  25. package/lib/connector/index.js +32 -31
  26. package/lib/createStylesheet-BON7aJYs.js +10 -0
  27. package/lib/{createStylesheet-ChhZFwSX.cjs → createStylesheet-uicRVW05.cjs} +1 -1
  28. package/lib/device/index.cjs +1 -1
  29. package/lib/device/index.js +1 -1
  30. package/lib/element-constructor/ElementConstructor.d.ts +4 -2
  31. package/lib/element-constructor/htmlTags.d.ts +1 -1
  32. package/lib/element-constructor/index.cjs +1 -1
  33. package/lib/element-constructor/index.js +4 -4
  34. package/lib/en3/index.cjs +1 -1
  35. package/lib/en3/index.js +2 -2
  36. package/lib/{htmlTags-CNEFIHPp.js → htmlTags-BCNUG7oK.js} +1 -1
  37. package/lib/{htmlTags-CwYHVo9n.cjs → htmlTags-BSQys9wH.cjs} +1 -1
  38. package/lib/image/index.cjs +1 -1
  39. package/lib/image/index.js +1 -1
  40. package/lib/{index-DyJhLxk8.js → index-DgtdcBEI.js} +3 -3
  41. package/lib/{index-tPw9mmLF.cjs → index-i_Ki9M-w.cjs} +1 -1
  42. package/lib/jsx/ComponentElement.d.ts +17 -0
  43. package/lib/jsx/h.d.ts +5 -4
  44. package/lib/jsx/hooks.d.ts +10 -4
  45. package/lib/jsx/index.cjs +1 -1
  46. package/lib/jsx/index.js +97 -106
  47. package/lib/jsx/type.d.ts +6 -5
  48. package/lib/ladder/index.cjs +1 -1
  49. package/lib/ladder/index.js +1 -1
  50. package/lib/media/index.cjs +1 -1
  51. package/lib/media/index.js +1 -1
  52. package/lib/modal/index.cjs +1 -1
  53. package/lib/modal/index.js +3 -3
  54. package/lib/popover/index.cjs +1 -1
  55. package/lib/popover/index.js +1 -1
  56. package/lib/scroll/index.cjs +1 -1
  57. package/lib/scroll/index.js +6 -6
  58. package/lib/select/index.cjs +1 -1
  59. package/lib/select/index.js +1 -1
  60. package/lib/source/index.cjs +1 -1
  61. package/lib/source/index.js +2 -2
  62. package/lib/store/index.cjs +1 -1
  63. package/lib/store/index.js +3 -3
  64. package/lib/studio/index.cjs +3 -3
  65. package/lib/studio/index.js +307 -288
  66. package/lib/studio/tweaker/TweakerBooleanManagerElement.d.ts +1 -1
  67. package/lib/studio/tweaker/TweakerColorManagerElement.d.ts +1 -1
  68. package/lib/studio/tweaker/TweakerFieldElement.d.ts +2 -1
  69. package/lib/studio/tweaker/TweakerLinkManagerElement.d.ts +1 -1
  70. package/lib/studio/tweaker/TweakerNumberManagerElement.d.ts +1 -1
  71. package/lib/studio/tweaker/TweakerRangeManagerElement.d.ts +1 -1
  72. package/lib/studio/tweaker/TweakerSelectManagerElement.d.ts +1 -1
  73. package/lib/studio/tweaker/TweakerStoreManagerElement.d.ts +5 -2
  74. package/lib/studio/tweaker/TweakerStringManagerElement.d.ts +1 -1
  75. package/lib/theme/index.cjs +1 -1
  76. package/lib/theme/index.js +2 -2
  77. package/lib/video/index.cjs +1 -1
  78. package/lib/video/index.js +1 -1
  79. package/package.json +1 -1
  80. package/lib/ElementConstructor-DB0xOoat.js +0 -199
  81. package/lib/ElementConstructor-v1FPLXAW.cjs +0 -1
  82. package/lib/Store-BOOfmlyv.cjs +0 -1
  83. package/lib/createStylesheet-74ZP3AZm.js +0 -8
  84. package/lib/jsx/ComponentWrapper.d.ts +0 -12
@@ -1,7 +1,7 @@
1
1
  import { Store } from '../../store/Store';
2
2
  import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
3
3
  export declare class TweakerBooleanManagerElement extends TweakerStoreManagerElement<boolean, 'boolean'> {
4
- constructor(store: Store<boolean, 'boolean'>);
4
+ constructor(...stores: Array<Store<boolean, 'boolean'>>);
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
@@ -1,7 +1,7 @@
1
1
  import { Store } from '../../store/Store';
2
2
  import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
3
3
  export declare class TweakerColorManagerElement extends TweakerStoreManagerElement<string, 'color'> {
4
- constructor(store: Store<string, 'color'>);
4
+ constructor(...stores: Array<Store<string, 'color'>>);
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
@@ -9,7 +9,8 @@ export declare class TweakerFieldElement extends CustomElement {
9
9
  constructor(parameters: TweakerFieldParameters);
10
10
  get key(): string;
11
11
  get name(): string;
12
- get store(): Store<any, keyof import('../../store').StoreManagers, any>;
12
+ get stores(): Store<any, keyof import('../../store').StoreManagers, any>[];
13
+ addStore(store: Store<any, any, any>): void;
13
14
  protected connectedCallback(): void;
14
15
  protected disconnectedCallback(): void;
15
16
  }
@@ -1,7 +1,7 @@
1
1
  import { Store } from '../../store';
2
2
  import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
3
3
  export declare class TweakerLinkManagerElement extends TweakerStoreManagerElement<string, 'link'> {
4
- constructor(store: Store<string, 'link'>);
4
+ constructor(...stores: Array<Store<string, 'link'>>);
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
@@ -2,7 +2,7 @@ import { Store, StoreManagerType } from '../../store';
2
2
  import { TweakerStringManagerElement } from './TweakerStringManagerElement';
3
3
  export declare class TweakerNumberManagerElement<M extends Extract<StoreManagerType, 'number' | 'range'> = 'number'> extends TweakerStringManagerElement<number, M> {
4
4
  #private;
5
- constructor(store: Store<number, M>);
5
+ constructor(...stores: Array<Store<number, M>>);
6
6
  protected get min(): number;
7
7
  protected get max(): number;
8
8
  protected get step(): number;
@@ -1,7 +1,7 @@
1
1
  import { Store } from '../../store/Store';
2
2
  import { TweakerNumberManagerElement } from './TweakerNumberManagerElement';
3
3
  export declare class TweakerRangeManagerElement extends TweakerNumberManagerElement<'range'> {
4
- constructor(store: Store<number, 'range'>);
4
+ constructor(...stores: Array<Store<number, 'range'>>);
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
@@ -1,7 +1,7 @@
1
1
  import { Store } from '../../store/Store';
2
2
  import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
3
3
  export declare class TweakerSelectManagerElement extends TweakerStoreManagerElement<string, 'select'> {
4
- constructor(store: Store<string, 'select'>);
4
+ constructor(...stores: Array<Store<string, 'select'>>);
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
@@ -2,6 +2,9 @@ import { CustomElement } from '../../custom-element';
2
2
  import { Store, StoreManagerType } from '../../store';
3
3
  export declare class TweakerStoreManagerElement<T, K extends StoreManagerType> extends CustomElement {
4
4
  #private;
5
- constructor(store: Store<T, K>);
6
- protected get store(): Store<T, K, import('../../store').StoreEntry<T>>;
5
+ constructor(...stores: Array<Store<T, K>>);
6
+ addStore(store: Store<T, K>): void;
7
+ protected get firstStore(): Store<T, K, import('../../store').StoreEntry<T>>;
8
+ protected get stores(): Store<T, K, import('../../store').StoreEntry<T>>[];
9
+ protected updateStores(value: T): void;
7
10
  }
@@ -2,7 +2,7 @@ import { Store, StoreManagerType } from '../../store/Store';
2
2
  import { TweakerStoreManagerElement } from './TweakerStoreManagerElement';
3
3
  export declare class TweakerStringManagerElement<T extends string | number = string, M extends Extract<StoreManagerType, 'string' | 'number' | 'range' | 'link'> = 'string'> extends TweakerStoreManagerElement<T, M> {
4
4
  #private;
5
- constructor(store: Store<T, M>);
5
+ constructor(...stores: Array<Store<T, M>>);
6
6
  protected appendContent(value: any): void;
7
7
  }
8
8
  declare global {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-BOOfmlyv.cjs");const r=require("../browser-CpzFX2xg.cjs"),t=require("../htmlTags-CwYHVo9n.cjs"),a=require("../createTheme-COo8IzPG.cjs"),e=a.createTheme({colorDark:"#1c1c1c",colorDarkAux:"#282828",colorLight:"#ffffff",colorActive:"#00E5B0",tweakerWidth:"480px",tweakerOffset:"20px",tweakerFolderHeight:"40px",heightInput:"30px",borderRadius:"12px",gapLarge:"16px",gapMedium:"12px",gapSmall:"8px",gapExtraSmall:"4px",fontSizeLarge:"20px",fontSizeMedium:"16px",fontSizeSmall:"14px",durationShort:"0.2s"},{prefix:"aptechka-"});r.isBrowser&&document.head.appendChild(t.style({":root":e.style}).rootElements[0]);exports.aptechkaTheme=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-D0_rDIsE.cjs");const r=require("../browser-CpzFX2xg.cjs"),t=require("../htmlTags-BSQys9wH.cjs"),a=require("../createTheme-COo8IzPG.cjs"),e=a.createTheme({colorDark:"#1c1c1c",colorDarkAux:"#282828",colorLight:"#ffffff",colorActive:"#00E5B0",tweakerWidth:"480px",tweakerOffset:"20px",tweakerFolderHeight:"40px",heightInput:"30px",borderRadius:"12px",gapLarge:"16px",gapMedium:"12px",gapSmall:"8px",gapExtraSmall:"4px",fontSizeLarge:"20px",fontSizeMedium:"16px",fontSizeSmall:"14px",durationShort:"0.2s"},{prefix:"aptechka-"});r.isBrowser&&document.head.appendChild(t.style({":root":e.style}).rootElements[0]);exports.aptechkaTheme=e;
@@ -1,6 +1,6 @@
1
- import "../Store-uTyReFzx.js";
1
+ import "../Store-JOKrNVEr.js";
2
2
  import { i as e } from "../browser-0zX67oeU.js";
3
- import { aB as r } from "../htmlTags-CNEFIHPp.js";
3
+ import { aB as r } from "../htmlTags-BCNUG7oK.js";
4
4
  import { c as t } from "../createTheme-BMH9cRrS.js";
5
5
  const o = t(
6
6
  {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-BOOfmlyv.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,m=(s,t,n,r)=>{for(var e=r>1?void 0:r?a(t,n):t,i=s.length-1,u;i>=0;i--)(u=s[i])&&(e=(r?u(t,n,e):u(e))||e);return r&&e&&l(t,n,e),e};exports.VideoElement=class extends o.SourceElement{connectedCallback(){super.connectedCallback(),this.captureEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&this.consumerElement.play()}),this.releaseEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0))})}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}};exports.VideoElement=m([c.define("e-video")],exports.VideoElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-D0_rDIsE.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,m=(s,t,n,r)=>{for(var e=r>1?void 0:r?a(t,n):t,i=s.length-1,u;i>=0;i--)(u=s[i])&&(e=(r?u(t,n,e):u(e))||e);return r&&e&&l(t,n,e),e};exports.VideoElement=class extends o.SourceElement{connectedCallback(){super.connectedCallback(),this.captureEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&this.consumerElement.play()}),this.releaseEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0))})}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}};exports.VideoElement=m([c.define("e-video")],exports.VideoElement);
@@ -1,6 +1,6 @@
1
1
  import { define as u } from "../custom-element/index.js";
2
2
  import "../window-resizer/index.js";
3
- import "../Store-uTyReFzx.js";
3
+ import "../Store-JOKrNVEr.js";
4
4
  import { SourceElement as l } from "../source/index.js";
5
5
  var m = Object.defineProperty, a = Object.getOwnPropertyDescriptor, p = (t, r, i, s) => {
6
6
  for (var e = s > 1 ? void 0 : s ? a(r, i) : r, n = t.length - 1, o; n >= 0; n--)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1,199 +0,0 @@
1
- var J = (f, s, t) => {
2
- if (!s.has(f))
3
- throw TypeError("Cannot " + t);
4
- };
5
- var K = (f, s, t) => (J(f, s, "read from private field"), t ? t.call(f) : s.get(f)), o = (f, s, t) => {
6
- if (s.has(f))
7
- throw TypeError("Cannot add the same private member more than once");
8
- s instanceof WeakSet ? s.add(f) : s.set(f, t);
9
- }, N = (f, s, t, e) => (J(f, s, "write to private field"), e ? e.call(f, t) : s.set(f, t), t);
10
- var r = (f, s, t) => (J(f, s, "access private method"), t);
11
- import { S as c } from "./Store-uTyReFzx.js";
12
- import { i as st } from "./browser-0zX67oeU.js";
13
- import { c as U } from "./string-BrDhnNUL.js";
14
- var l, b, Y, v, z, d, m, h, M, A, D, C, G, T, I, p, Q, y, q, E, R, x, X, P, Z, S, V, g, W, $, _, k, O, B, j, L, F, H, tt;
15
- const u = class u {
16
- constructor(...s) {
17
- o(this, b);
18
- o(this, v);
19
- o(this, d);
20
- o(this, h);
21
- o(this, A);
22
- o(this, C);
23
- o(this, T);
24
- o(this, p);
25
- o(this, y);
26
- o(this, E);
27
- o(this, x);
28
- o(this, P);
29
- o(this, S);
30
- o(this, g);
31
- o(this, $);
32
- o(this, k);
33
- o(this, B);
34
- o(this, L);
35
- o(this, H);
36
- o(this, l, []);
37
- const t = s[0], e = s[1];
38
- if (st)
39
- if (typeof t == "string") {
40
- const i = document.createElement("div");
41
- i.innerHTML = t;
42
- const n = i.firstElementChild;
43
- N(this, l, [n]), r(this, d, m).call(this, n, e);
44
- } else
45
- t instanceof HTMLElement ? (N(this, l, [t]), r(this, d, m).call(this, t, e)) : N(this, l, r(this, b, Y).call(this, t));
46
- }
47
- get rootElements() {
48
- return K(this, l);
49
- }
50
- };
51
- l = new WeakMap(), b = new WeakSet(), Y = function(s) {
52
- const t = [];
53
- for (const e in s) {
54
- const i = e, n = s[i], a = r(this, v, z).call(this, i, n == null ? void 0 : n.svg);
55
- n && r(this, d, m).call(this, a, n), t.push(a);
56
- }
57
- return t;
58
- }, v = new WeakSet(), z = function(s, t = !1) {
59
- let e = null;
60
- return s.includes("-") ? e = new (customElements.get(s))() : t ? e = document.createElementNS("http://www.w3.org/2000/svg", s) : e = document.createElement(s), e;
61
- }, d = new WeakSet(), m = function(s, t) {
62
- for (const e in t) {
63
- const i = e;
64
- i === "class" ? r(this, h, M).call(this, s, t[i]) : i === "style" ? r(this, T, I).call(this, s, t[i]) : i === "events" ? r(this, x, X).call(this, s, t[i]) : i === "attributes" ? r(this, P, Z).call(this, s, t[i]) : i === "children" ? r(this, g, W).call(this, s, t[i]) : i === "shadowChildren" ? r(this, g, W).call(this, s.shadowRoot || s, t[i]) : i === "parent" && r(this, H, tt).call(this, s, t[i]);
65
- }
66
- t != null && t.ref && (typeof (t == null ? void 0 : t.ref) == "function" ? t.ref(s) : t.ref.current = s);
67
- }, h = new WeakSet(), M = function(s, t) {
68
- if (t) {
69
- if (typeof t == "string")
70
- s.classList.add(t);
71
- else if (Array.isArray(t))
72
- t.forEach((e) => {
73
- r(this, h, M).call(this, s, e);
74
- });
75
- else if (typeof t == "object")
76
- if (t instanceof c)
77
- r(this, A, D).call(this, s, t);
78
- else
79
- for (const e in t) {
80
- const i = t[e];
81
- i instanceof c ? r(this, C, G).call(this, s, e, i) : i ? s.classList.add(e) : s.classList.remove(e);
82
- }
83
- } else
84
- return;
85
- }, A = new WeakSet(), D = function(s, t) {
86
- t.subscribe(({ current: e, previous: i }) => {
87
- i && [i].flat().forEach((n) => {
88
- n && s.classList.remove(n);
89
- }), e && [e].flat().forEach((n) => {
90
- n && s.classList.add(n);
91
- });
92
- });
93
- }, C = new WeakSet(), G = function(s, t, e) {
94
- e.subscribe(({ current: i }) => {
95
- i ? s.classList.add(t) : s.classList.remove(t);
96
- });
97
- }, T = new WeakSet(), I = function(s, t) {
98
- if (!t)
99
- return;
100
- s.tagName === "style" || s.tagName === "STYLE" ? r(this, y, q).call(this, s, t) : r(this, p, Q).call(this, s, t);
101
- }, p = new WeakSet(), Q = function(s, t) {
102
- for (const e in t) {
103
- const i = e, n = t[i];
104
- n instanceof c ? n.subscribe(({ current: a }) => {
105
- r(this, E, R).call(this, s, i, a);
106
- }) : r(this, E, R).call(this, s, i, n);
107
- }
108
- }, y = new WeakSet(), q = function(s, t) {
109
- for (const e in t) {
110
- const i = t[e];
111
- if (typeof i == "object" && !(i instanceof c))
112
- s.appendChild(new Text(`${e} {`)), r(this, y, q).call(this, s, i), s.appendChild(new Text("}"));
113
- else if (i instanceof c) {
114
- const n = new Text();
115
- i.subscribe((a) => {
116
- a.current ? n.nodeValue = `${U(e)}: ${a.current};` : n.nodeValue = "";
117
- }), s.appendChild(n);
118
- } else
119
- s.appendChild(new Text(`${U(e)}: ${i};`));
120
- }
121
- }, E = new WeakSet(), R = function(s, t, e) {
122
- t.includes("--") ? e ? s.style.setProperty(t, e) : s.style.removeProperty(t) : e ? s.style[t] = e : s.style[t] = "";
123
- }, x = new WeakSet(), X = function(s, t) {
124
- if (t)
125
- for (const e in t) {
126
- const i = e, n = t[i];
127
- typeof n == "object" ? s.addEventListener(
128
- i,
129
- n.callback,
130
- n.options
131
- ) : typeof n == "function" && s.addEventListener(i, n);
132
- }
133
- }, P = new WeakSet(), Z = function(s, t) {
134
- for (const e in t) {
135
- const i = t[e];
136
- i instanceof c ? i.subscribe(({ current: n }) => {
137
- r(this, S, V).call(this, s, e, n);
138
- }) : r(this, S, V).call(this, s, e, i);
139
- }
140
- }, S = new WeakSet(), V = function(s, t, e) {
141
- var i, n;
142
- t in s && !((n = (i = s.constructor) == null ? void 0 : i.observedAttributes) != null && n.includes(t)) ? e != null && (s[t] = e.toString()) : e != null && s.setAttribute(t, e.toString());
143
- }, g = new WeakSet(), W = function(s, t) {
144
- t && (t = [t].flat(), t.forEach((e) => {
145
- if (e instanceof c) {
146
- const i = document.createElement("div");
147
- i.style.display = "contents", s.appendChild(i), e.subscribe(({ current: n }) => {
148
- r(this, k, O).call(this, i, r(this, $, _).call(this, n), Array.from(i.childNodes));
149
- });
150
- } else if (e instanceof u)
151
- s.append(...e.rootElements);
152
- else {
153
- const i = r(this, L, F).call(this, e);
154
- i instanceof Node && s.append(i);
155
- }
156
- }));
157
- }, $ = new WeakSet(), _ = function(s) {
158
- return [s].flat().map((e) => e instanceof u ? e.rootElements : r(this, L, F).call(this, e)).flat().filter(Boolean);
159
- }, k = new WeakSet(), O = function(s, t, e) {
160
- e.forEach((i, n) => {
161
- if (n < t.length) {
162
- const a = t[n];
163
- r(this, B, j).call(this, i, a) || s.replaceChild(a, i);
164
- } else
165
- s.removeChild(i);
166
- });
167
- for (let i = e.length; i < t.length; i++)
168
- s.appendChild(t[i]);
169
- }, B = new WeakSet(), j = function(s, t) {
170
- return t ? t instanceof Node ? s.isEqualNode(t) : s.textContent === t.toString() : !1;
171
- }, L = new WeakSet(), F = function(s) {
172
- if (s instanceof Node)
173
- return s;
174
- if (s != null) {
175
- const t = String(s);
176
- if (t.trim().startsWith("<") && t.trim().endsWith(">")) {
177
- const e = document.createElement("div");
178
- return e.innerHTML = t, e.firstElementChild;
179
- } else
180
- return new Text(t);
181
- } else
182
- return;
183
- }, H = new WeakSet(), tt = function(s, t) {
184
- if (!t)
185
- return;
186
- (t instanceof u ? t.rootElements[0] : t).appendChild(s);
187
- };
188
- let w = u;
189
- function ot(...f) {
190
- return new w(...f);
191
- }
192
- function ft(...f) {
193
- return () => new w(...f);
194
- }
195
- export {
196
- w as E,
197
- ft as a,
198
- ot as e
199
- };
@@ -1 +0,0 @@
1
- "use strict";var H=(f,e,t)=>{if(!e.has(f))throw TypeError("Cannot "+t)};var W=(f,e,t)=>(H(f,e,"read from private field"),t?t.call(f):e.get(f)),o=(f,e,t)=>{if(e.has(f))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(f):e.set(f,t)},N=(f,e,t,s)=>(H(f,e,"write to private field"),s?s.call(f,t):e.set(f,t),t);var r=(f,e,t)=>(H(f,e,"access private method"),t);const c=require("./Store-BOOfmlyv.cjs"),et=require("./browser-CpzFX2xg.cjs"),U=require("./string-DzUwFYSS.cjs");var l,v,Y,C,z,d,w,y,J,T,D,m,G,A,I,x,Q,S,M,E,F,p,X,q,Z,g,K,b,R,P,_,$,O,k,j,L,V,B,tt;const u=class u{constructor(...e){o(this,v);o(this,C);o(this,d);o(this,y);o(this,T);o(this,m);o(this,A);o(this,x);o(this,S);o(this,E);o(this,p);o(this,q);o(this,g);o(this,b);o(this,P);o(this,$);o(this,k);o(this,L);o(this,B);o(this,l,[]);const t=e[0],s=e[1];if(et.isBrowser)if(typeof t=="string"){const i=document.createElement("div");i.innerHTML=t;const n=i.firstElementChild;N(this,l,[n]),r(this,d,w).call(this,n,s)}else t instanceof HTMLElement?(N(this,l,[t]),r(this,d,w).call(this,t,s)):N(this,l,r(this,v,Y).call(this,t))}get rootElements(){return W(this,l)}};l=new WeakMap,v=new WeakSet,Y=function(e){const t=[];for(const s in e){const i=s,n=e[i],a=r(this,C,z).call(this,i,n==null?void 0:n.svg);n&&r(this,d,w).call(this,a,n),t.push(a)}return t},C=new WeakSet,z=function(e,t=!1){let s=null;return e.includes("-")?s=new(customElements.get(e)):t?s=document.createElementNS("http://www.w3.org/2000/svg",e):s=document.createElement(e),s},d=new WeakSet,w=function(e,t){for(const s in t){const i=s;i==="class"?r(this,y,J).call(this,e,t[i]):i==="style"?r(this,A,I).call(this,e,t[i]):i==="events"?r(this,p,X).call(this,e,t[i]):i==="attributes"?r(this,q,Z).call(this,e,t[i]):i==="children"?r(this,b,R).call(this,e,t[i]):i==="shadowChildren"?r(this,b,R).call(this,e.shadowRoot||e,t[i]):i==="parent"&&r(this,B,tt).call(this,e,t[i])}t!=null&&t.ref&&(typeof(t==null?void 0:t.ref)=="function"?t.ref(e):t.ref.current=e)},y=new WeakSet,J=function(e,t){if(t){if(typeof t=="string")e.classList.add(t);else if(Array.isArray(t))t.forEach(s=>{r(this,y,J).call(this,e,s)});else if(typeof t=="object")if(t instanceof c.Store)r(this,T,D).call(this,e,t);else for(const s in t){const i=t[s];i instanceof c.Store?r(this,m,G).call(this,e,s,i):i?e.classList.add(s):e.classList.remove(s)}}else return},T=new WeakSet,D=function(e,t){t.subscribe(({current:s,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e.classList.remove(n)}),s&&[s].flat().forEach(n=>{n&&e.classList.add(n)})})},m=new WeakSet,G=function(e,t,s){s.subscribe(({current:i})=>{i?e.classList.add(t):e.classList.remove(t)})},A=new WeakSet,I=function(e,t){if(!t)return;e.tagName==="style"||e.tagName==="STYLE"?r(this,S,M).call(this,e,t):r(this,x,Q).call(this,e,t)},x=new WeakSet,Q=function(e,t){for(const s in t){const i=s,n=t[i];n instanceof c.Store?n.subscribe(({current:a})=>{r(this,E,F).call(this,e,i,a)}):r(this,E,F).call(this,e,i,n)}},S=new WeakSet,M=function(e,t){for(const s in t){const i=t[s];if(typeof i=="object"&&!(i instanceof c.Store))e.appendChild(new Text(`${s} {`)),r(this,S,M).call(this,e,i),e.appendChild(new Text("}"));else if(i instanceof c.Store){const n=new Text;i.subscribe(a=>{a.current?n.nodeValue=`${U.camelToKebab(s)}: ${a.current};`:n.nodeValue=""}),e.appendChild(n)}else e.appendChild(new Text(`${U.camelToKebab(s)}: ${i};`))}},E=new WeakSet,F=function(e,t,s){t.includes("--")?s?e.style.setProperty(t,s):e.style.removeProperty(t):s?e.style[t]=s:e.style[t]=""},p=new WeakSet,X=function(e,t){if(t)for(const s in t){const i=s,n=t[i];typeof n=="object"?e.addEventListener(i,n.callback,n.options):typeof n=="function"&&e.addEventListener(i,n)}},q=new WeakSet,Z=function(e,t){for(const s in t){const i=t[s];i instanceof c.Store?i.subscribe(({current:n})=>{r(this,g,K).call(this,e,s,n)}):r(this,g,K).call(this,e,s,i)}},g=new WeakSet,K=function(e,t,s){var i,n;t in e&&!((n=(i=e.constructor)==null?void 0:i.observedAttributes)!=null&&n.includes(t))?s!=null&&(e[t]=s.toString()):s!=null&&e.setAttribute(t,s.toString())},b=new WeakSet,R=function(e,t){t&&(t=[t].flat(),t.forEach(s=>{if(s instanceof c.Store){const i=document.createElement("div");i.style.display="contents",e.appendChild(i),s.subscribe(({current:n})=>{r(this,$,O).call(this,i,r(this,P,_).call(this,n),Array.from(i.childNodes))})}else if(s instanceof u)e.append(...s.rootElements);else{const i=r(this,L,V).call(this,s);i instanceof Node&&e.append(i)}}))},P=new WeakSet,_=function(e){return[e].flat().map(s=>s instanceof u?s.rootElements:r(this,L,V).call(this,s)).flat().filter(Boolean)},$=new WeakSet,O=function(e,t,s){s.forEach((i,n)=>{if(n<t.length){const a=t[n];r(this,k,j).call(this,i,a)||e.replaceChild(a,i)}else e.removeChild(i)});for(let i=s.length;i<t.length;i++)e.appendChild(t[i])},k=new WeakSet,j=function(e,t){return t?t instanceof Node?e.isEqualNode(t):e.textContent===t.toString():!1},L=new WeakSet,V=function(e){if(e instanceof Node)return e;if(e!=null){const t=String(e);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const s=document.createElement("div");return s.innerHTML=t,s.firstElementChild}else return new Text(t)}else return},B=new WeakSet,tt=function(e,t){if(!t)return;(t instanceof u?t.rootElements[0]:t).appendChild(e)};let h=u;function st(...f){return new h(...f)}function it(...f){return()=>new h(...f)}exports.ElementConstructor=h;exports.element=st;exports.elementFactory=it;
@@ -1 +0,0 @@
1
- "use strict";var v=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var r=(s,t,e)=>(v(s,t,"read from private field"),e?e.call(s):t.get(s)),a=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},i=(s,t,e,c)=>(v(s,t,"write to private field"),c?c.call(s,e):t.set(s,e),e);var R=(s,t,e)=>(v(s,t,"access private method"),e);const A=require("./browser-CpzFX2xg.cjs");var l,o,S;class M{constructor(){a(this,l,null);a(this,o,"");a(this,S,"");A.isBrowser&&(i(this,o,document.documentElement.getAttribute("data-project")||"unnamed"),i(this,S,r(this,o)?r(this,o)+"-store-registry":"store-registry"))}get projectName(){return r(this,o)}get localStoreRegistryName(){return r(this,S)}get loadedState(){return r(this,l)}saveState(){const t=this.getState(),e=JSON.stringify(t);localStorage.setItem(r(this,S),e)}loadState(t=localStorage.getItem(r(this,S))){t&&(typeof t=="string"?i(this,l,JSON.parse(t)):i(this,l,t),u.current.forEach(e=>{this.updateStore(e)}))}resetState(){u.current.forEach(t=>{t.reset()}),this.saveState()}updateStore(t){var c,p;if(!Array.isArray((c=r(this,l))==null?void 0:c.stores))return t;const e=t.passport;if(e){const N=(p=r(this,l))==null?void 0:p.stores.find(z=>z.name===e.name);N&&(t.current=N.value)}return t}getState(){const t={stores:[]};return u.current.forEach(e=>{e.passport&&t.stores.push({value:e.current,name:e.passport.name})}),t}}l=new WeakMap,o=new WeakMap,S=new WeakMap;const E=new M;var d,m,g,f,y,n,b,h,w,q;class j{constructor(t,e){a(this,w);a(this,d,void 0);a(this,m,void 0);a(this,g,void 0);a(this,f,void 0);a(this,y,void 0);a(this,n,new Set);a(this,b,void 0);a(this,h,void 0);i(this,d,e==null?void 0:e.passport),i(this,m,t),i(this,g,void 0),i(this,f,t),i(this,y,(e==null?void 0:e.equalityCheck)||((c,p)=>c===p)),e!=null&&e.validate&&this.addMiddleware(e.validate),i(this,b,(e==null?void 0:e.skipSubscribeNotification)||!1),r(this,d)&&E.updateStore(this)}get passport(){return r(this,d)}get initial(){return r(this,m)}get previous(){return r(this,g)}get current(){return r(this,f)}set current(t){if(!r(this,y).call(this,r(this,f),t)){if(i(this,g,r(this,f)),r(this,h))for(const e of r(this,h))t=e(t);i(this,f,t),R(this,w,q).call(this)}}get subscribers(){return r(this,n)}get entry(){return{current:r(this,f),previous:r(this,g)}}addMiddleware(t){r(this,h)||i(this,h,new Set),r(this,h).add(t)}removeMiddleware(t){var e,c;(e=r(this,h))==null||e.delete(t),(c=r(this,h))!=null&&c.size||i(this,h,void 0)}subscribe(t){return r(this,d)&&!r(this,n).size&&C(this),r(this,n).add(t),r(this,b)||t(this.entry),()=>{this.unsubscribe(t)}}unsubscribe(t){r(this,n).delete(t),r(this,d)&&!r(this,n).size&&k(this)}reset(){this.current=this.initial}close(){r(this,n).clear(),r(this,d)&&k(this)}}d=new WeakMap,m=new WeakMap,g=new WeakMap,f=new WeakMap,y=new WeakMap,n=new WeakMap,b=new WeakMap,h=new WeakMap,w=new WeakSet,q=function(){for(const t of r(this,n))t(this.entry)};const u=new j([]);function C(s){u.current.find(t=>t.passport.name===s.passport.name)||(u.current=[...u.current,s])}function k(s){u.current.includes(s)&&(u.current=u.current.filter(t=>t!==s))}exports.Store=j;exports.activeStores=u;exports.storeRegistry=E;
@@ -1,8 +0,0 @@
1
- import { aB as n } from "./htmlTags-CNEFIHPp.js";
2
- function o(t) {
3
- const e = new CSSStyleSheet();
4
- return e.replaceSync(n(t).rootElements[0].innerHTML), e;
5
- }
6
- export {
7
- o as c
8
- };
@@ -1,12 +0,0 @@
1
- export type ComponentWrapperCreateCallback = (rootNode: Node) => void;
2
- export type ComponentWrapperConnectCallback = (rootNode: Node) => (() => void) | void;
3
- export type ComponentWrapperDisconnectCallback = (rootNode: Node) => void;
4
- export declare let currentComponentWrapper: ComponentWrapper;
5
- export declare class ComponentWrapper {
6
- #private;
7
- constructor(functionName: string, jsxElementCallback: () => JSX.Element);
8
- get rootNode(): Node;
9
- addCreateCallback(callback: ComponentWrapperCreateCallback): void;
10
- addConnectCallback(callback: ComponentWrapperConnectCallback): void;
11
- addDisconnectCallback(callback: ComponentWrapperDisconnectCallback): void;
12
- }