tinymce-solid 0.0.4 → 0.0.5

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.
@@ -1,3 +1,6 @@
1
+ import { createComponent, Dynamic, mergeProps, memo } from 'solid-js/web';
2
+ import { createSignal, createEffect, on, onMount, onCleanup } from 'solid-js';
3
+
1
4
  var __create = Object.create;
2
5
  var __defProp = Object.defineProperty;
3
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -97,7 +100,7 @@ var require_react_is_development = __commonJS({
97
100
  var Portal = REACT_PORTAL_TYPE;
98
101
  var Profiler = REACT_PROFILER_TYPE;
99
102
  var StrictMode = REACT_STRICT_MODE_TYPE;
100
- var Suspense2 = REACT_SUSPENSE_TYPE;
103
+ var Suspense = REACT_SUSPENSE_TYPE;
101
104
  var hasWarnedAboutDeprecatedIsAsyncMode = false;
102
105
  function isAsyncMode(object2) {
103
106
  {
@@ -156,7 +159,7 @@ var require_react_is_development = __commonJS({
156
159
  exports.Portal = Portal;
157
160
  exports.Profiler = Profiler;
158
161
  exports.StrictMode = StrictMode;
159
- exports.Suspense = Suspense2;
162
+ exports.Suspense = Suspense;
160
163
  exports.isAsyncMode = isAsyncMode;
161
164
  exports.isConcurrentMode = isConcurrentMode;
162
165
  exports.isContextConsumer = isContextConsumer;
@@ -790,581 +793,6 @@ var require_prop_types = __commonJS({
790
793
  }
791
794
  });
792
795
 
793
- // node_modules/solid-js/dist/solid.js
794
- var sharedConfig = {
795
- context: void 0,
796
- registry: void 0
797
- };
798
- function setHydrateContext(context) {
799
- sharedConfig.context = context;
800
- }
801
- var equalFn = (a, b) => a === b;
802
- var signalOptions = {
803
- equals: equalFn
804
- };
805
- var ERROR = null;
806
- var runEffects = runQueue;
807
- var STALE = 1;
808
- var PENDING = 2;
809
- var UNOWNED = {
810
- owned: null,
811
- cleanups: null,
812
- context: null,
813
- owner: null
814
- };
815
- var Owner = null;
816
- var Transition = null;
817
- var Scheduler = null;
818
- var ExternalSourceConfig = null;
819
- var Listener = null;
820
- var Updates = null;
821
- var Effects = null;
822
- var ExecCount = 0;
823
- function createSignal(value, options) {
824
- options = options ? Object.assign({}, signalOptions, options) : signalOptions;
825
- const s = {
826
- value,
827
- observers: null,
828
- observerSlots: null,
829
- comparator: options.equals || void 0
830
- };
831
- const setter = (value2) => {
832
- if (typeof value2 === "function") {
833
- if (Transition && Transition.running && Transition.sources.has(s)) value2 = value2(s.tValue);
834
- else value2 = value2(s.value);
835
- }
836
- return writeSignal(s, value2);
837
- };
838
- return [readSignal.bind(s), setter];
839
- }
840
- function createRenderEffect(fn, value, options) {
841
- const c = createComputation(fn, value, false, STALE);
842
- if (Scheduler && Transition && Transition.running) Updates.push(c);
843
- else updateComputation(c);
844
- }
845
- function createEffect(fn, value, options) {
846
- runEffects = runUserEffects;
847
- const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
848
- if (s) c.suspense = s;
849
- c.user = true;
850
- Effects ? Effects.push(c) : updateComputation(c);
851
- }
852
- function untrack(fn) {
853
- if (!ExternalSourceConfig && Listener === null) return fn();
854
- const listener = Listener;
855
- Listener = null;
856
- try {
857
- if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);
858
- return fn();
859
- } finally {
860
- Listener = listener;
861
- }
862
- }
863
- function on(deps, fn, options) {
864
- const isArray = Array.isArray(deps);
865
- let prevInput;
866
- return (prevValue) => {
867
- let input;
868
- if (isArray) {
869
- input = Array(deps.length);
870
- for (let i = 0; i < deps.length; i++) input[i] = deps[i]();
871
- } else input = deps();
872
- const result = untrack(() => fn(input, prevInput, prevValue));
873
- prevInput = input;
874
- return result;
875
- };
876
- }
877
- function onMount(fn) {
878
- createEffect(() => untrack(fn));
879
- }
880
- function onCleanup(fn) {
881
- if (Owner === null) ;
882
- else if (Owner.cleanups === null) Owner.cleanups = [fn];
883
- else Owner.cleanups.push(fn);
884
- return fn;
885
- }
886
- function startTransition(fn) {
887
- if (Transition && Transition.running) {
888
- fn();
889
- return Transition.done;
890
- }
891
- const l = Listener;
892
- const o = Owner;
893
- return Promise.resolve().then(() => {
894
- Listener = l;
895
- Owner = o;
896
- let t;
897
- if (Scheduler || SuspenseContext) {
898
- t = Transition || (Transition = {
899
- sources: /* @__PURE__ */ new Set(),
900
- effects: [],
901
- promises: /* @__PURE__ */ new Set(),
902
- disposed: /* @__PURE__ */ new Set(),
903
- queue: /* @__PURE__ */ new Set(),
904
- running: true
905
- });
906
- t.done || (t.done = new Promise((res) => t.resolve = res));
907
- t.running = true;
908
- }
909
- runUpdates(fn);
910
- Listener = Owner = null;
911
- return t ? t.done : void 0;
912
- });
913
- }
914
- var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
915
- function useContext(context) {
916
- return Owner && Owner.context && Owner.context[context.id] !== void 0 ? Owner.context[context.id] : context.defaultValue;
917
- }
918
- var SuspenseContext;
919
- function readSignal() {
920
- const runningTransition = Transition && Transition.running;
921
- if (this.sources && (runningTransition ? this.tState : this.state)) {
922
- if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);
923
- else {
924
- const updates = Updates;
925
- Updates = null;
926
- runUpdates(() => lookUpstream(this));
927
- Updates = updates;
928
- }
929
- }
930
- if (Listener) {
931
- const sSlot = this.observers ? this.observers.length : 0;
932
- if (!Listener.sources) {
933
- Listener.sources = [this];
934
- Listener.sourceSlots = [sSlot];
935
- } else {
936
- Listener.sources.push(this);
937
- Listener.sourceSlots.push(sSlot);
938
- }
939
- if (!this.observers) {
940
- this.observers = [Listener];
941
- this.observerSlots = [Listener.sources.length - 1];
942
- } else {
943
- this.observers.push(Listener);
944
- this.observerSlots.push(Listener.sources.length - 1);
945
- }
946
- }
947
- if (runningTransition && Transition.sources.has(this)) return this.tValue;
948
- return this.value;
949
- }
950
- function writeSignal(node, value, isComp) {
951
- let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;
952
- if (!node.comparator || !node.comparator(current, value)) {
953
- if (Transition) {
954
- const TransitionRunning = Transition.running;
955
- if (TransitionRunning || !isComp && Transition.sources.has(node)) {
956
- Transition.sources.add(node);
957
- node.tValue = value;
958
- }
959
- if (!TransitionRunning) node.value = value;
960
- } else node.value = value;
961
- if (node.observers && node.observers.length) {
962
- runUpdates(() => {
963
- for (let i = 0; i < node.observers.length; i += 1) {
964
- const o = node.observers[i];
965
- const TransitionRunning = Transition && Transition.running;
966
- if (TransitionRunning && Transition.disposed.has(o)) continue;
967
- if (TransitionRunning ? !o.tState : !o.state) {
968
- if (o.pure) Updates.push(o);
969
- else Effects.push(o);
970
- if (o.observers) markDownstream(o);
971
- }
972
- if (!TransitionRunning) o.state = STALE;
973
- else o.tState = STALE;
974
- }
975
- if (Updates.length > 1e6) {
976
- Updates = [];
977
- if (false) ;
978
- throw new Error();
979
- }
980
- });
981
- }
982
- }
983
- return value;
984
- }
985
- function updateComputation(node) {
986
- if (!node.fn) return;
987
- cleanNode(node);
988
- const time = ExecCount;
989
- runComputation(
990
- node,
991
- Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value,
992
- time
993
- );
994
- if (Transition && !Transition.running && Transition.sources.has(node)) {
995
- queueMicrotask(() => {
996
- runUpdates(() => {
997
- Transition && (Transition.running = true);
998
- Listener = Owner = node;
999
- runComputation(node, node.tValue, time);
1000
- Listener = Owner = null;
1001
- });
1002
- });
1003
- }
1004
- }
1005
- function runComputation(node, value, time) {
1006
- let nextValue;
1007
- const owner = Owner, listener = Listener;
1008
- Listener = Owner = node;
1009
- try {
1010
- nextValue = node.fn(value);
1011
- } catch (err) {
1012
- if (node.pure) {
1013
- if (Transition && Transition.running) {
1014
- node.tState = STALE;
1015
- node.tOwned && node.tOwned.forEach(cleanNode);
1016
- node.tOwned = void 0;
1017
- } else {
1018
- node.state = STALE;
1019
- node.owned && node.owned.forEach(cleanNode);
1020
- node.owned = null;
1021
- }
1022
- }
1023
- node.updatedAt = time + 1;
1024
- return handleError(err);
1025
- } finally {
1026
- Listener = listener;
1027
- Owner = owner;
1028
- }
1029
- if (!node.updatedAt || node.updatedAt <= time) {
1030
- if (node.updatedAt != null && "observers" in node) {
1031
- writeSignal(node, nextValue, true);
1032
- } else if (Transition && Transition.running && node.pure) {
1033
- Transition.sources.add(node);
1034
- node.tValue = nextValue;
1035
- } else node.value = nextValue;
1036
- node.updatedAt = time;
1037
- }
1038
- }
1039
- function createComputation(fn, init, pure, state = STALE, options) {
1040
- const c = {
1041
- fn,
1042
- state,
1043
- updatedAt: null,
1044
- owned: null,
1045
- sources: null,
1046
- sourceSlots: null,
1047
- cleanups: null,
1048
- value: init,
1049
- owner: Owner,
1050
- context: Owner ? Owner.context : null,
1051
- pure
1052
- };
1053
- if (Transition && Transition.running) {
1054
- c.state = 0;
1055
- c.tState = state;
1056
- }
1057
- if (Owner === null) ;
1058
- else if (Owner !== UNOWNED) {
1059
- if (Transition && Transition.running && Owner.pure) {
1060
- if (!Owner.tOwned) Owner.tOwned = [c];
1061
- else Owner.tOwned.push(c);
1062
- } else {
1063
- if (!Owner.owned) Owner.owned = [c];
1064
- else Owner.owned.push(c);
1065
- }
1066
- }
1067
- if (ExternalSourceConfig && c.fn) {
1068
- const [track, trigger] = createSignal(void 0, {
1069
- equals: false
1070
- });
1071
- const ordinary = ExternalSourceConfig.factory(c.fn, trigger);
1072
- onCleanup(() => ordinary.dispose());
1073
- const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());
1074
- const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);
1075
- c.fn = (x) => {
1076
- track();
1077
- return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);
1078
- };
1079
- }
1080
- return c;
1081
- }
1082
- function runTop(node) {
1083
- const runningTransition = Transition && Transition.running;
1084
- if ((runningTransition ? node.tState : node.state) === 0) return;
1085
- if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);
1086
- if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);
1087
- const ancestors = [node];
1088
- while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {
1089
- if (runningTransition && Transition.disposed.has(node)) return;
1090
- if (runningTransition ? node.tState : node.state) ancestors.push(node);
1091
- }
1092
- for (let i = ancestors.length - 1; i >= 0; i--) {
1093
- node = ancestors[i];
1094
- if (runningTransition) {
1095
- let top = node, prev = ancestors[i + 1];
1096
- while ((top = top.owner) && top !== prev) {
1097
- if (Transition.disposed.has(top)) return;
1098
- }
1099
- }
1100
- if ((runningTransition ? node.tState : node.state) === STALE) {
1101
- updateComputation(node);
1102
- } else if ((runningTransition ? node.tState : node.state) === PENDING) {
1103
- const updates = Updates;
1104
- Updates = null;
1105
- runUpdates(() => lookUpstream(node, ancestors[0]));
1106
- Updates = updates;
1107
- }
1108
- }
1109
- }
1110
- function runUpdates(fn, init) {
1111
- if (Updates) return fn();
1112
- let wait = false;
1113
- Updates = [];
1114
- if (Effects) wait = true;
1115
- else Effects = [];
1116
- ExecCount++;
1117
- try {
1118
- const res = fn();
1119
- completeUpdates(wait);
1120
- return res;
1121
- } catch (err) {
1122
- if (!wait) Effects = null;
1123
- Updates = null;
1124
- handleError(err);
1125
- }
1126
- }
1127
- function completeUpdates(wait) {
1128
- if (Updates) {
1129
- if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);
1130
- else runQueue(Updates);
1131
- Updates = null;
1132
- }
1133
- if (wait) return;
1134
- let res;
1135
- if (Transition) {
1136
- if (!Transition.promises.size && !Transition.queue.size) {
1137
- const sources = Transition.sources;
1138
- const disposed = Transition.disposed;
1139
- Effects.push.apply(Effects, Transition.effects);
1140
- res = Transition.resolve;
1141
- for (const e2 of Effects) {
1142
- "tState" in e2 && (e2.state = e2.tState);
1143
- delete e2.tState;
1144
- }
1145
- Transition = null;
1146
- runUpdates(() => {
1147
- for (const d of disposed) cleanNode(d);
1148
- for (const v of sources) {
1149
- v.value = v.tValue;
1150
- if (v.owned) {
1151
- for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);
1152
- }
1153
- if (v.tOwned) v.owned = v.tOwned;
1154
- delete v.tValue;
1155
- delete v.tOwned;
1156
- v.tState = 0;
1157
- }
1158
- setTransPending(false);
1159
- });
1160
- } else if (Transition.running) {
1161
- Transition.running = false;
1162
- Transition.effects.push.apply(Transition.effects, Effects);
1163
- Effects = null;
1164
- setTransPending(true);
1165
- return;
1166
- }
1167
- }
1168
- const e = Effects;
1169
- Effects = null;
1170
- if (e.length) runUpdates(() => runEffects(e));
1171
- if (res) res();
1172
- }
1173
- function runQueue(queue) {
1174
- for (let i = 0; i < queue.length; i++) runTop(queue[i]);
1175
- }
1176
- function scheduleQueue(queue) {
1177
- for (let i = 0; i < queue.length; i++) {
1178
- const item = queue[i];
1179
- const tasks = Transition.queue;
1180
- if (!tasks.has(item)) {
1181
- tasks.add(item);
1182
- Scheduler(() => {
1183
- tasks.delete(item);
1184
- runUpdates(() => {
1185
- Transition.running = true;
1186
- runTop(item);
1187
- });
1188
- Transition && (Transition.running = false);
1189
- });
1190
- }
1191
- }
1192
- }
1193
- function runUserEffects(queue) {
1194
- let i, userLength = 0;
1195
- for (i = 0; i < queue.length; i++) {
1196
- const e = queue[i];
1197
- if (!e.user) runTop(e);
1198
- else queue[userLength++] = e;
1199
- }
1200
- if (sharedConfig.context) {
1201
- if (sharedConfig.count) {
1202
- sharedConfig.effects || (sharedConfig.effects = []);
1203
- sharedConfig.effects.push(...queue.slice(0, userLength));
1204
- return;
1205
- } else if (sharedConfig.effects) {
1206
- queue = [...sharedConfig.effects, ...queue];
1207
- userLength += sharedConfig.effects.length;
1208
- delete sharedConfig.effects;
1209
- }
1210
- setHydrateContext();
1211
- }
1212
- for (i = 0; i < userLength; i++) runTop(queue[i]);
1213
- }
1214
- function lookUpstream(node, ignore) {
1215
- const runningTransition = Transition && Transition.running;
1216
- if (runningTransition) node.tState = 0;
1217
- else node.state = 0;
1218
- for (let i = 0; i < node.sources.length; i += 1) {
1219
- const source = node.sources[i];
1220
- if (source.sources) {
1221
- const state = runningTransition ? source.tState : source.state;
1222
- if (state === STALE) {
1223
- if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount))
1224
- runTop(source);
1225
- } else if (state === PENDING) lookUpstream(source, ignore);
1226
- }
1227
- }
1228
- }
1229
- function markDownstream(node) {
1230
- const runningTransition = Transition && Transition.running;
1231
- for (let i = 0; i < node.observers.length; i += 1) {
1232
- const o = node.observers[i];
1233
- if (runningTransition ? !o.tState : !o.state) {
1234
- if (runningTransition) o.tState = PENDING;
1235
- else o.state = PENDING;
1236
- if (o.pure) Updates.push(o);
1237
- else Effects.push(o);
1238
- o.observers && markDownstream(o);
1239
- }
1240
- }
1241
- }
1242
- function cleanNode(node) {
1243
- let i;
1244
- if (node.sources) {
1245
- while (node.sources.length) {
1246
- const source = node.sources.pop(), index = node.sourceSlots.pop(), obs = source.observers;
1247
- if (obs && obs.length) {
1248
- const n = obs.pop(), s = source.observerSlots.pop();
1249
- if (index < obs.length) {
1250
- n.sourceSlots[s] = index;
1251
- obs[index] = n;
1252
- source.observerSlots[index] = s;
1253
- }
1254
- }
1255
- }
1256
- }
1257
- if (Transition && Transition.running && node.pure) {
1258
- if (node.tOwned) {
1259
- for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);
1260
- delete node.tOwned;
1261
- }
1262
- reset(node, true);
1263
- } else if (node.owned) {
1264
- for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);
1265
- node.owned = null;
1266
- }
1267
- if (node.cleanups) {
1268
- for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();
1269
- node.cleanups = null;
1270
- }
1271
- if (Transition && Transition.running) node.tState = 0;
1272
- else node.state = 0;
1273
- }
1274
- function reset(node, top) {
1275
- if (!top) {
1276
- node.tState = 0;
1277
- Transition.disposed.add(node);
1278
- }
1279
- if (node.owned) {
1280
- for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);
1281
- }
1282
- }
1283
- function castError(err) {
1284
- if (err instanceof Error) return err;
1285
- return new Error(typeof err === "string" ? err : "Unknown error", {
1286
- cause: err
1287
- });
1288
- }
1289
- function runErrors(err, fns, owner) {
1290
- try {
1291
- for (const f of fns) f(err);
1292
- } catch (e) {
1293
- handleError(e, owner && owner.owner || null);
1294
- }
1295
- }
1296
- function handleError(err, owner = Owner) {
1297
- const fns = ERROR && owner && owner.context && owner.context[ERROR];
1298
- const error = castError(err);
1299
- if (!fns) throw error;
1300
- if (Effects)
1301
- Effects.push({
1302
- fn() {
1303
- runErrors(error, fns, owner);
1304
- },
1305
- state: STALE
1306
- });
1307
- else runErrors(error, fns, owner);
1308
- }
1309
-
1310
- // node_modules/solid-js/web/dist/web.js
1311
- var booleans = [
1312
- "allowfullscreen",
1313
- "async",
1314
- "autofocus",
1315
- "autoplay",
1316
- "checked",
1317
- "controls",
1318
- "default",
1319
- "disabled",
1320
- "formnovalidate",
1321
- "hidden",
1322
- "indeterminate",
1323
- "inert",
1324
- "ismap",
1325
- "loop",
1326
- "multiple",
1327
- "muted",
1328
- "nomodule",
1329
- "novalidate",
1330
- "open",
1331
- "playsinline",
1332
- "readonly",
1333
- "required",
1334
- "reversed",
1335
- "seamless",
1336
- "selected"
1337
- ];
1338
- /* @__PURE__ */ new Set([
1339
- "className",
1340
- "value",
1341
- "readOnly",
1342
- "formNoValidate",
1343
- "isMap",
1344
- "noModule",
1345
- "playsInline",
1346
- ...booleans
1347
- ]);
1348
- function template(html, isCE, isSVG) {
1349
- let node;
1350
- const create = () => {
1351
- const t = document.createElement("template");
1352
- t.innerHTML = html;
1353
- return t.content.firstChild;
1354
- };
1355
- const fn = () => (node || (node = create())).cloneNode(true);
1356
- fn.cloneNode = fn;
1357
- return fn;
1358
- }
1359
- function setAttribute(node, name, value) {
1360
- if (!!sharedConfig.context && node.isConnected) return;
1361
- if (value == null) node.removeAttribute(name);
1362
- else node.setAttribute(name, value);
1363
- }
1364
- function use(fn, element, arg) {
1365
- return untrack(() => fn(element, arg));
1366
- }
1367
-
1368
796
  // src/components/EditorPropTypes.ts
1369
797
  var PropTypes = __toESM(require_prop_types(), 1);
1370
798
  var eventPropTypes = {
@@ -1483,7 +911,7 @@ var EditorPropTypes = {
1483
911
  // src/Utils.ts
1484
912
  var isFunction = (x) => typeof x === "function";
1485
913
  var isEventProp = (name) => name in eventPropTypes;
1486
- var eventAttrToEventName = (attrName) => attrName.substr(2);
914
+ var eventAttrToEventName = (attrName) => String(attrName.slice(2));
1487
915
  var configHandlers2 = (handlerLookup, on2, off, adapter, prevProps, props, boundHandlers) => {
1488
916
  const prevEventKeys = Object.keys(prevProps).filter(isEventProp);
1489
917
  const currEventKeys = Object.keys(props).filter(isEventProp);
@@ -1678,14 +1106,13 @@ var getTinymce = (view) => {
1678
1106
  return global && global.tinymce ? global.tinymce : null;
1679
1107
  };
1680
1108
 
1681
- // src/components/SolidEditor.tsx
1682
- var _tmpl$ = /* @__PURE__ */ template(`<div>`);
1683
- var _tmpl$2 = /* @__PURE__ */ template(`<textarea>`);
1684
- var SolidEditor = (props) => {
1109
+ // src/components/Editor.tsx
1110
+ var Editor = (props) => {
1685
1111
  const [id] = createSignal(props.id || uuid("solid-tinymce-editor"));
1686
1112
  const initialValue = () => props.initialValue;
1687
1113
  const value = () => props.value || "";
1688
1114
  const skin = () => props.skin || "oxide";
1115
+ const tagName = () => props.tagName || "div";
1689
1116
  const contentCss = () => props.contentCss || "default";
1690
1117
  const disabled = () => props.disabled || false;
1691
1118
  const [editor, setEditor] = createSignal();
@@ -1946,45 +1373,28 @@ var SolidEditor = (props) => {
1946
1373
  handleBeforeInput(evt);
1947
1374
  }
1948
1375
  };
1949
- return props.inline ? (() => {
1950
- var _el$ = _tmpl$();
1951
- var _ref$ = props.elementRef;
1952
- typeof _ref$ === "function" ? use(_ref$, _el$) : props.elementRef = _el$;
1953
- _el$.style.setProperty("visibility", "hidden");
1954
- createRenderEffect((_p$) => {
1955
- var _v$ = id(), _v$2 = props.testid, _v$3 = props.tabIndex;
1956
- _v$ !== _p$.e && setAttribute(_el$, "id", _p$.e = _v$);
1957
- _v$2 !== _p$.t && setAttribute(_el$, "data-testid", _p$.t = _v$2);
1958
- _v$3 !== _p$.a && setAttribute(_el$, "tabindex", _p$.a = _v$3);
1959
- return _p$;
1960
- }, {
1961
- e: void 0,
1962
- t: void 0,
1963
- a: void 0
1964
- });
1965
- return _el$;
1966
- })() : (() => {
1967
- var _el$2 = _tmpl$2();
1968
- var _ref$2 = props.elementRef;
1969
- typeof _ref$2 === "function" ? use(_ref$2, _el$2) : props.elementRef = _el$2;
1970
- _el$2.style.setProperty("visibility", "hidden");
1971
- createRenderEffect((_p$) => {
1972
- var _v$4 = id(), _v$5 = props.testid, _v$6 = props.tabIndex;
1973
- _v$4 !== _p$.e && setAttribute(_el$2, "id", _p$.e = _v$4);
1974
- _v$5 !== _p$.t && setAttribute(_el$2, "data-testid", _p$.t = _v$5);
1975
- _v$6 !== _p$.a && setAttribute(_el$2, "tabindex", _p$.a = _v$6);
1976
- return _p$;
1977
- }, {
1978
- e: void 0,
1979
- t: void 0,
1980
- a: void 0
1981
- });
1982
- return _el$2;
1983
- })();
1376
+ return createComponent(Dynamic, mergeProps({
1377
+ get component() {
1378
+ return memo(() => !!props.inline)() ? tagName() : "textarea";
1379
+ },
1380
+ get id() {
1381
+ return id();
1382
+ },
1383
+ get ["data-testid"]() {
1384
+ return props.testid;
1385
+ },
1386
+ get tabIndex() {
1387
+ return props.tabIndex;
1388
+ },
1389
+ ref(r$) {
1390
+ var _ref$ = props.elementRef;
1391
+ typeof _ref$ === "function" ? _ref$(r$) : props.elementRef = r$;
1392
+ }
1393
+ }, props));
1984
1394
  };
1985
1395
 
1986
1396
  // src/index.tsx
1987
- var src_default = SolidEditor;
1397
+ var src_default = Editor;
1988
1398
  /*! Bundled license information:
1989
1399
 
1990
1400
  react-is/cjs/react-is.development.js: