@targoninc/jess-components 0.0.48 → 0.0.50

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.
@@ -7,5 +7,5 @@
7
7
  *
8
8
  * @module jess-components
9
9
  */
10
- export * from "./src/Components";
11
- export * from "./src/Types";
10
+ export * from "./jess-components/Components";
11
+ export * from "./jess-components/Types";
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- // @bun
2
1
  // node_modules/uuid/dist/esm/stringify.js
3
2
  var byteToHex = [];
4
3
  for (let i = 0;i < 256; ++i) {
@@ -49,7 +48,7 @@ function v4(options, buf, offset) {
49
48
  return unsafeStringify(rnds);
50
49
  }
51
50
  var v4_default = v4;
52
- // node_modules/@targoninc/jess/src/jess/signals.js
51
+ // node_modules/@targoninc/jess/dist/index.js
53
52
  class Signal {
54
53
  _callbacks = [];
55
54
  _keyCallbacks = new Map;
@@ -139,8 +138,6 @@ function asSignal(obj) {
139
138
  }
140
139
  return obj;
141
140
  }
142
-
143
- // node_modules/@targoninc/jess/src/jess/templating.js
144
141
  function create(tag) {
145
142
  return new DomNode(tag);
146
143
  }
@@ -176,9 +173,7 @@ function signalMap(arrayState, wrapper, callback, renderSequentially = false) {
176
173
  if (!newValue) {
177
174
  return;
178
175
  }
179
- const tmp = [
180
- ...newValue
181
- ].filter((t) => t !== undefined && t !== null);
176
+ const tmp = [...newValue].filter((t) => t !== undefined && t !== null);
182
177
  const children = [];
183
178
  if (renderSequentially) {
184
179
  wrapper.overwriteChildren();
@@ -197,33 +192,15 @@ function signalMap(arrayState, wrapper, callback, renderSequentially = false) {
197
192
  return wrapper.build();
198
193
  }
199
194
  function stack(message, debugInfo = {}) {
200
- console.warn(message, {
201
- debugInfo
202
- }, new Error().stack);
195
+ console.warn(message, { debugInfo }, new Error().stack);
203
196
  }
204
197
  function isValidElement(element) {
205
- const validTypes = [
206
- HTMLElement,
207
- SVGElement
208
- ];
198
+ const validTypes = [HTMLElement, SVGElement];
209
199
  return validTypes.some((type) => element instanceof type);
210
200
  }
211
201
  class DomNode {
212
202
  _node;
213
- svgTags = [
214
- "svg",
215
- "g",
216
- "circle",
217
- "ellipse",
218
- "line",
219
- "path",
220
- "polygon",
221
- "polyline",
222
- "rect",
223
- "text",
224
- "textPath",
225
- "tspan"
226
- ];
203
+ svgTags = ["svg", "g", "circle", "ellipse", "line", "path", "polygon", "polyline", "rect", "text", "textPath", "tspan"];
227
204
  constructor(tag) {
228
205
  if (this.svgTags.includes(tag)) {
229
206
  this._node = document.createElementNS("http://www.w3.org/2000/svg", tag);
@@ -745,8 +722,8 @@ class DomNode {
745
722
  return this;
746
723
  }
747
724
  }
748
- // node_modules/@targoninc/jess/src/jess/InputType.js
749
- var InputType = /* @__PURE__ */ function(InputType2) {
725
+ var InputType;
726
+ ((InputType2) => {
750
727
  InputType2["button"] = "button";
751
728
  InputType2["checkbox"] = "checkbox";
752
729
  InputType2["color"] = "color";
@@ -769,9 +746,9 @@ var InputType = /* @__PURE__ */ function(InputType2) {
769
746
  InputType2["time"] = "time";
770
747
  InputType2["url"] = "url";
771
748
  InputType2["week"] = "week";
772
- return InputType2;
773
- }({});
774
- // src/src/Debounce.ts
749
+ })(InputType ||= {});
750
+
751
+ // src/jess-components/Debounce.ts
775
752
  var debounceMap = {};
776
753
  function debounce(identifier, func, delay = 0) {
777
754
  if (!delay) {
@@ -787,7 +764,7 @@ function debounce(identifier, func, delay = 0) {
787
764
  }, delay);
788
765
  }
789
766
 
790
- // src/src/Components.ts
767
+ // src/jess-components/Components.ts
791
768
  function getDisabledClass(config) {
792
769
  let disabledClass;
793
770
  if (isSignal(config.disabled)) {
@@ -1074,7 +1051,7 @@ function checkbox(config) {
1074
1051
  validate(c);
1075
1052
  }
1076
1053
  config.onchange && config.onchange(c);
1077
- }).build(), create("span").classes("jessc-checkmark").children(when(config.checked, create("span").classes("jessc-checkmark-icon").text("\u2713").build())).build()).build(), when(hasError, errorList(errors))).build();
1054
+ }).build(), create("span").classes("jessc-checkmark").children(when(config.checked, create("span").classes("jessc-checkmark-icon").text("").build())).build()).build(), when(hasError, errorList(errors))).build();
1078
1055
  }
1079
1056
  function toggle(config) {
1080
1057
  const errors = signal([]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@targoninc/jess-components",
3
3
  "type": "module",
4
- "version": "0.0.48",
4
+ "version": "0.0.50",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
@@ -12,12 +12,12 @@
12
12
  "url": "git+https://github.com/targoninc/jess-components.git"
13
13
  },
14
14
  "scripts": {
15
- "build": "bun build ./src/index.ts --outdir ./dist --target bun --format esm && tsc",
15
+ "build": "tsc && bun build ./src/*.ts --outdir ./dist --target node --format esm --root ./src",
16
16
  "typecheck": "tsc --noEmit",
17
17
  "prepublishOnly": "bun run build"
18
18
  },
19
19
  "dependencies": {
20
- "@targoninc/jess": "npm:@jsr/targoninc__jess@^0.0.26",
20
+ "@targoninc/jess": "^0.0.30",
21
21
  "uuid": "^11.1.0"
22
22
  },
23
23
  "devDependencies": {
@@ -1,33 +0,0 @@
1
- export function toggle(config: any): any;
2
- export function textarea(config: any): any;
3
- export function text(config: any): any;
4
- export function select(config: any): any;
5
- export function searchableSelect(config: any): any;
6
- export function searchSelectOption(config: any): any;
7
- export function input(config: any): any;
8
- export function icon(config: any): Signal;
9
- export function heading(config: any): any;
10
- export function eyeButton(toggleState: any, onClick: any): any;
11
- export function errorList(errors: any): any;
12
- export function error(error2: any): any;
13
- export function container(config: any): any;
14
- export function checkbox(config: any): any;
15
- export function button(config: any): any;
16
- export function area(config: any): any;
17
- declare class Signal {
18
- constructor(initialValue: any);
19
- _callbacks: any[];
20
- _keyCallbacks: Map<any, any>;
21
- _value: any;
22
- _values: {};
23
- type: string;
24
- boolValues(assignments?: {}): {};
25
- unsubscribeAll(): void;
26
- subscribe(callback: any, key: any): void;
27
- unsubscribe(callback: any): void;
28
- unsubscribeKey(key: any): void;
29
- set value(value: any);
30
- get value(): any;
31
- toString(): any;
32
- }
33
- export {};
File without changes
File without changes