tinymce-solid 0.0.3 → 0.0.4

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.jsx CHANGED
@@ -24,18 +24,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  mod
25
25
  ));
26
26
 
27
- // node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js
27
+ // node_modules/prop-types/lib/ReactPropTypesSecret.js
28
28
  var require_ReactPropTypesSecret = __commonJS({
29
- "node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
29
+ "node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
30
30
  "use strict";
31
31
  var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
32
32
  module.exports = ReactPropTypesSecret;
33
33
  }
34
34
  });
35
35
 
36
- // node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js
36
+ // node_modules/prop-types/factoryWithThrowingShims.js
37
37
  var require_factoryWithThrowingShims = __commonJS({
38
- "node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js"(exports, module) {
38
+ "node_modules/prop-types/factoryWithThrowingShims.js"(exports, module) {
39
39
  "use strict";
40
40
  var ReactPropTypesSecret = require_ReactPropTypesSecret();
41
41
  function emptyFunction() {
@@ -89,9 +89,9 @@ var require_factoryWithThrowingShims = __commonJS({
89
89
  }
90
90
  });
91
91
 
92
- // node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js
92
+ // node_modules/prop-types/index.js
93
93
  var require_prop_types = __commonJS({
94
- "node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"(exports, module) {
94
+ "node_modules/prop-types/index.js"(exports, module) {
95
95
  "use strict";
96
96
  if (false) {
97
97
  ReactIs = null;
@@ -575,7 +575,9 @@ var SolidEditor = (props) => {
575
575
  initialise();
576
576
  } else if (Array.isArray(props.tinymceScriptSrc) && props.tinymceScriptSrc.length === 0) {
577
577
  props.onScriptsLoadError?.(
578
- new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array.")
578
+ new Error(
579
+ "No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."
580
+ )
579
581
  );
580
582
  } else if (props?.elementRef?.ownerDocument) {
581
583
  ScriptLoader.loadList(
@@ -1,6 +1,3 @@
1
- import { use, effect, setAttribute, template } from 'solid-js/web';
2
- import { createSignal, createEffect, on, onMount, onCleanup } from 'solid-js';
3
-
4
1
  var __create = Object.create;
5
2
  var __defProp = Object.defineProperty;
6
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -27,17 +24,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
24
  mod
28
25
  ));
29
26
 
30
- // node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js
27
+ // node_modules/prop-types/lib/ReactPropTypesSecret.js
31
28
  var require_ReactPropTypesSecret = __commonJS({
32
- "node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
29
+ "node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
33
30
  var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
34
31
  module.exports = ReactPropTypesSecret;
35
32
  }
36
33
  });
37
34
 
38
- // node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js
35
+ // node_modules/prop-types/factoryWithThrowingShims.js
39
36
  var require_factoryWithThrowingShims = __commonJS({
40
- "node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js"(exports, module) {
37
+ "node_modules/prop-types/factoryWithThrowingShims.js"(exports, module) {
41
38
  var ReactPropTypesSecret = require_ReactPropTypesSecret();
42
39
  function emptyFunction() {
43
40
  }
@@ -88,15 +85,590 @@ var require_factoryWithThrowingShims = __commonJS({
88
85
  }
89
86
  });
90
87
 
91
- // node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js
88
+ // node_modules/prop-types/index.js
92
89
  var require_prop_types = __commonJS({
93
- "node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"(exports, module) {
90
+ "node_modules/prop-types/index.js"(exports, module) {
94
91
  {
95
92
  module.exports = require_factoryWithThrowingShims()();
96
93
  }
97
94
  }
98
95
  });
99
96
 
97
+ // node_modules/solid-js/dist/solid.js
98
+ var sharedConfig = {
99
+ context: void 0,
100
+ registry: void 0
101
+ };
102
+ function setHydrateContext(context) {
103
+ sharedConfig.context = context;
104
+ }
105
+ var equalFn = (a, b) => a === b;
106
+ var signalOptions = {
107
+ equals: equalFn
108
+ };
109
+ var ERROR = null;
110
+ var runEffects = runQueue;
111
+ var STALE = 1;
112
+ var PENDING = 2;
113
+ var UNOWNED = {
114
+ owned: null,
115
+ cleanups: null,
116
+ context: null,
117
+ owner: null
118
+ };
119
+ var Owner = null;
120
+ var Transition = null;
121
+ var Scheduler = null;
122
+ var ExternalSourceConfig = null;
123
+ var Listener = null;
124
+ var Updates = null;
125
+ var Effects = null;
126
+ var ExecCount = 0;
127
+ function createSignal(value, options) {
128
+ options = options ? Object.assign({}, signalOptions, options) : signalOptions;
129
+ const s = {
130
+ value,
131
+ observers: null,
132
+ observerSlots: null,
133
+ comparator: options.equals || void 0
134
+ };
135
+ const setter = (value2) => {
136
+ if (typeof value2 === "function") {
137
+ if (Transition && Transition.running && Transition.sources.has(s)) value2 = value2(s.tValue);
138
+ else value2 = value2(s.value);
139
+ }
140
+ return writeSignal(s, value2);
141
+ };
142
+ return [readSignal.bind(s), setter];
143
+ }
144
+ function createRenderEffect(fn, value, options) {
145
+ const c = createComputation(fn, value, false, STALE);
146
+ if (Scheduler && Transition && Transition.running) Updates.push(c);
147
+ else updateComputation(c);
148
+ }
149
+ function createEffect(fn, value, options) {
150
+ runEffects = runUserEffects;
151
+ const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
152
+ if (s) c.suspense = s;
153
+ c.user = true;
154
+ Effects ? Effects.push(c) : updateComputation(c);
155
+ }
156
+ function untrack(fn) {
157
+ if (!ExternalSourceConfig && Listener === null) return fn();
158
+ const listener = Listener;
159
+ Listener = null;
160
+ try {
161
+ if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
162
+ return fn();
163
+ } finally {
164
+ Listener = listener;
165
+ }
166
+ }
167
+ function on(deps, fn, options) {
168
+ const isArray = Array.isArray(deps);
169
+ let prevInput;
170
+ return (prevValue) => {
171
+ let input;
172
+ if (isArray) {
173
+ input = Array(deps.length);
174
+ for (let i = 0; i < deps.length; i++) input[i] = deps[i]();
175
+ } else input = deps();
176
+ const result = untrack(() => fn(input, prevInput, prevValue));
177
+ prevInput = input;
178
+ return result;
179
+ };
180
+ }
181
+ function onMount(fn) {
182
+ createEffect(() => untrack(fn));
183
+ }
184
+ function onCleanup(fn) {
185
+ if (Owner === null) ;
186
+ else if (Owner.cleanups === null) Owner.cleanups = [fn];
187
+ else Owner.cleanups.push(fn);
188
+ return fn;
189
+ }
190
+ function startTransition(fn) {
191
+ if (Transition && Transition.running) {
192
+ fn();
193
+ return Transition.done;
194
+ }
195
+ const l = Listener;
196
+ const o = Owner;
197
+ return Promise.resolve().then(() => {
198
+ Listener = l;
199
+ Owner = o;
200
+ let t;
201
+ if (Scheduler || SuspenseContext) {
202
+ t = Transition || (Transition = {
203
+ sources: /* @__PURE__ */ new Set(),
204
+ effects: [],
205
+ promises: /* @__PURE__ */ new Set(),
206
+ disposed: /* @__PURE__ */ new Set(),
207
+ queue: /* @__PURE__ */ new Set(),
208
+ running: true
209
+ });
210
+ t.done || (t.done = new Promise((res) => t.resolve = res));
211
+ t.running = true;
212
+ }
213
+ runUpdates(fn);
214
+ Listener = Owner = null;
215
+ return t ? t.done : void 0;
216
+ });
217
+ }
218
+ var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
219
+ function useContext(context) {
220
+ return Owner && Owner.context && Owner.context[context.id] !== void 0 ? Owner.context[context.id] : context.defaultValue;
221
+ }
222
+ var SuspenseContext;
223
+ function readSignal() {
224
+ const runningTransition = Transition && Transition.running;
225
+ if (this.sources && (runningTransition ? this.tState : this.state)) {
226
+ if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);
227
+ else {
228
+ const updates = Updates;
229
+ Updates = null;
230
+ runUpdates(() => lookUpstream(this));
231
+ Updates = updates;
232
+ }
233
+ }
234
+ if (Listener) {
235
+ const sSlot = this.observers ? this.observers.length : 0;
236
+ if (!Listener.sources) {
237
+ Listener.sources = [this];
238
+ Listener.sourceSlots = [sSlot];
239
+ } else {
240
+ Listener.sources.push(this);
241
+ Listener.sourceSlots.push(sSlot);
242
+ }
243
+ if (!this.observers) {
244
+ this.observers = [Listener];
245
+ this.observerSlots = [Listener.sources.length - 1];
246
+ } else {
247
+ this.observers.push(Listener);
248
+ this.observerSlots.push(Listener.sources.length - 1);
249
+ }
250
+ }
251
+ if (runningTransition && Transition.sources.has(this)) return this.tValue;
252
+ return this.value;
253
+ }
254
+ function writeSignal(node, value, isComp) {
255
+ let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
256
+ if (!node.comparator || !node.comparator(current, value)) {
257
+ if (Transition) {
258
+ const TransitionRunning = Transition.running;
259
+ if (TransitionRunning || !isComp && Transition.sources.has(node)) {
260
+ Transition.sources.add(node);
261
+ node.tValue = value;
262
+ }
263
+ if (!TransitionRunning) node.value = value;
264
+ } else node.value = value;
265
+ if (node.observers && node.observers.length) {
266
+ runUpdates(() => {
267
+ for (let i = 0; i < node.observers.length; i += 1) {
268
+ const o = node.observers[i];
269
+ const TransitionRunning = Transition && Transition.running;
270
+ if (TransitionRunning && Transition.disposed.has(o)) continue;
271
+ if (TransitionRunning ? !o.tState : !o.state) {
272
+ if (o.pure) Updates.push(o);
273
+ else Effects.push(o);
274
+ if (o.observers) markDownstream(o);
275
+ }
276
+ if (!TransitionRunning) o.state = STALE;
277
+ else o.tState = STALE;
278
+ }
279
+ if (Updates.length > 1e6) {
280
+ Updates = [];
281
+ if (false) ;
282
+ throw new Error();
283
+ }
284
+ });
285
+ }
286
+ }
287
+ return value;
288
+ }
289
+ function updateComputation(node) {
290
+ if (!node.fn) return;
291
+ cleanNode(node);
292
+ const time = ExecCount;
293
+ runComputation(
294
+ node,
295
+ Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value,
296
+ time
297
+ );
298
+ if (Transition && !Transition.running && Transition.sources.has(node)) {
299
+ queueMicrotask(() => {
300
+ runUpdates(() => {
301
+ Transition && (Transition.running = true);
302
+ Listener = Owner = node;
303
+ runComputation(node, node.tValue, time);
304
+ Listener = Owner = null;
305
+ });
306
+ });
307
+ }
308
+ }
309
+ function runComputation(node, value, time) {
310
+ let nextValue;
311
+ const owner = Owner, listener = Listener;
312
+ Listener = Owner = node;
313
+ try {
314
+ nextValue = node.fn(value);
315
+ } catch (err) {
316
+ if (node.pure) {
317
+ if (Transition && Transition.running) {
318
+ node.tState = STALE;
319
+ node.tOwned && node.tOwned.forEach(cleanNode);
320
+ node.tOwned = void 0;
321
+ } else {
322
+ node.state = STALE;
323
+ node.owned && node.owned.forEach(cleanNode);
324
+ node.owned = null;
325
+ }
326
+ }
327
+ node.updatedAt = time + 1;
328
+ return handleError(err);
329
+ } finally {
330
+ Listener = listener;
331
+ Owner = owner;
332
+ }
333
+ if (!node.updatedAt || node.updatedAt <= time) {
334
+ if (node.updatedAt != null && "observers" in node) {
335
+ writeSignal(node, nextValue, true);
336
+ } else if (Transition && Transition.running && node.pure) {
337
+ Transition.sources.add(node);
338
+ node.tValue = nextValue;
339
+ } else node.value = nextValue;
340
+ node.updatedAt = time;
341
+ }
342
+ }
343
+ function createComputation(fn, init, pure, state = STALE, options) {
344
+ const c = {
345
+ fn,
346
+ state,
347
+ updatedAt: null,
348
+ owned: null,
349
+ sources: null,
350
+ sourceSlots: null,
351
+ cleanups: null,
352
+ value: init,
353
+ owner: Owner,
354
+ context: Owner ? Owner.context : null,
355
+ pure
356
+ };
357
+ if (Transition && Transition.running) {
358
+ c.state = 0;
359
+ c.tState = state;
360
+ }
361
+ if (Owner === null) ;
362
+ else if (Owner !== UNOWNED) {
363
+ if (Transition && Transition.running && Owner.pure) {
364
+ if (!Owner.tOwned) Owner.tOwned = [c];
365
+ else Owner.tOwned.push(c);
366
+ } else {
367
+ if (!Owner.owned) Owner.owned = [c];
368
+ else Owner.owned.push(c);
369
+ }
370
+ }
371
+ if (ExternalSourceConfig && c.fn) {
372
+ const [track, trigger] = createSignal(void 0, {
373
+ equals: false
374
+ });
375
+ const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
376
+ onCleanup(() => ordinary.dispose());
377
+ const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
378
+ const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
379
+ c.fn = (x) => {
380
+ track();
381
+ return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
382
+ };
383
+ }
384
+ return c;
385
+ }
386
+ function runTop(node) {
387
+ const runningTransition = Transition && Transition.running;
388
+ if ((runningTransition ? node.tState : node.state) === 0) return;
389
+ if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);
390
+ if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
391
+ const ancestors = [node];
392
+ while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
393
+ if (runningTransition && Transition.disposed.has(node)) return;
394
+ if (runningTransition ? node.tState : node.state) ancestors.push(node);
395
+ }
396
+ for (let i = ancestors.length - 1; i >= 0; i--) {
397
+ node = ancestors[i];
398
+ if (runningTransition) {
399
+ let top = node, prev = ancestors[i + 1];
400
+ while ((top = top.owner) && top !== prev) {
401
+ if (Transition.disposed.has(top)) return;
402
+ }
403
+ }
404
+ if ((runningTransition ? node.tState : node.state) === STALE) {
405
+ updateComputation(node);
406
+ } else if ((runningTransition ? node.tState : node.state) === PENDING) {
407
+ const updates = Updates;
408
+ Updates = null;
409
+ runUpdates(() => lookUpstream(node, ancestors[0]));
410
+ Updates = updates;
411
+ }
412
+ }
413
+ }
414
+ function runUpdates(fn, init) {
415
+ if (Updates) return fn();
416
+ let wait = false;
417
+ Updates = [];
418
+ if (Effects) wait = true;
419
+ else Effects = [];
420
+ ExecCount++;
421
+ try {
422
+ const res = fn();
423
+ completeUpdates(wait);
424
+ return res;
425
+ } catch (err) {
426
+ if (!wait) Effects = null;
427
+ Updates = null;
428
+ handleError(err);
429
+ }
430
+ }
431
+ function completeUpdates(wait) {
432
+ if (Updates) {
433
+ if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);
434
+ else runQueue(Updates);
435
+ Updates = null;
436
+ }
437
+ if (wait) return;
438
+ let res;
439
+ if (Transition) {
440
+ if (!Transition.promises.size && !Transition.queue.size) {
441
+ const sources = Transition.sources;
442
+ const disposed = Transition.disposed;
443
+ Effects.push.apply(Effects, Transition.effects);
444
+ res = Transition.resolve;
445
+ for (const e2 of Effects) {
446
+ "tState" in e2 && (e2.state = e2.tState);
447
+ delete e2.tState;
448
+ }
449
+ Transition = null;
450
+ runUpdates(() => {
451
+ for (const d of disposed) cleanNode(d);
452
+ for (const v of sources) {
453
+ v.value = v.tValue;
454
+ if (v.owned) {
455
+ for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);
456
+ }
457
+ if (v.tOwned) v.owned = v.tOwned;
458
+ delete v.tValue;
459
+ delete v.tOwned;
460
+ v.tState = 0;
461
+ }
462
+ setTransPending(false);
463
+ });
464
+ } else if (Transition.running) {
465
+ Transition.running = false;
466
+ Transition.effects.push.apply(Transition.effects, Effects);
467
+ Effects = null;
468
+ setTransPending(true);
469
+ return;
470
+ }
471
+ }
472
+ const e = Effects;
473
+ Effects = null;
474
+ if (e.length) runUpdates(() => runEffects(e));
475
+ if (res) res();
476
+ }
477
+ function runQueue(queue) {
478
+ for (let i = 0; i < queue.length; i++) runTop(queue[i]);
479
+ }
480
+ function scheduleQueue(queue) {
481
+ for (let i = 0; i < queue.length; i++) {
482
+ const item = queue[i];
483
+ const tasks = Transition.queue;
484
+ if (!tasks.has(item)) {
485
+ tasks.add(item);
486
+ Scheduler(() => {
487
+ tasks.delete(item);
488
+ runUpdates(() => {
489
+ Transition.running = true;
490
+ runTop(item);
491
+ });
492
+ Transition && (Transition.running = false);
493
+ });
494
+ }
495
+ }
496
+ }
497
+ function runUserEffects(queue) {
498
+ let i, userLength = 0;
499
+ for (i = 0; i < queue.length; i++) {
500
+ const e = queue[i];
501
+ if (!e.user) runTop(e);
502
+ else queue[userLength++] = e;
503
+ }
504
+ if (sharedConfig.context) {
505
+ if (sharedConfig.count) {
506
+ sharedConfig.effects || (sharedConfig.effects = []);
507
+ sharedConfig.effects.push(...queue.slice(0, userLength));
508
+ return;
509
+ } else if (sharedConfig.effects) {
510
+ queue = [...sharedConfig.effects, ...queue];
511
+ userLength += sharedConfig.effects.length;
512
+ delete sharedConfig.effects;
513
+ }
514
+ setHydrateContext();
515
+ }
516
+ for (i = 0; i < userLength; i++) runTop(queue[i]);
517
+ }
518
+ function lookUpstream(node, ignore) {
519
+ const runningTransition = Transition && Transition.running;
520
+ if (runningTransition) node.tState = 0;
521
+ else node.state = 0;
522
+ for (let i = 0; i < node.sources.length; i += 1) {
523
+ const source = node.sources[i];
524
+ if (source.sources) {
525
+ const state = runningTransition ? source.tState : source.state;
526
+ if (state === STALE) {
527
+ if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
528
+ runTop(source);
529
+ } else if (state === PENDING) lookUpstream(source, ignore);
530
+ }
531
+ }
532
+ }
533
+ function markDownstream(node) {
534
+ const runningTransition = Transition && Transition.running;
535
+ for (let i = 0; i < node.observers.length; i += 1) {
536
+ const o = node.observers[i];
537
+ if (runningTransition ? !o.tState : !o.state) {
538
+ if (runningTransition) o.tState = PENDING;
539
+ else o.state = PENDING;
540
+ if (o.pure) Updates.push(o);
541
+ else Effects.push(o);
542
+ o.observers && markDownstream(o);
543
+ }
544
+ }
545
+ }
546
+ function cleanNode(node) {
547
+ let i;
548
+ if (node.sources) {
549
+ while (node.sources.length) {
550
+ const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
551
+ if (obs && obs.length) {
552
+ const n = obs.pop(), s = source.observerSlots.pop();
553
+ if (index < obs.length) {
554
+ n.sourceSlots[s] = index;
555
+ obs[index] = n;
556
+ source.observerSlots[index] = s;
557
+ }
558
+ }
559
+ }
560
+ }
561
+ if (Transition && Transition.running && node.pure) {
562
+ if (node.tOwned) {
563
+ for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);
564
+ delete node.tOwned;
565
+ }
566
+ reset(node, true);
567
+ } else if (node.owned) {
568
+ for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
569
+ node.owned = null;
570
+ }
571
+ if (node.cleanups) {
572
+ for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();
573
+ node.cleanups = null;
574
+ }
575
+ if (Transition && Transition.running) node.tState = 0;
576
+ else node.state = 0;
577
+ }
578
+ function reset(node, top) {
579
+ if (!top) {
580
+ node.tState = 0;
581
+ Transition.disposed.add(node);
582
+ }
583
+ if (node.owned) {
584
+ for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);
585
+ }
586
+ }
587
+ function castError(err) {
588
+ if (err instanceof Error) return err;
589
+ return new Error(typeof err === "string" ? err : "Unknown error", {
590
+ cause: err
591
+ });
592
+ }
593
+ function runErrors(err, fns, owner) {
594
+ try {
595
+ for (const f of fns) f(err);
596
+ } catch (e) {
597
+ handleError(e, owner && owner.owner || null);
598
+ }
599
+ }
600
+ function handleError(err, owner = Owner) {
601
+ const fns = ERROR && owner && owner.context && owner.context[ERROR];
602
+ const error = castError(err);
603
+ if (!fns) throw error;
604
+ if (Effects)
605
+ Effects.push({
606
+ fn() {
607
+ runErrors(error, fns, owner);
608
+ },
609
+ state: STALE
610
+ });
611
+ else runErrors(error, fns, owner);
612
+ }
613
+
614
+ // node_modules/solid-js/web/dist/web.js
615
+ var booleans = [
616
+ "allowfullscreen",
617
+ "async",
618
+ "autofocus",
619
+ "autoplay",
620
+ "checked",
621
+ "controls",
622
+ "default",
623
+ "disabled",
624
+ "formnovalidate",
625
+ "hidden",
626
+ "indeterminate",
627
+ "inert",
628
+ "ismap",
629
+ "loop",
630
+ "multiple",
631
+ "muted",
632
+ "nomodule",
633
+ "novalidate",
634
+ "open",
635
+ "playsinline",
636
+ "readonly",
637
+ "required",
638
+ "reversed",
639
+ "seamless",
640
+ "selected"
641
+ ];
642
+ /* @__PURE__ */ new Set([
643
+ "className",
644
+ "value",
645
+ "readOnly",
646
+ "formNoValidate",
647
+ "isMap",
648
+ "noModule",
649
+ "playsInline",
650
+ ...booleans
651
+ ]);
652
+ function template(html, isCE, isSVG) {
653
+ let node;
654
+ const create = () => {
655
+ const t = document.createElement("template");
656
+ t.innerHTML = html;
657
+ return t.content.firstChild;
658
+ };
659
+ const fn = () => (node || (node = create())).cloneNode(true);
660
+ fn.cloneNode = fn;
661
+ return fn;
662
+ }
663
+ function setAttribute(node, name, value) {
664
+ if (!!sharedConfig.context && node.isConnected) return;
665
+ if (value == null) node.removeAttribute(name);
666
+ else node.setAttribute(name, value);
667
+ }
668
+ function use(fn, element, arg) {
669
+ return untrack(() => fn(element, arg));
670
+ }
671
+
100
672
  // src/components/EditorPropTypes.ts
101
673
  var PropTypes = __toESM(require_prop_types(), 1);
102
674
  var eventPropTypes = {
@@ -683,7 +1255,7 @@ var SolidEditor = (props) => {
683
1255
  var _ref$ = props.elementRef;
684
1256
  typeof _ref$ === "function" ? use(_ref$, _el$) : props.elementRef = _el$;
685
1257
  _el$.style.setProperty("visibility", "hidden");
686
- effect((_p$) => {
1258
+ createRenderEffect((_p$) => {
687
1259
  var _v$ = id(), _v$2 = props.testid, _v$3 = props.tabIndex;
688
1260
  _v$ !== _p$.e && setAttribute(_el$, "id", _p$.e = _v$);
689
1261
  _v$2 !== _p$.t && setAttribute(_el$, "data-testid", _p$.t = _v$2);
@@ -700,7 +1272,7 @@ var SolidEditor = (props) => {
700
1272
  var _ref$2 = props.elementRef;
701
1273
  typeof _ref$2 === "function" ? use(_ref$2, _el$2) : props.elementRef = _el$2;
702
1274
  _el$2.style.setProperty("visibility", "hidden");
703
- effect((_p$) => {
1275
+ createRenderEffect((_p$) => {
704
1276
  var _v$4 = id(), _v$5 = props.testid, _v$6 = props.tabIndex;
705
1277
  _v$4 !== _p$.e && setAttribute(_el$2, "id", _p$.e = _v$4);
706
1278
  _v$5 !== _p$.t && setAttribute(_el$2, "data-testid", _p$.t = _v$5);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tinymce-solid",
3
- "version": "0.0.3",
4
- "description": "TinyMCE Component for SolidJS",
3
+ "version": "0.0.4",
4
+ "description": "📝 TinyMCE Component for SolidJS",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  "tsup-preset-solid": "^2.2.0",
42
42
  "typescript": "^5.4.5",
43
43
  "typescript-eslint": "^7.12.0",
44
- "vite": "^5.2.12",
44
+ "vite": "^5.2.13",
45
45
  "vite-plugin-compression2": "^1.1.1",
46
46
  "vite-plugin-solid": "^2.10.2"
47
47
  },
@@ -77,6 +77,7 @@
77
77
  "build:docs": "vite build demo --config demo/vite.config.docs.ts",
78
78
  "copy:tiny": "cp -a './node_modules/.pnpm/tinymce@7.1.1/node_modules/tinymce' './demo/public'",
79
79
  "serve:docs": "vite serve docs --port 3000",
80
+ "badges": "npx -p dependency-version-badge update-badge solid-js tinymce typescript prettier vite",
80
81
  "lint": "pnpm lint:types && pnpm lint:code",
81
82
  "lint:code": "eslint 'src/**/*.{ts,tsx}' --max-warnings 0",
82
83
  "lint:types": "tsc --noEmit src/**/* --jsx preserve",