@tatamicks/text 0.0.1 → 0.0.2

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.mjs CHANGED
@@ -1,648 +1,297 @@
1
- import { HorizontalAlign as z, VerticalAlign as Ce, toPx as A, DEFAULT_FONT_FAMILY as mr, Select as yr, validationDefinition as br, multilineDefinition as pr, fontStyleDefinition as Rr, placeholderDefinition as Er, universalProperties as _r } from "@tatamicks/core";
2
- import ke, { forwardRef as xr, useRef as Tr, useImperativeHandle as Sr, useMemo as Oe } from "react";
3
- var J = { exports: {} }, Y = {};
1
+ import { HorizontalAlign as y, VerticalAlign as L, toPx as E, DEFAULT_FONT_FAMILY as oe, Select as ie, validationDefinition as le, multilineDefinition as se, fontStyleDefinition as ue, placeholderDefinition as ce, universalProperties as fe } from "@tatamicks/core";
2
+ import de, { forwardRef as me, useRef as be, useImperativeHandle as ge, useMemo as M } from "react";
3
+ var k = { exports: {} }, R = {};
4
4
  /**
5
5
  * @license React
6
- * react-jsx-runtime.production.min.js
6
+ * react-jsx-runtime.production.js
7
7
  *
8
- * Copyright (c) Facebook, Inc. and its affiliates.
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
9
  *
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var we;
14
- function Cr() {
15
- if (we) return Y;
16
- we = 1;
17
- var a = ke, v = Symbol.for("react.element"), I = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, P = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, j = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function T(_, d, S) {
19
- var g, b = {}, p = null, o = null;
20
- S !== void 0 && (p = "" + S), d.key !== void 0 && (p = "" + d.key), d.ref !== void 0 && (o = d.ref);
21
- for (g in d) E.call(d, g) && !j.hasOwnProperty(g) && (b[g] = d[g]);
22
- if (_ && _.defaultProps) for (g in d = _.defaultProps, d) b[g] === void 0 && (b[g] = d[g]);
23
- return { $$typeof: v, type: _, key: p, ref: o, props: b, _owner: P.current };
13
+ var W;
14
+ function _e() {
15
+ if (W) return R;
16
+ W = 1;
17
+ var t = Symbol.for("react.transitional.element"), l = Symbol.for("react.fragment");
18
+ function b(c, s, u) {
19
+ var d = null;
20
+ if (u !== void 0 && (d = "" + u), s.key !== void 0 && (d = "" + s.key), "key" in s) {
21
+ u = {};
22
+ for (var m in s)
23
+ m !== "key" && (u[m] = s[m]);
24
+ } else u = s;
25
+ return s = u.ref, {
26
+ $$typeof: t,
27
+ type: c,
28
+ key: d,
29
+ ref: s !== void 0 ? s : null,
30
+ props: u
31
+ };
24
32
  }
25
- return Y.Fragment = I, Y.jsx = T, Y.jsxs = T, Y;
33
+ return R.Fragment = l, R.jsx = b, R.jsxs = b, R;
26
34
  }
27
- var L = {};
35
+ var v = {};
28
36
  /**
29
37
  * @license React
30
38
  * react-jsx-runtime.development.js
31
39
  *
32
- * Copyright (c) Facebook, Inc. and its affiliates.
40
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
33
41
  *
34
42
  * This source code is licensed under the MIT license found in the
35
43
  * LICENSE file in the root directory of this source tree.
36
44
  */
37
- var Pe;
38
- function Or() {
39
- return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && (function() {
40
- var a = ke, v = Symbol.for("react.element"), I = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), _ = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), o = Symbol.for("react.offscreen"), x = Symbol.iterator, Fe = "@@iterator";
41
- function Ae(e) {
42
- if (e === null || typeof e != "object")
43
- return null;
44
- var r = x && e[x] || e[Fe];
45
- return typeof r == "function" ? r : null;
46
- }
47
- var k = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
- function h(e) {
49
- {
50
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
51
- t[n - 1] = arguments[n];
52
- Ie("error", e, t);
53
- }
54
- }
55
- function Ie(e, r, t) {
56
- {
57
- var n = k.ReactDebugCurrentFrame, l = n.getStackAddendum();
58
- l !== "" && (r += "%s", t = t.concat([l]));
59
- var f = t.map(function(u) {
60
- return String(u);
61
- });
62
- f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f);
63
- }
64
- }
65
- var $e = !1, We = !1, Ye = !1, Le = !1, Ve = !1, re;
66
- re = Symbol.for("react.module.reference");
67
- function Me(e) {
68
- return !!(typeof e == "string" || typeof e == "function" || e === E || e === j || Ve || e === P || e === S || e === g || Le || e === o || $e || We || Ye || typeof e == "object" && e !== null && (e.$$typeof === p || e.$$typeof === b || e.$$typeof === T || e.$$typeof === _ || e.$$typeof === d || // This needs to include all possible module reference object
69
- // types supported by any Flight configuration anywhere since
70
- // we don't know which Flight build this will end up being used
71
- // with.
72
- e.$$typeof === re || e.getModuleId !== void 0));
73
- }
74
- function Ue(e, r, t) {
75
- var n = e.displayName;
76
- if (n)
77
- return n;
78
- var l = r.displayName || r.name || "";
79
- return l !== "" ? t + "(" + l + ")" : t;
80
- }
81
- function te(e) {
82
- return e.displayName || "Context";
83
- }
84
- function C(e) {
85
- if (e == null)
86
- return null;
87
- if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
88
- return e.displayName || e.name || null;
89
- if (typeof e == "string")
90
- return e;
45
+ var U;
46
+ function Ee() {
47
+ return U || (U = 1, process.env.NODE_ENV !== "production" && (function() {
48
+ function t(e) {
49
+ if (e == null) return null;
50
+ if (typeof e == "function")
51
+ return e.$$typeof === re ? null : e.displayName || e.name || null;
52
+ if (typeof e == "string") return e;
91
53
  switch (e) {
92
- case E:
54
+ case w:
93
55
  return "Fragment";
94
- case I:
95
- return "Portal";
96
- case j:
56
+ case G:
97
57
  return "Profiler";
98
- case P:
58
+ case H:
99
59
  return "StrictMode";
100
- case S:
60
+ case Q:
101
61
  return "Suspense";
102
- case g:
62
+ case K:
103
63
  return "SuspenseList";
64
+ case te:
65
+ return "Activity";
104
66
  }
105
67
  if (typeof e == "object")
106
- switch (e.$$typeof) {
107
- case _:
108
- var r = e;
109
- return te(r) + ".Consumer";
110
- case T:
111
- var t = e;
112
- return te(t._context) + ".Provider";
113
- case d:
114
- return Ue(e, e.render, "ForwardRef");
115
- case b:
116
- var n = e.displayName || null;
117
- return n !== null ? n : C(e.type) || "Memo";
118
- case p: {
119
- var l = e, f = l._payload, u = l._init;
68
+ switch (typeof e.tag == "number" && console.error(
69
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
+ ), e.$$typeof) {
71
+ case J:
72
+ return "Portal";
73
+ case Z:
74
+ return e.displayName || "Context";
75
+ case X:
76
+ return (e._context.displayName || "Context") + ".Consumer";
77
+ case B:
78
+ var r = e.render;
79
+ return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
+ case ee:
81
+ return r = e.displayName || null, r !== null ? r : t(e.type) || "Memo";
82
+ case O:
83
+ r = e._payload, e = e._init;
120
84
  try {
121
- return C(u(f));
85
+ return t(e(r));
122
86
  } catch {
123
- return null;
124
87
  }
125
- }
126
88
  }
127
89
  return null;
128
90
  }
129
- var O = Object.assign, $ = 0, ne, ae, ie, oe, ue, le, fe;
130
- function se() {
131
- }
132
- se.__reactDisabledLog = !0;
133
- function Ne() {
134
- {
135
- if ($ === 0) {
136
- ne = console.log, ae = console.info, ie = console.warn, oe = console.error, ue = console.group, le = console.groupCollapsed, fe = console.groupEnd;
137
- var e = {
138
- configurable: !0,
139
- enumerable: !0,
140
- value: se,
141
- writable: !0
142
- };
143
- Object.defineProperties(console, {
144
- info: e,
145
- log: e,
146
- warn: e,
147
- error: e,
148
- group: e,
149
- groupCollapsed: e,
150
- groupEnd: e
151
- });
152
- }
153
- $++;
154
- }
155
- }
156
- function ze() {
157
- {
158
- if ($--, $ === 0) {
159
- var e = {
160
- configurable: !0,
161
- enumerable: !0,
162
- writable: !0
163
- };
164
- Object.defineProperties(console, {
165
- log: O({}, e, {
166
- value: ne
167
- }),
168
- info: O({}, e, {
169
- value: ae
170
- }),
171
- warn: O({}, e, {
172
- value: ie
173
- }),
174
- error: O({}, e, {
175
- value: oe
176
- }),
177
- group: O({}, e, {
178
- value: ue
179
- }),
180
- groupCollapsed: O({}, e, {
181
- value: le
182
- }),
183
- groupEnd: O({}, e, {
184
- value: fe
185
- })
186
- });
187
- }
188
- $ < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
- }
190
- }
191
- var B = k.ReactCurrentDispatcher, H;
192
- function V(e, r, t) {
193
- {
194
- if (H === void 0)
195
- try {
196
- throw Error();
197
- } catch (l) {
198
- var n = l.stack.trim().match(/\n( *(at )?)/);
199
- H = n && n[1] || "";
200
- }
201
- return `
202
- ` + H + e;
203
- }
204
- }
205
- var K = !1, M;
206
- {
207
- var Je = typeof WeakMap == "function" ? WeakMap : Map;
208
- M = new Je();
91
+ function l(e) {
92
+ return "" + e;
209
93
  }
210
- function ce(e, r) {
211
- if (!e || K)
212
- return "";
213
- {
214
- var t = M.get(e);
215
- if (t !== void 0)
216
- return t;
217
- }
218
- var n;
219
- K = !0;
220
- var l = Error.prepareStackTrace;
221
- Error.prepareStackTrace = void 0;
222
- var f;
223
- f = B.current, B.current = null, Ne();
94
+ function b(e) {
224
95
  try {
225
- if (r) {
226
- var u = function() {
227
- throw Error();
228
- };
229
- if (Object.defineProperty(u.prototype, "props", {
230
- set: function() {
231
- throw Error();
232
- }
233
- }), typeof Reflect == "object" && Reflect.construct) {
234
- try {
235
- Reflect.construct(u, []);
236
- } catch (y) {
237
- n = y;
238
- }
239
- Reflect.construct(e, [], u);
240
- } else {
241
- try {
242
- u.call();
243
- } catch (y) {
244
- n = y;
245
- }
246
- e.call(u.prototype);
247
- }
248
- } else {
249
- try {
250
- throw Error();
251
- } catch (y) {
252
- n = y;
253
- }
254
- e();
255
- }
256
- } catch (y) {
257
- if (y && n && typeof y.stack == "string") {
258
- for (var i = y.stack.split(`
259
- `), m = n.stack.split(`
260
- `), s = i.length - 1, c = m.length - 1; s >= 1 && c >= 0 && i[s] !== m[c]; )
261
- c--;
262
- for (; s >= 1 && c >= 0; s--, c--)
263
- if (i[s] !== m[c]) {
264
- if (s !== 1 || c !== 1)
265
- do
266
- if (s--, c--, c < 0 || i[s] !== m[c]) {
267
- var R = `
268
- ` + i[s].replace(" at new ", " at ");
269
- return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, R), R;
270
- }
271
- while (s >= 1 && c >= 0);
272
- break;
273
- }
274
- }
275
- } finally {
276
- K = !1, B.current = f, ze(), Error.prepareStackTrace = l;
277
- }
278
- var F = e ? e.displayName || e.name : "", w = F ? V(F) : "";
279
- return typeof e == "function" && M.set(e, w), w;
280
- }
281
- function qe(e, r, t) {
282
- return ce(e, !1);
283
- }
284
- function Be(e) {
285
- var r = e.prototype;
286
- return !!(r && r.isReactComponent);
287
- }
288
- function U(e, r, t) {
289
- if (e == null)
290
- return "";
291
- if (typeof e == "function")
292
- return ce(e, Be(e));
293
- if (typeof e == "string")
294
- return V(e);
295
- switch (e) {
296
- case S:
297
- return V("Suspense");
298
- case g:
299
- return V("SuspenseList");
300
- }
301
- if (typeof e == "object")
302
- switch (e.$$typeof) {
303
- case d:
304
- return qe(e.render);
305
- case b:
306
- return U(e.type, r, t);
307
- case p: {
308
- var n = e, l = n._payload, f = n._init;
309
- try {
310
- return U(f(l), r, t);
311
- } catch {
312
- }
313
- }
314
- }
315
- return "";
316
- }
317
- var W = Object.prototype.hasOwnProperty, de = {}, ve = k.ReactDebugCurrentFrame;
318
- function N(e) {
319
- if (e) {
320
- var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
321
- ve.setExtraStackFrame(t);
322
- } else
323
- ve.setExtraStackFrame(null);
324
- }
325
- function He(e, r, t, n, l) {
326
- {
327
- var f = Function.call.bind(W);
328
- for (var u in e)
329
- if (f(e, u)) {
330
- var i = void 0;
331
- try {
332
- if (typeof e[u] != "function") {
333
- var m = Error((n || "React class") + ": " + t + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
- throw m.name = "Invariant Violation", m;
335
- }
336
- i = e[u](r, u, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
- } catch (s) {
338
- i = s;
339
- }
340
- i && !(i instanceof Error) && (N(l), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, u, typeof i), N(null)), i instanceof Error && !(i.message in de) && (de[i.message] = !0, N(l), h("Failed %s type: %s", t, i.message), N(null));
341
- }
96
+ l(e);
97
+ var r = !1;
98
+ } catch {
99
+ r = !0;
342
100
  }
343
- }
344
- var Ke = Array.isArray;
345
- function G(e) {
346
- return Ke(e);
347
- }
348
- function Ge(e) {
349
- {
350
- var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
351
- return t;
101
+ if (r) {
102
+ r = console;
103
+ var a = r.error, o = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
+ return a.call(
105
+ r,
106
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
+ o
108
+ ), l(e);
352
109
  }
353
110
  }
354
- function Xe(e) {
111
+ function c(e) {
112
+ if (e === w) return "<>";
113
+ if (typeof e == "object" && e !== null && e.$$typeof === O)
114
+ return "<...>";
355
115
  try {
356
- return ge(e), !1;
116
+ var r = t(e);
117
+ return r ? "<" + r + ">" : "<...>";
357
118
  } catch {
358
- return !0;
119
+ return "<...>";
359
120
  }
360
121
  }
361
- function ge(e) {
362
- return "" + e;
363
- }
364
- function he(e) {
365
- if (Xe(e))
366
- return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), ge(e);
122
+ function s() {
123
+ var e = P.A;
124
+ return e === null ? null : e.getOwner();
367
125
  }
368
- var me = k.ReactCurrentOwner, Ze = {
369
- key: !0,
370
- ref: !0,
371
- __self: !0,
372
- __source: !0
373
- }, ye, be;
374
- function Qe(e) {
375
- if (W.call(e, "ref")) {
376
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
377
- if (r && r.isReactWarning)
378
- return !1;
379
- }
380
- return e.ref !== void 0;
126
+ function u() {
127
+ return Error("react-stack-top-frame");
381
128
  }
382
- function er(e) {
383
- if (W.call(e, "key")) {
129
+ function d(e) {
130
+ if (D.call(e, "key")) {
384
131
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
385
- if (r && r.isReactWarning)
386
- return !1;
132
+ if (r && r.isReactWarning) return !1;
387
133
  }
388
134
  return e.key !== void 0;
389
135
  }
390
- function rr(e, r) {
391
- typeof e.ref == "string" && me.current;
392
- }
393
- function tr(e, r) {
394
- {
395
- var t = function() {
396
- ye || (ye = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
397
- };
398
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
399
- get: t,
400
- configurable: !0
401
- });
136
+ function m(e, r) {
137
+ function a() {
138
+ I || (I = !0, console.error(
139
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
+ r
141
+ ));
402
142
  }
403
- }
404
- function nr(e, r) {
405
- {
406
- var t = function() {
407
- be || (be = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
408
- };
409
- t.isReactWarning = !0, Object.defineProperty(e, "ref", {
410
- get: t,
411
- configurable: !0
412
- });
413
- }
414
- }
415
- var ar = function(e, r, t, n, l, f, u) {
416
- var i = {
417
- // This tag allows us to uniquely identify this as a React Element
418
- $$typeof: v,
419
- // Built-in properties that belong on the element
143
+ a.isReactWarning = !0, Object.defineProperty(e, "key", {
144
+ get: a,
145
+ configurable: !0
146
+ });
147
+ }
148
+ function A() {
149
+ var e = t(this.type);
150
+ return F[e] || (F[e] = !0, console.error(
151
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
+ )), e = this.props.ref, e !== void 0 ? e : null;
153
+ }
154
+ function j(e, r, a, o, x, N) {
155
+ var i = a.ref;
156
+ return e = {
157
+ $$typeof: f,
420
158
  type: e,
421
159
  key: r,
422
- ref: t,
423
- props: u,
424
- // Record the component responsible for creating this element.
425
- _owner: f
426
- };
427
- return i._store = {}, Object.defineProperty(i._store, "validated", {
160
+ props: a,
161
+ _owner: o
162
+ }, (i !== void 0 ? i : null) !== null ? Object.defineProperty(e, "ref", {
163
+ enumerable: !1,
164
+ get: A
165
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
428
166
  configurable: !1,
429
167
  enumerable: !1,
430
168
  writable: !0,
431
- value: !1
432
- }), Object.defineProperty(i, "_self", {
169
+ value: 0
170
+ }), Object.defineProperty(e, "_debugInfo", {
433
171
  configurable: !1,
434
172
  enumerable: !1,
435
- writable: !1,
436
- value: n
437
- }), Object.defineProperty(i, "_source", {
173
+ writable: !0,
174
+ value: null
175
+ }), Object.defineProperty(e, "_debugStack", {
438
176
  configurable: !1,
439
177
  enumerable: !1,
440
- writable: !1,
441
- value: l
442
- }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
443
- };
444
- function ir(e, r, t, n, l) {
445
- {
446
- var f, u = {}, i = null, m = null;
447
- t !== void 0 && (he(t), i = "" + t), er(r) && (he(r.key), i = "" + r.key), Qe(r) && (m = r.ref, rr(r, l));
448
- for (f in r)
449
- W.call(r, f) && !Ze.hasOwnProperty(f) && (u[f] = r[f]);
450
- if (e && e.defaultProps) {
451
- var s = e.defaultProps;
452
- for (f in s)
453
- u[f] === void 0 && (u[f] = s[f]);
454
- }
455
- if (i || m) {
456
- var c = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
457
- i && tr(u, c), m && nr(u, c);
458
- }
459
- return ar(e, i, m, l, n, me.current, u);
460
- }
461
- }
462
- var X = k.ReactCurrentOwner, pe = k.ReactDebugCurrentFrame;
463
- function D(e) {
464
- if (e) {
465
- var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
466
- pe.setExtraStackFrame(t);
467
- } else
468
- pe.setExtraStackFrame(null);
469
- }
470
- var Z;
471
- Z = !1;
472
- function Q(e) {
473
- return typeof e == "object" && e !== null && e.$$typeof === v;
474
- }
475
- function Re() {
476
- {
477
- if (X.current) {
478
- var e = C(X.current.type);
479
- if (e)
480
- return `
481
-
482
- Check the render method of \`` + e + "`.";
483
- }
484
- return "";
485
- }
486
- }
487
- function or(e) {
488
- return "";
489
- }
490
- var Ee = {};
491
- function ur(e) {
492
- {
493
- var r = Re();
494
- if (!r) {
495
- var t = typeof e == "string" ? e : e.displayName || e.name;
496
- t && (r = `
497
-
498
- Check the top-level render call using <` + t + ">.");
499
- }
500
- return r;
501
- }
502
- }
503
- function _e(e, r) {
504
- {
505
- if (!e._store || e._store.validated || e.key != null)
506
- return;
507
- e._store.validated = !0;
508
- var t = ur(r);
509
- if (Ee[t])
510
- return;
511
- Ee[t] = !0;
512
- var n = "";
513
- e && e._owner && e._owner !== X.current && (n = " It was passed a child from " + C(e._owner.type) + "."), D(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), D(null);
514
- }
515
- }
516
- function xe(e, r) {
517
- {
518
- if (typeof e != "object")
519
- return;
520
- if (G(e))
521
- for (var t = 0; t < e.length; t++) {
522
- var n = e[t];
523
- Q(n) && _e(n, r);
524
- }
525
- else if (Q(e))
526
- e._store && (e._store.validated = !0);
527
- else if (e) {
528
- var l = Ae(e);
529
- if (typeof l == "function" && l !== e.entries)
530
- for (var f = l.call(e), u; !(u = f.next()).done; )
531
- Q(u.value) && _e(u.value, r);
532
- }
533
- }
534
- }
535
- function lr(e) {
536
- {
537
- var r = e.type;
538
- if (r == null || typeof r == "string")
539
- return;
540
- var t;
541
- if (typeof r == "function")
542
- t = r.propTypes;
543
- else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
544
- // Inner props are checked in the reconciler.
545
- r.$$typeof === b))
546
- t = r.propTypes;
547
- else
548
- return;
549
- if (t) {
550
- var n = C(r);
551
- He(t, e.props, "prop", n, e);
552
- } else if (r.PropTypes !== void 0 && !Z) {
553
- Z = !0;
554
- var l = C(r);
555
- h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown");
556
- }
557
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
558
- }
559
- }
560
- function fr(e) {
561
- {
562
- for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
563
- var n = r[t];
564
- if (n !== "children" && n !== "key") {
565
- D(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
566
- break;
567
- }
568
- }
569
- e.ref !== null && (D(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
570
- }
571
- }
572
- var Te = {};
573
- function Se(e, r, t, n, l, f) {
574
- {
575
- var u = Me(e);
576
- if (!u) {
577
- var i = "";
578
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
- var m = or();
580
- m ? i += m : i += Re();
581
- var s;
582
- e === null ? s = "null" : G(e) ? s = "array" : e !== void 0 && e.$$typeof === v ? (s = "<" + (C(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, i);
583
- }
584
- var c = ir(e, r, t, l, f);
585
- if (c == null)
586
- return c;
587
- if (u) {
588
- var R = r.children;
589
- if (R !== void 0)
590
- if (n)
591
- if (G(R)) {
592
- for (var F = 0; F < R.length; F++)
593
- xe(R[F], e);
594
- Object.freeze && Object.freeze(R);
595
- } else
596
- h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
597
- else
598
- xe(R, e);
599
- }
600
- if (W.call(r, "key")) {
601
- var w = C(e), y = Object.keys(r).filter(function(hr) {
602
- return hr !== "key";
603
- }), ee = y.length > 0 ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}";
604
- if (!Te[w + ee]) {
605
- var gr = y.length > 0 ? "{" + y.join(": ..., ") + ": ...}" : "{}";
606
- h(`A props object containing a "key" prop is being spread into JSX:
178
+ writable: !0,
179
+ value: x
180
+ }), Object.defineProperty(e, "_debugTask", {
181
+ configurable: !1,
182
+ enumerable: !1,
183
+ writable: !0,
184
+ value: N
185
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
186
+ }
187
+ function T(e, r, a, o, x, N) {
188
+ var i = r.children;
189
+ if (i !== void 0)
190
+ if (o)
191
+ if (ne(i)) {
192
+ for (o = 0; o < i.length; o++)
193
+ h(i[o]);
194
+ Object.freeze && Object.freeze(i);
195
+ } else
196
+ console.error(
197
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
+ );
199
+ else h(i);
200
+ if (D.call(r, "key")) {
201
+ i = t(e);
202
+ var _ = Object.keys(r).filter(function(ae) {
203
+ return ae !== "key";
204
+ });
205
+ o = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", z[i + o] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ `A props object containing a "key" prop is being spread into JSX:
607
207
  let props = %s;
608
208
  <%s {...props} />
609
209
  React keys must be passed directly to JSX without using spread:
610
210
  let props = %s;
611
- <%s key={someKey} {...props} />`, ee, w, gr, w), Te[w + ee] = !0;
612
- }
613
- }
614
- return e === E ? fr(c) : lr(c), c;
211
+ <%s key={someKey} {...props} />`,
212
+ o,
213
+ i,
214
+ _,
215
+ i
216
+ ), z[i + o] = !0);
615
217
  }
218
+ if (i = null, a !== void 0 && (b(a), i = "" + a), d(r) && (b(r.key), i = "" + r.key), "key" in r) {
219
+ a = {};
220
+ for (var C in r)
221
+ C !== "key" && (a[C] = r[C]);
222
+ } else a = r;
223
+ return i && m(
224
+ a,
225
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
226
+ ), j(
227
+ e,
228
+ i,
229
+ a,
230
+ s(),
231
+ x,
232
+ N
233
+ );
616
234
  }
617
- function sr(e, r, t) {
618
- return Se(e, r, t, !0);
235
+ function h(e) {
236
+ g(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === O && (e._payload.status === "fulfilled" ? g(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
619
237
  }
620
- function cr(e, r, t) {
621
- return Se(e, r, t, !1);
238
+ function g(e) {
239
+ return typeof e == "object" && e !== null && e.$$typeof === f;
622
240
  }
623
- var dr = cr, vr = sr;
624
- L.Fragment = E, L.jsx = dr, L.jsxs = vr;
625
- })()), L;
241
+ var n = de, f = Symbol.for("react.transitional.element"), J = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), H = Symbol.for("react.strict_mode"), G = Symbol.for("react.profiler"), X = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), Q = Symbol.for("react.suspense"), K = Symbol.for("react.suspense_list"), ee = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), re = Symbol.for("react.client.reference"), P = n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, ne = Array.isArray, p = console.createTask ? console.createTask : function() {
242
+ return null;
243
+ };
244
+ n = {
245
+ react_stack_bottom_frame: function(e) {
246
+ return e();
247
+ }
248
+ };
249
+ var I, F = {}, Y = n.react_stack_bottom_frame.bind(
250
+ n,
251
+ u
252
+ )(), $ = p(c(u)), z = {};
253
+ v.Fragment = w, v.jsx = function(e, r, a) {
254
+ var o = 1e4 > P.recentlyCreatedOwnerStacks++;
255
+ return T(
256
+ e,
257
+ r,
258
+ a,
259
+ !1,
260
+ o ? Error("react-stack-top-frame") : Y,
261
+ o ? p(c(e)) : $
262
+ );
263
+ }, v.jsxs = function(e, r, a) {
264
+ var o = 1e4 > P.recentlyCreatedOwnerStacks++;
265
+ return T(
266
+ e,
267
+ r,
268
+ a,
269
+ !0,
270
+ o ? Error("react-stack-top-frame") : Y,
271
+ o ? p(c(e)) : $
272
+ );
273
+ };
274
+ })()), v;
626
275
  }
627
- var je;
628
- function wr() {
629
- return je || (je = 1, process.env.NODE_ENV === "production" ? J.exports = Cr() : J.exports = Or()), J.exports;
276
+ var V;
277
+ function he() {
278
+ return V || (V = 1, process.env.NODE_ENV === "production" ? k.exports = _e() : k.exports = Ee()), k.exports;
630
279
  }
631
- var q = wr();
632
- const De = xr(({ props: a, value: v, onChange: I, onBlur: E, readOnly: P }, j) => {
633
- const T = Tr(null);
634
- Sr(
635
- j,
280
+ var S = he();
281
+ const q = me(({ props: t, value: l, onChange: b, onBlur: c, readOnly: s }, u) => {
282
+ const d = be(null);
283
+ ge(
284
+ u,
636
285
  () => ({
637
286
  focus: () => {
638
- var o;
639
- (o = T.current) == null || o.focus();
287
+ var n;
288
+ (n = d.current) == null || n.focus();
640
289
  }
641
290
  }),
642
291
  []
643
292
  );
644
- const _ = Oe(() => {
645
- const o = {
293
+ const m = M(() => {
294
+ const n = {
646
295
  width: "100%",
647
296
  height: "100%",
648
297
  display: "flex",
@@ -651,37 +300,37 @@ const De = xr(({ props: a, value: v, onChange: I, onBlur: E, readOnly: P }, j) =
651
300
  overflow: "hidden"
652
301
  // コンテンツが溢れないように
653
302
  };
654
- switch (a.justifyContent) {
655
- case z.center:
656
- o.justifyContent = "center";
303
+ switch (t.justifyContent) {
304
+ case y.center:
305
+ n.justifyContent = "center";
657
306
  break;
658
- case z.right:
659
- o.justifyContent = "flex-end";
307
+ case y.right:
308
+ n.justifyContent = "flex-end";
660
309
  break;
661
310
  default:
662
- o.justifyContent = "flex-start";
311
+ n.justifyContent = "flex-start";
663
312
  break;
664
313
  }
665
- switch (a.alignItems) {
666
- case Ce.top:
667
- o.alignItems = "flex-start";
314
+ switch (t.alignItems) {
315
+ case L.top:
316
+ n.alignItems = "flex-start";
668
317
  break;
669
- case Ce.bottom:
670
- o.alignItems = "flex-end";
318
+ case L.bottom:
319
+ n.alignItems = "flex-end";
671
320
  break;
672
321
  default:
673
- o.alignItems = "center";
322
+ n.alignItems = "center";
674
323
  break;
675
324
  }
676
- if (a.isIndividual)
677
- a.top && (o.paddingTop = A.fromDim(a.top)), a.right && (o.paddingRight = A.fromDim(a.right)), a.bottom && (o.paddingBottom = A.fromDim(a.bottom)), a.left && (o.paddingLeft = A.fromDim(a.left));
678
- else if (a.all) {
679
- const x = A.fromDim(a.all);
680
- o.padding = `${x}px`;
325
+ if (t.isIndividual)
326
+ t.top && (n.paddingTop = E.fromDim(t.top)), t.right && (n.paddingRight = E.fromDim(t.right)), t.bottom && (n.paddingBottom = E.fromDim(t.bottom)), t.left && (n.paddingLeft = E.fromDim(t.left));
327
+ else if (t.all) {
328
+ const f = E.fromDim(t.all);
329
+ n.padding = `${f}px`;
681
330
  }
682
- return o;
683
- }, [a]), d = Oe(() => {
684
- const o = {
331
+ return n;
332
+ }, [t]), A = M(() => {
333
+ const n = {
685
334
  background: "transparent",
686
335
  border: "none",
687
336
  outline: "none",
@@ -698,42 +347,42 @@ const De = xr(({ props: a, value: v, onChange: I, onBlur: E, readOnly: P }, j) =
698
347
  // 親(設定)のフォントを継承させるか、個別指定するか
699
348
  color: "inherit"
700
349
  };
701
- a.fontSize && (o.fontSize = `${A.fromDim(a.fontSize)}px`), a.fontFamily && (o.fontFamily = a.fontFamily), a.color && (o.color = a.color), o.fontWeight = a.fontWeight ? "bold" : "normal", o.fontStyle = a.italic ? "italic" : "normal";
702
- const x = [];
703
- switch (a.underline && x.push("underline"), a.lineThrough && x.push("line-through"), o.textDecoration = x.length > 0 ? x.join(" ") : "none", a.lineHeight && (o.lineHeight = a.lineHeight), a.justifyContent) {
704
- case z.center:
705
- o.textAlign = "center";
350
+ t.fontSize && (n.fontSize = `${E.fromDim(t.fontSize)}px`), t.fontFamily && (n.fontFamily = t.fontFamily), t.color && (n.color = t.color), n.fontWeight = t.fontWeight ? "bold" : "normal", n.fontStyle = t.italic ? "italic" : "normal";
351
+ const f = [];
352
+ switch (t.underline && f.push("underline"), t.lineThrough && f.push("line-through"), n.textDecoration = f.length > 0 ? f.join(" ") : "none", t.lineHeight && (n.lineHeight = t.lineHeight), t.justifyContent) {
353
+ case y.center:
354
+ n.textAlign = "center";
706
355
  break;
707
- case z.right:
708
- o.textAlign = "right";
356
+ case y.right:
357
+ n.textAlign = "right";
709
358
  break;
710
359
  default:
711
- o.textAlign = "left";
360
+ n.textAlign = "left";
712
361
  break;
713
362
  }
714
- return o;
715
- }, [a]), S = (o) => {
716
- I(o.target.value);
717
- }, g = () => {
718
- E == null || E(v);
719
- }, b = !P, p = {
720
- ref: T,
721
- value: v ?? "",
722
- onChange: S,
723
- onBlur: g,
724
- style: d,
725
- placeholder: a.placeholder,
726
- readOnly: !b,
727
- tabIndex: b ? 0 : -1
363
+ return n;
364
+ }, [t]), j = (n) => {
365
+ b(n.target.value);
366
+ }, T = () => {
367
+ c == null || c(l);
368
+ }, h = !s, g = {
369
+ ref: d,
370
+ value: l ?? "",
371
+ onChange: j,
372
+ onBlur: T,
373
+ style: A,
374
+ placeholder: t.placeholder,
375
+ readOnly: !h,
376
+ tabIndex: h ? 0 : -1
728
377
  };
729
- return a.multiline ? (p.style = {
730
- ...p.style,
378
+ return t.multiline ? (g.style = {
379
+ ...g.style,
731
380
  height: "100%",
732
381
  flex: 1
733
- }, /* @__PURE__ */ q.jsx("div", { style: _, children: /* @__PURE__ */ q.jsx("textarea", { ...p }) })) : /* @__PURE__ */ q.jsx("div", { style: _, children: /* @__PURE__ */ q.jsx("input", { type: "text", ...p }) });
382
+ }, /* @__PURE__ */ S.jsx("div", { style: m, children: /* @__PURE__ */ S.jsx("textarea", { ...g }) })) : /* @__PURE__ */ S.jsx("div", { style: m, children: /* @__PURE__ */ S.jsx("input", { type: "text", ...g }) });
734
383
  });
735
- De.displayName = "TextRenderer";
736
- function Pr(a = mr) {
384
+ q.displayName = "TextRenderer";
385
+ function Re(t = oe) {
737
386
  return {
738
387
  kind: "text",
739
388
  meta: {
@@ -742,34 +391,34 @@ function Pr(a = mr) {
742
391
  defaultSize: { w: 4, h: 2 }
743
392
  // デフォルトサイズ
744
393
  },
745
- Renderer: De,
394
+ Renderer: q,
746
395
  properties: {
747
- ..._r,
748
- ...Er,
749
- ...Rr,
750
- ...pr,
751
- ...br,
396
+ ...fe,
397
+ ...ce,
398
+ ...ue,
399
+ ...se,
400
+ ...le,
752
401
  fontFamily: {
753
402
  defaultValue: "sans-serif",
754
403
  label: "フォント",
755
404
  group: "フォント",
756
- Component: yr,
405
+ Component: ie,
757
406
  config: {
758
407
  placeholder: "フォントを選択",
759
- options: a
408
+ options: t
760
409
  }
761
410
  }
762
411
  },
763
412
  // バリデーション (Propsの型チェックと初期化)
764
- validateProps: (v) => v,
413
+ validateProps: (l) => l,
765
414
  // 値のバリデーション
766
- validateValue: (v) => typeof v == "string" ? v : typeof v == "number" ? String(v) : null
415
+ validateValue: (l) => typeof l == "string" ? l : typeof l == "number" ? String(l) : null
767
416
  };
768
417
  }
769
- const Dr = Pr();
418
+ const xe = Re();
770
419
  export {
771
- Dr as TextPlugin,
772
- De as TextRenderer,
773
- Pr as createTextPlugin
420
+ xe as TextPlugin,
421
+ q as TextRenderer,
422
+ Re as createTextPlugin
774
423
  };
775
424
  //# sourceMappingURL=index.mjs.map