@mrts/soltw 0.3.27 → 0.3.29

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/dist/index.js CHANGED
@@ -100,13 +100,6 @@ function createRenderEffect(fn, value, options) {
100
100
  if (Scheduler && Transition && Transition.running) Updates.push(c);
101
101
  else updateComputation(c);
102
102
  }
103
- function createEffect(fn, value, options) {
104
- runEffects = runUserEffects;
105
- const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
106
- if (s) c.suspense = s;
107
- if (!options || !options.render) c.user = true;
108
- Effects ? Effects.push(c) : updateComputation(c);
109
- }
110
103
  function createMemo(fn, value, options) {
111
104
  options = options ? Object.assign({}, signalOptions, options) : signalOptions;
112
105
  const c = createComputation(fn, value, true, 0);
@@ -165,10 +158,6 @@ function startTransition(fn) {
165
158
  });
166
159
  }
167
160
  const [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
168
- function useContext(context) {
169
- let value;
170
- return Owner && Owner.context && (value = Owner.context[context.id]) !== void 0 ? value : context.defaultValue;
171
- }
172
161
  let SuspenseContext;
173
162
  function readSignal() {
174
163
  const runningTransition = Transition && Transition.running;
@@ -418,28 +407,6 @@ function scheduleQueue(queue) {
418
407
  }
419
408
  }
420
409
  }
421
- function runUserEffects(queue) {
422
- let i, userLength = 0;
423
- for (i = 0; i < queue.length; i++) {
424
- const e = queue[i];
425
- if (!e.user) runTop(e);
426
- else queue[userLength++] = e;
427
- }
428
- if (sharedConfig.context) {
429
- if (sharedConfig.count) {
430
- sharedConfig.effects || (sharedConfig.effects = []);
431
- sharedConfig.effects.push(...queue.slice(0, userLength));
432
- return;
433
- }
434
- setHydrateContext();
435
- }
436
- if (sharedConfig.effects && (sharedConfig.done || !sharedConfig.count)) {
437
- queue = [...sharedConfig.effects, ...queue];
438
- userLength += sharedConfig.effects.length;
439
- delete sharedConfig.effects;
440
- }
441
- for (i = 0; i < userLength; i++) runTop(queue[i]);
442
- }
443
410
  function lookUpstream(node, ignore) {
444
411
  const runningTransition = Transition && Transition.running;
445
412
  if (runningTransition) node.tState = 0;
@@ -3119,9 +3086,7 @@ var Stylers = class {
3119
3086
  var _tmpl$$2 = /* @__PURE__ */ template(`<div>`);
3120
3087
  const Item = (props) => {
3121
3088
  const itemData = () => {
3122
- const r = buildIdLabel(props.idLabel);
3123
- if (props.selected) r.label = `[${r.label}]`;
3124
- return r;
3089
+ return buildIdLabel(props.idLabel);
3125
3090
  };
3126
3091
  const currentSTags = () => {
3127
3092
  const r = [];
@@ -3164,6 +3129,7 @@ const Item = (props) => {
3164
3129
  if (props.callback != void 0) {
3165
3130
  props.callback(itemData());
3166
3131
  e.stopPropagation();
3132
+ e.preventDefault();
3167
3133
  }
3168
3134
  }
3169
3135
  return (() => {
@@ -3214,9 +3180,6 @@ const Block = (props) => {
3214
3180
  //#region src/items/ItemGroup.tsx
3215
3181
  const ItemGroup = (props) => {
3216
3182
  const items = () => props.items.map(buildIdLabel);
3217
- createEffect(() => {
3218
- console.log("GROUP ITEMS", items());
3219
- });
3220
3183
  const currentVTags = createMemo(() => {
3221
3184
  const item = [];
3222
3185
  const group = [];
package/dist/index.jsx CHANGED
@@ -17,25 +17,6 @@ function buildIdLabel(arg) {
17
17
 
18
18
  //#endregion
19
19
  //#region ../../node_modules/solid-js/dist/solid.js
20
- const sharedConfig = {
21
- context: void 0,
22
- registry: void 0,
23
- effects: void 0,
24
- done: false,
25
- getContextId() {
26
- return getContextId(this.context.count);
27
- },
28
- getNextContextId() {
29
- return getContextId(this.context.count++);
30
- }
31
- };
32
- function getContextId(count) {
33
- const num = String(count), len = num.length - 1;
34
- return sharedConfig.context.id + (len ? String.fromCharCode(96 + len) : "") + num;
35
- }
36
- function setHydrateContext(context) {
37
- sharedConfig.context = context;
38
- }
39
20
  const equalFn = (a, b) => a === b;
40
21
  const $TRACK = Symbol("solid-track");
41
22
  const signalOptions = { equals: equalFn };
@@ -88,13 +69,6 @@ function createSignal(value, options) {
88
69
  };
89
70
  return [readSignal.bind(s), setter];
90
71
  }
91
- function createEffect(fn, value, options) {
92
- runEffects = runUserEffects;
93
- const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
94
- if (s) c.suspense = s;
95
- if (!options || !options.render) c.user = true;
96
- Effects ? Effects.push(c) : updateComputation(c);
97
- }
98
72
  function createMemo(fn, value, options) {
99
73
  options = options ? Object.assign({}, signalOptions, options) : signalOptions;
100
74
  const c = createComputation(fn, value, true, 0);
@@ -153,10 +127,6 @@ function startTransition(fn) {
153
127
  });
154
128
  }
155
129
  const [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
156
- function useContext(context) {
157
- let value;
158
- return Owner && Owner.context && (value = Owner.context[context.id]) !== void 0 ? value : context.defaultValue;
159
- }
160
130
  let SuspenseContext;
161
131
  function readSignal() {
162
132
  const runningTransition = Transition && Transition.running;
@@ -406,28 +376,6 @@ function scheduleQueue(queue) {
406
376
  }
407
377
  }
408
378
  }
409
- function runUserEffects(queue) {
410
- let i, userLength = 0;
411
- for (i = 0; i < queue.length; i++) {
412
- const e = queue[i];
413
- if (!e.user) runTop(e);
414
- else queue[userLength++] = e;
415
- }
416
- if (sharedConfig.context) {
417
- if (sharedConfig.count) {
418
- sharedConfig.effects || (sharedConfig.effects = []);
419
- sharedConfig.effects.push(...queue.slice(0, userLength));
420
- return;
421
- }
422
- setHydrateContext();
423
- }
424
- if (sharedConfig.effects && (sharedConfig.done || !sharedConfig.count)) {
425
- queue = [...sharedConfig.effects, ...queue];
426
- userLength += sharedConfig.effects.length;
427
- delete sharedConfig.effects;
428
- }
429
- for (i = 0; i < userLength; i++) runTop(queue[i]);
430
- }
431
379
  function lookUpstream(node, ignore) {
432
380
  const runningTransition = Transition && Transition.running;
433
381
  if (runningTransition) node.tState = 0;
@@ -2755,9 +2703,7 @@ var Stylers = class {
2755
2703
  //#region src/items/Item.tsx
2756
2704
  const Item = (props) => {
2757
2705
  const itemData = () => {
2758
- const r = buildIdLabel(props.idLabel);
2759
- if (props.selected) r.label = `[${r.label}]`;
2760
- return r;
2706
+ return buildIdLabel(props.idLabel);
2761
2707
  };
2762
2708
  const currentSTags = () => {
2763
2709
  const r = [];
@@ -2800,6 +2746,7 @@ const Item = (props) => {
2800
2746
  if (props.callback != void 0) {
2801
2747
  props.callback(itemData());
2802
2748
  e.stopPropagation();
2749
+ e.preventDefault();
2803
2750
  }
2804
2751
  }
2805
2752
  return <div onClick={(e) => handleClick(e)} class={itemClasses()}>
@@ -2833,9 +2780,6 @@ const Block = (props) => {
2833
2780
  //#region src/items/ItemGroup.tsx
2834
2781
  const ItemGroup = (props) => {
2835
2782
  const items = () => props.items.map(buildIdLabel);
2836
- createEffect(() => {
2837
- console.log("GROUP ITEMS", items());
2838
- });
2839
2783
  const currentVTags = createMemo(() => {
2840
2784
  const item = [];
2841
2785
  const group = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mrts/soltw",
3
3
  "description": "S O L T W : SolidJS + tailwindcss ui components",
4
- "version": "0.3.27",
4
+ "version": "0.3.29",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "253945f8c59421c8a70325bcb13c4f9e2f12c4ce"
43
+ "gitHead": "2296d33f40347b27cdeddbabd5542806901fd8d1"
44
44
  }