@tatamicks/text 0.1.0 → 0.1.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.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@tatamicks/core"),h=require("react");var k={exports:{}},v={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@tatamicks/core"),f=require("react");var W={exports:{}},C={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var L;function ae(){if(L)return v;L=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function g(f,u,c){var m=null;if(c!==void 0&&(m=""+c),u.key!==void 0&&(m=""+u.key),"key"in u){c={};for(var b in u)b!=="key"&&(c[b]=u[b])}else c=u;return u=c.ref,{$$typeof:t,type:f,key:m,ref:u!==void 0?u:null,props:c}}return v.Fragment=s,v.jsx=g,v.jsxs=g,v}var x={};/**
9
+ */var K;function oe(){if(K)return C;K=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function h(m,u,d){var g=null;if(d!==void 0&&(g=""+d),u.key!==void 0&&(g=""+u.key),"key"in u){d={};for(var x in u)x!=="key"&&(d[x]=u[x])}else d=u;return u=d.ref,{$$typeof:t,type:m,key:g,ref:u!==void 0?u:null,props:d}}return C.Fragment=s,C.jsx=h,C.jsxs=h,C}var I={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,10 +14,10 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var W;function oe(){return W||(W=1,process.env.NODE_ENV!=="production"&&(function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case J:return"Profiler";case H:return"StrictMode";case B:return"Suspense";case Q:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case q:return"Portal";case X:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case Z:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case O:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function s(e){return""+e}function g(e){try{s(e);var r=!1}catch{r=!0}if(r){r=console;var a=r.error,o=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),s(e)}}function f(e){if(e===j)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===O)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function u(){var e=w.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function m(e){if(I.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function b(e,r){function a(){F||(F=!0,console.error("%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)",r))}a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}function P(){var e=t(this.type);return Y[e]||(Y[e]=!0,console.error("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.")),e=this.props.ref,e!==void 0?e:null}function A(e,r,a,o,y,N){var i=a.ref;return e={$$typeof:d,type:e,key:r,props:a,_owner:o},(i!==void 0?i:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:P}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:y}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function T(e,r,a,o,y,N){var i=r.children;if(i!==void 0)if(o)if(re(i)){for(o=0;o<i.length;o++)R(i[o]);Object.freeze&&Object.freeze(i)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else R(i);if(I.call(r,"key")){i=t(e);var E=Object.keys(r).filter(function(ne){return ne!=="key"});o=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",M[i+o]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var ee;function ae(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&(function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case Y:return"Profiler";case z:return"StrictMode";case r:return"Suspense";case c:return"SuspenseList";case b:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case v:return"Portal";case H:return e.displayName||"Context";case y:return(e._context.displayName||"Context")+".Consumer";case M:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case p:return n=e.displayName||null,n!==null?n:t(e.type)||"Memo";case T:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function s(e){return""+e}function h(e){try{s(e);var n=!1}catch{n=!0}if(n){n=console;var o=n.error,i=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",i),s(e)}}function m(e){if(e===j)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===T)return"<...>";try{var n=t(e);return n?"<"+n+">":"<...>"}catch{return"<...>"}}function u(){var e=N.A;return e===null?null:e.getOwner()}function d(){return Error("react-stack-top-frame")}function g(e){if(S.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return e.key!==void 0}function x(e,n){function o(){E||(E=!0,console.error("%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)",n))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}function D(){var e=t(this.type);return G[e]||(G[e]=!0,console.error("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.")),e=this.props.ref,e!==void 0?e:null}function $(e,n,o,i,L,q){var l=o.ref;return e={$$typeof:O,type:e,key:n,props:o,_owner:i},(l!==void 0?l:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:D}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function P(e,n,o,i,L,q){var l=n.children;if(l!==void 0)if(i)if(U(l)){for(i=0;i<l.length;i++)R(l[i]);Object.freeze&&Object.freeze(l)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else R(l);if(S.call(n,"key")){l=t(e);var w=Object.keys(n).filter(function(ne){return ne!=="key"});i=0<w.length?"{key: someKey, "+w.join(": ..., ")+": ...}":"{key: someKey}",Q[l+i]||(w=0<w.length?"{"+w.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,o,i,E,i),M[i+o]=!0)}if(i=null,a!==void 0&&(g(a),i=""+a),m(r)&&(g(r.key),i=""+r.key),"key"in r){a={};for(var C in r)C!=="key"&&(a[C]=r[C])}else a=r;return i&&b(a,typeof e=="function"?e.displayName||e.name||"Unknown":e),A(e,i,a,u(),y,N)}function R(e){_(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===O&&(e._payload.status==="fulfilled"?_(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function _(e){return typeof e=="object"&&e!==null&&e.$$typeof===d}var n=h,d=Symbol.for("react.transitional.element"),q=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),X=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),w=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,re=Array.isArray,p=console.createTask?console.createTask:function(){return null};n={react_stack_bottom_frame:function(e){return e()}};var F,Y={},$=n.react_stack_bottom_frame.bind(n,c)(),z=p(f(c)),M={};x.Fragment=j,x.jsx=function(e,r,a){var o=1e4>w.recentlyCreatedOwnerStacks++;return T(e,r,a,!1,o?Error("react-stack-top-frame"):$,o?p(f(e)):z)},x.jsxs=function(e,r,a){var o=1e4>w.recentlyCreatedOwnerStacks++;return T(e,r,a,!0,o?Error("react-stack-top-frame"):$,o?p(f(e)):z)}})()),x}var V;function ie(){return V||(V=1,process.env.NODE_ENV==="production"?k.exports=ae():k.exports=oe()),k.exports}var S=ie();const D=h.forwardRef(({props:t,value:s,onChange:g,onBlur:f,readOnly:u},c)=>{const m=h.useRef(null);h.useImperativeHandle(c,()=>({focus:()=>{var n;(n=m.current)==null||n.focus()}}),[]);const b=h.useMemo(()=>{const n={width:"100%",height:"100%",display:"flex",boxSizing:"border-box",overflow:"hidden"};switch(t.justifyContent){case l.HorizontalAlign.center:n.justifyContent="center";break;case l.HorizontalAlign.right:n.justifyContent="flex-end";break;default:n.justifyContent="flex-start";break}switch(t.alignItems){case l.VerticalAlign.top:n.alignItems="flex-start";break;case l.VerticalAlign.bottom:n.alignItems="flex-end";break;default:n.alignItems="center";break}if(t.isIndividual)t.top&&(n.paddingTop=l.toPx.fromDim(t.top)),t.right&&(n.paddingRight=l.toPx.fromDim(t.right)),t.bottom&&(n.paddingBottom=l.toPx.fromDim(t.bottom)),t.left&&(n.paddingLeft=l.toPx.fromDim(t.left));else if(t.all){const d=l.toPx.fromDim(t.all);n.padding=`${d}px`}return n},[t]),P=h.useMemo(()=>{const n={background:"transparent",border:"none",outline:"none",resize:"none",padding:0,margin:0,width:"100%",height:"100%",boxSizing:"border-box",fontFamily:"inherit",color:"inherit"};t.fontSize&&(n.fontSize=`${l.toPx.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";const d=[];switch(t.underline&&d.push("underline"),t.lineThrough&&d.push("line-through"),n.textDecoration=d.length>0?d.join(" "):"none",t.lineHeight&&(n.lineHeight=t.lineHeight),t.justifyContent){case l.HorizontalAlign.center:n.textAlign="center";break;case l.HorizontalAlign.right:n.textAlign="right";break;default:n.textAlign="left";break}return n},[t]),A=n=>{g(n.target.value)},T=()=>{f==null||f(s)},R=!u,_={ref:m,value:s??"",onChange:A,onBlur:T,style:P,placeholder:t.placeholder,readOnly:!R,tabIndex:R?0:-1};return t.multiline?(_.style={..._.style,height:"100%",flex:1},S.jsx("div",{style:b,children:S.jsx("textarea",{..._})})):S.jsx("div",{style:b,children:S.jsx("input",{type:"text",..._})})});D.displayName="TextRenderer";function U(t=l.DEFAULT_FONT_FAMILY){return{kind:"text",meta:{displayName:"テキスト",description:"リッチなテキスト編集ブロック",defaultSize:{w:4,h:2}},Renderer:D,properties:{...l.universalProperties,...l.placeholderDefinition,...l.fontStyleDefinition,...l.multilineDefinition,...l.validationDefinition,fontFamily:{defaultValue:"sans-serif",label:"フォント",group:"フォント",Component:l.Select,config:{placeholder:"フォントを選択",options:t}}},validateProps:s=>s,validateValue:s=>typeof s=="string"?s:typeof s=="number"?String(s):null}}const le=U();exports.TextPlugin=le;exports.TextRenderer=D;exports.createTextPlugin=U;
22
+ <%s key={someKey} {...props} />`,i,l,w,l),Q[l+i]=!0)}if(l=null,o!==void 0&&(h(o),l=""+o),g(n)&&(h(n.key),l=""+n.key),"key"in n){o={};for(var J in n)J!=="key"&&(o[J]=n[J])}else o=n;return l&&x(o,typeof e=="function"?e.displayName||e.name||"Unknown":e),$(e,l,o,u(),L,q)}function R(e){A(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===T&&(e._payload.status==="fulfilled"?A(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function A(e){return typeof e=="object"&&e!==null&&e.$$typeof===O}var _=f,O=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),H=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),r=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),V=Symbol.for("react.client.reference"),N=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,U=Array.isArray,k=console.createTask?console.createTask:function(){return null};_={react_stack_bottom_frame:function(e){return e()}};var E,G={},X=_.react_stack_bottom_frame.bind(_,d)(),Z=k(m(d)),Q={};I.Fragment=j,I.jsx=function(e,n,o){var i=1e4>N.recentlyCreatedOwnerStacks++;return P(e,n,o,!1,i?Error("react-stack-top-frame"):X,i?k(m(e)):Z)},I.jsxs=function(e,n,o){var i=1e4>N.recentlyCreatedOwnerStacks++;return P(e,n,o,!0,i?Error("react-stack-top-frame"):X,i?k(m(e)):Z)}})()),I}var te;function ie(){return te||(te=1,process.env.NODE_ENV==="production"?W.exports=oe():W.exports=ae()),W.exports}var F=ie();const B=f.forwardRef(({props:t,value:s,onChange:h,onBlur:m,readOnly:u},d)=>{const g=f.useRef(null),x=f.useRef(null),D=f.useRef(null),$=f.useRef(null),[P,R]=f.useState({top:0,bottom:0}),[A,_]=f.useState(null);f.useEffect(()=>{if(!t.multiline)return;const r=$.current,c=D.current;if(!r||!c)return;r.value=s??"";const p=window.getComputedStyle(c),T=Number.parseFloat(p.paddingTop),b=Number.parseFloat(p.paddingBottom),V=Number.parseFloat(p.paddingLeft),N=Number.parseFloat(p.paddingRight),S=c.clientHeight-T-b,U=c.clientWidth-V-N;r.style.width=`${U}px`,r.style.paddingTop="0px",r.style.paddingBottom="0px";const k=r.scrollHeight;if(_(S),k<S){const E=S-k;switch(t.alignItems){case a.VerticalAlign.top:R({top:0,bottom:E});break;case a.VerticalAlign.bottom:R({top:E,bottom:0});break;default:R({top:E/2,bottom:E/2});break}}else R({top:0,bottom:0})},[t,s]),f.useImperativeHandle(d,()=>({focus:()=>{var r;(r=g.current)==null||r.focus()}}),[]);const O=f.useMemo(()=>{const r={width:"100%",height:"100%",display:"flex",boxSizing:"border-box",overflow:"hidden"};switch(t.justifyContent){case a.HorizontalAlign.center:r.justifyContent="center";break;case a.HorizontalAlign.right:r.justifyContent="flex-end";break;default:r.justifyContent="flex-start";break}switch(t.alignItems){case a.VerticalAlign.top:r.alignItems="flex-start";break;case a.VerticalAlign.bottom:r.alignItems="flex-end";break;default:r.alignItems="center";break}if(t.isIndividual)t.top&&(r.paddingTop=a.toPx.fromDim(t.top)),t.right&&(r.paddingRight=a.toPx.fromDim(t.right)),t.bottom&&(r.paddingBottom=a.toPx.fromDim(t.bottom)),t.left&&(r.paddingLeft=a.toPx.fromDim(t.left));else if(t.all){const c=a.toPx.fromDim(t.all);r.padding=`${c}px`}return r},[t]),v=f.useMemo(()=>{const r={background:"transparent",border:"none",outline:"none",resize:"none",padding:0,margin:0,width:"100%",boxSizing:"border-box",fontFamily:"inherit",color:"inherit"};t.fontSize&&(r.fontSize=`${a.toPx.fromDim(t.fontSize)}px`),t.fontFamily&&(r.fontFamily=t.fontFamily),t.color&&(r.color=t.color),r.fontWeight=t.fontWeight?"bold":"normal",r.fontStyle=t.italic?"italic":"normal";const c=[];switch(t.underline&&c.push("underline"),t.lineThrough&&c.push("line-through"),r.textDecoration=c.length>0?c.join(" "):"none",t.lineHeight&&(r.lineHeight=t.lineHeight),t.justifyContent){case a.HorizontalAlign.center:r.textAlign="center";break;case a.HorizontalAlign.right:r.textAlign="right";break;default:r.textAlign="left";break}return r},[t]),j=f.useMemo(()=>({...v,position:"absolute",top:0,left:0,width:"100%",height:"auto",visibility:"hidden",pointerEvents:"none",overflow:"hidden",whiteSpace:"pre-wrap",wordWrap:"break-word",overflowWrap:"break-word",padding:0,border:"none",boxSizing:"border-box",resize:"none"}),[v]),z=r=>{h(r.target.value)},Y=()=>{m==null||m(s)},y=!u;if(t.multiline){const r={...v,resize:"none",overflow:"auto",height:A!==null?`${A}px`:"100%",paddingTop:`${P.top}px`,paddingBottom:`${P.bottom}px`},T={ref:b=>{x.current=b,g.current=b},value:s??"",onChange:b=>{z(b)},onBlur:Y,style:r,placeholder:t.placeholder,readOnly:!y,tabIndex:y?0:-1};return F.jsxs("div",{ref:D,style:O,children:[F.jsx("textarea",{ref:$,style:j,"aria-hidden":"true",readOnly:!0,tabIndex:-1,rows:1,value:s??""}),F.jsx("textarea",{...T})]})}const H={...v,height:"100%"},M={ref:g,value:s??"",onChange:z,onBlur:Y,style:H,placeholder:t.placeholder,readOnly:!y,tabIndex:y?0:-1};return F.jsx("div",{style:O,children:F.jsx("input",{type:"text",...M})})});B.displayName="TextRenderer";function re(t=a.DEFAULT_FONT_FAMILY){return{kind:"text",meta:{displayName:"テキスト",description:"リッチなテキスト編集ブロック",defaultSize:{w:4,h:2}},Renderer:B,properties:{...a.universalProperties,...a.placeholderDefinition,...a.fontStyleDefinition,...a.multilineDefinition,...a.validationDefinition,fontFamily:{defaultValue:"sans-serif",label:"フォント",group:"フォント",Component:a.Select,config:{placeholder:"フォントを選択",options:t}}},validateProps:s=>s,validateValue:s=>typeof s=="string"?s:typeof s=="number"?String(s):null}}const le=re();exports.TextPlugin=le;exports.TextRenderer=B;exports.createTextPlugin=re;
23
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/jsx-runtime.js","../src/TextRenderer.tsx","../src/TextPlugin.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"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.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import {\n\ttype CSSProperties,\n\tforwardRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n} from \"react\";\nimport {\n\ttype BlockRef,\n\tHorizontalAlign,\n\ttype RendererProps,\n\ttoPx,\n\tVerticalAlign,\n} from \"@tatamicks/core\";\n\nimport type { TextProps, TextValue } from \"./types\";\n\nexport const TextRenderer = forwardRef<\n\tBlockRef,\n\tRendererProps<TextProps, TextValue>\n>(({ props, value, onChange, onBlur, readOnly }, ref) => {\n\t// 入力要素への参照\n\tconst inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n\n\t// 外部に focus メソッドを公開\n\tuseImperativeHandle(\n\t\tref,\n\t\t() => ({\n\t\t\tfocus: () => {\n\t\t\t\tinputRef.current?.focus();\n\t\t\t},\n\t\t}),\n\t\t[],\n\t);\n\n\t// --- コンテナ(Flexbox)のスタイル計算 ---\n\tconst containerStyle = useMemo((): CSSProperties => {\n\t\tconst css: CSSProperties = {\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\tdisplay: \"flex\", // ★ Flexboxを使用\n\t\t\tboxSizing: \"border-box\",\n\t\t\toverflow: \"hidden\", // コンテンツが溢れないように\n\t\t};\n\n\t\t// 1. 配置 (Flexboxで制御)\n\t\t// 水平方向 (justifyContent)\n\t\tswitch (props.justifyContent) {\n\t\t\tcase HorizontalAlign.center:\n\t\t\t\tcss.justifyContent = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase HorizontalAlign.right:\n\t\t\t\tcss.justifyContent = \"flex-end\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.justifyContent = \"flex-start\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// 垂直方向 (alignItems)\n\t\tswitch (props.alignItems) {\n\t\t\tcase VerticalAlign.top:\n\t\t\t\tcss.alignItems = \"flex-start\";\n\t\t\t\tbreak;\n\t\t\tcase VerticalAlign.bottom:\n\t\t\t\tcss.alignItems = \"flex-end\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.alignItems = \"center\";\n\t\t\t\tbreak; // デフォルトは中央\n\t\t}\n\n\t\t// 2. 余白 (Padding) - コンテナ側に適用\n\t\tif (props.isIndividual) {\n\t\t\tif (props.top) css.paddingTop = toPx.fromDim(props.top);\n\t\t\tif (props.right) css.paddingRight = toPx.fromDim(props.right);\n\t\t\tif (props.bottom) css.paddingBottom = toPx.fromDim(props.bottom);\n\t\t\tif (props.left) css.paddingLeft = toPx.fromDim(props.left);\n\t\t} else if (props.all) {\n\t\t\tconst p = toPx.fromDim(props.all);\n\t\t\tcss.padding = `${p}px`;\n\t\t}\n\n\t\treturn css;\n\t}, [props]);\n\n\t// --- 入力要素(Input/Textarea)のスタイル計算 ---\n\tconst inputStyle = useMemo((): CSSProperties => {\n\t\tconst css: CSSProperties = {\n\t\t\tbackground: \"transparent\",\n\t\t\tborder: \"none\",\n\t\t\toutline: \"none\",\n\t\t\tresize: \"none\",\n\t\t\tpadding: 0, // Paddingはコンテナで管理するため0\n\t\t\tmargin: 0,\n\t\t\twidth: \"100%\", // Flexアイテムとして伸長\n\t\t\theight: \"100%\", // 必要に応じて調整(Textareaなら100%でも良い)\n\t\t\tboxSizing: \"border-box\",\n\t\t\tfontFamily: \"inherit\", // 親(設定)のフォントを継承させるか、個別指定するか\n\t\t\tcolor: \"inherit\",\n\t\t};\n\n\t\t// フォント関連\n\t\tif (props.fontSize) {\n\t\t\tcss.fontSize = `${toPx.fromDim(props.fontSize)}px`;\n\t\t}\n\n\t\tif (props.fontFamily) css.fontFamily = props.fontFamily;\n\t\tif (props.color) css.color = props.color;\n\n\t\tcss.fontWeight = props.fontWeight ? \"bold\" : \"normal\";\n\t\tcss.fontStyle = props.italic ? \"italic\" : \"normal\";\n\n\t\tconst decorations: string[] = [];\n\t\tif (props.underline) decorations.push(\"underline\");\n\t\tif (props.lineThrough) decorations.push(\"line-through\");\n\t\tcss.textDecoration =\n\t\t\tdecorations.length > 0 ? decorations.join(\" \") : \"none\";\n\n\t\tif (props.lineHeight) css.lineHeight = props.lineHeight;\n\n\t\t// テキストアライン(入力中のテキスト自体の行揃え)\n\t\t// FlexboxのjustifyContentとは別に、複数行テキストの中身の揃えを指定\n\t\tswitch (props.justifyContent) {\n\t\t\tcase HorizontalAlign.center:\n\t\t\t\tcss.textAlign = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase HorizontalAlign.right:\n\t\t\t\tcss.textAlign = \"right\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.textAlign = \"left\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn css;\n\t}, [props]);\n\n\t// --- イベントハンドラ ---\n\tconst handleChange = (\n\t\te: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n\t) => {\n\t\tonChange(e.target.value);\n\t};\n\n\tconst handleBlur = () => {\n\t\tonBlur?.(value);\n\t};\n\n\t// --- 編集モード判定 ---\n\t// FORMモードでも編集可能にする(initValue編集のため)\n\tconst isEditable = !readOnly;\n\n\tconst commonInputProps = {\n\t\tref: inputRef as React.RefObject<HTMLInputElement & HTMLTextAreaElement>,\n\t\tvalue: value ?? \"\",\n\t\tonChange: handleChange,\n\t\tonBlur: handleBlur,\n\t\tstyle: inputStyle,\n\t\tplaceholder: props.placeholder,\n\t\treadOnly: !isEditable,\n\t\ttabIndex: isEditable ? 0 : -1,\n\t};\n\n\t// Flexアイテムとして振る舞わせるためのスタイル調整\n\t// Textareaの場合は高さを親に合わせる、Inputの場合は中身なりにするなど\n\tif (props.multiline) {\n\t\tcommonInputProps.style = {\n\t\t\t...commonInputProps.style,\n\t\t\theight: \"100%\",\n\t\t\tflex: 1,\n\t\t};\n\t\treturn (\n\t\t\t<div style={containerStyle}>\n\t\t\t\t<textarea {...commonInputProps} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Inputの場合\n\treturn (\n\t\t<div style={containerStyle}>\n\t\t\t<input type=\"text\" {...commonInputProps} />\n\t\t</div>\n\t);\n});\n\nTextRenderer.displayName = \"TextRenderer\";\n","import {\n\ttype BlockPlugin,\n\tDEFAULT_FONT_FAMILY,\n\tfontStyleDefinition,\n\tmultilineDefinition,\n\tplaceholderDefinition,\n\tSelect,\n\ttype SelectOption,\n\tuniversalProperties,\n\tvalidationDefinition,\n} from \"@tatamicks/core\";\n\nimport { TextRenderer } from \"./TextRenderer\";\n\nimport type { TextProps, TextValue } from \"./types\";\n\nexport function createTextPlugin(\n\tfontFamilyOptions: readonly SelectOption[] = DEFAULT_FONT_FAMILY,\n): BlockPlugin<TextProps, TextValue> {\n\treturn {\n\t\tkind: \"text\",\n\n\t\tmeta: {\n\t\t\tdisplayName: \"テキスト\",\n\t\t\tdescription: \"リッチなテキスト編集ブロック\",\n\t\t\tdefaultSize: { w: 4, h: 2 }, // デフォルトサイズ\n\t\t},\n\n\t\tRenderer: TextRenderer,\n\n\t\tproperties: {\n\t\t\t...universalProperties,\n\t\t\t...placeholderDefinition,\n\t\t\t...fontStyleDefinition,\n\t\t\t...multilineDefinition,\n\t\t\t...validationDefinition,\n\n\t\t\tfontFamily: {\n\t\t\t\tdefaultValue: \"sans-serif\",\n\t\t\t\tlabel: \"フォント\",\n\t\t\t\tgroup: \"フォント\",\n\t\t\t\tComponent: Select,\n\t\t\t\tconfig: {\n\t\t\t\t\tplaceholder: \"フォントを選択\",\n\t\t\t\t\toptions: fontFamilyOptions,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\t// バリデーション (Propsの型チェックと初期化)\n\t\tvalidateProps: (props: unknown): TextProps => {\n\t\t\t// createInitialPropsを通すので、基本的にはキャストでOKですが、\n\t\t\t// 必要に応じて厳密なチェックを行います\n\t\t\treturn props as TextProps;\n\t\t},\n\n\t\t// 値のバリデーション\n\t\tvalidateValue: (value: unknown): TextValue | null => {\n\t\t\tif (typeof value === \"string\") return value;\n\t\t\tif (typeof value === \"number\") return String(value);\n\t\t\treturn null;\n\t\t},\n\t};\n}\n\nexport const TextPlugin: BlockPlugin<TextProps, TextValue> = createTextPlugin();\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","TextRenderer","forwardRef","onChange","onBlur","readOnly","ref","inputRef","useRef","useImperativeHandle","_a","containerStyle","useMemo","css","HorizontalAlign","VerticalAlign","toPx","p","inputStyle","decorations","handleChange","e","handleBlur","isEditable","commonInputProps","jsx","createTextPlugin","fontFamilyOptions","DEFAULT_FONT_FAMILY","universalProperties","placeholderDefinition","fontStyleDefinition","multilineDefinition","validationDefinition","Select","TextPlugin"],"mappings":";;;;;;;;yCAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAA,EACX,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EACjE,MAASF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,EAEX,CACA,OAAAG,EAAA,SAAmBP,EACnBO,EAAA,IAAcN,EACdM,EAAA,KAAeN;;;;;;;;sCCtBE,QAAQ,IAAI,WAA7B,eACG,UAAY,CACX,SAASO,EAAyBN,EAAM,CACtC,GAAYA,GAAR,KAAc,OAAO,KACzB,GAAmB,OAAOA,GAAtB,WACF,OAAOA,EAAK,WAAaO,GACrB,KACAP,EAAK,aAAeA,EAAK,MAAQ,KACvC,GAAiB,OAAOA,GAApB,SAA0B,OAAOA,EACrC,OAAQA,EAAI,CACV,KAAKF,EACH,MAAO,WACT,KAAKU,EACH,MAAO,WACT,KAAKC,EACH,MAAO,aACT,KAAKC,EACH,MAAO,WACT,KAAKC,EACH,MAAO,eACT,KAAKC,GACH,MAAO,UACjB,CACM,GAAiB,OAAOZ,GAApB,SACF,OACgB,OAAOA,EAAK,KAAzB,UACC,QAAQ,MACN,qHAEJA,EAAK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,EAEV,WAAY,CACX,GAAG4B,EAAAA,oBACH,GAAGC,EAAAA,sBACH,GAAGC,EAAAA,oBACH,GAAGC,EAAAA,oBACH,GAAGC,EAAAA,qBAEH,WAAY,CACX,aAAc,aACd,MAAO,OACP,MAAO,OACP,UAAWC,EAAAA,OACX,OAAQ,CACP,YAAa,UACb,QAASP,CAAA,CACV,CACD,EAID,cAAgB3D,GAGRA,EAIR,cAAgBf,GACX,OAAOA,GAAU,SAAiBA,EAClC,OAAOA,GAAU,SAAiB,OAAOA,CAAK,EAC3C,IACR,CAEF,CAEO,MAAMkF,GAAgDT,EAAA","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index.js","sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/jsx-runtime.js","../src/TextRenderer.tsx","../src/TextPlugin.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"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.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import {\n\ttype CSSProperties,\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport {\n\ttype BlockRef,\n\tHorizontalAlign,\n\ttype RendererProps,\n\ttoPx,\n\tVerticalAlign,\n} from \"@tatamicks/core\";\n\nimport type { TextProps, TextValue } from \"./types\";\nimport \"./TextRenderer.module.css\";\n\nexport const TextRenderer = forwardRef<\n\tBlockRef,\n\tRendererProps<TextProps, TextValue>\n>(({ props, value, onChange, onBlur, readOnly }, ref) => {\n\t// 入力要素への参照\n\tconst inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n\tconst textareaRef = useRef<HTMLTextAreaElement>(null);\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst ghostRef = useRef<HTMLTextAreaElement>(null);\n\n\tconst [textareaPadding, setTextareaPadding] = useState({ top: 0, bottom: 0 });\n\tconst [textareaHeight, setTextareaHeight] = useState<number | null>(null);\n\n\tuseEffect(() => {\n\t\tif (!props.multiline) return;\n\n\t\tconst ghost = ghostRef.current;\n\t\tconst container = containerRef.current;\n\t\tif (!ghost || !container) return;\n\n\t\tghost.value = value ?? \"\";\n\n\t\tconst containerStyle = window.getComputedStyle(container);\n\t\tconst paddingTop = Number.parseFloat(containerStyle.paddingTop);\n\t\tconst paddingBottom = Number.parseFloat(containerStyle.paddingBottom);\n\t\tconst paddingLeft = Number.parseFloat(containerStyle.paddingLeft);\n\t\tconst paddingRight = Number.parseFloat(containerStyle.paddingRight);\n\n\t\tconst containerHeight = container.clientHeight - paddingTop - paddingBottom;\n\t\tconst availableWidth = container.clientWidth - paddingLeft - paddingRight;\n\n\t\tghost.style.width = `${availableWidth}px`;\n\t\tghost.style.paddingTop = \"0px\";\n\t\tghost.style.paddingBottom = \"0px\";\n\n\t\tconst contentHeight = ghost.scrollHeight;\n\n\t\tsetTextareaHeight(containerHeight);\n\n\t\tif (contentHeight < containerHeight) {\n\t\t\tconst availableSpace = containerHeight - contentHeight;\n\n\t\t\tswitch (props.alignItems) {\n\t\t\t\tcase VerticalAlign.top:\n\t\t\t\t\tsetTextareaPadding({ top: 0, bottom: availableSpace });\n\t\t\t\t\tbreak;\n\t\t\t\tcase VerticalAlign.bottom:\n\t\t\t\t\tsetTextareaPadding({ top: availableSpace, bottom: 0 });\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsetTextareaPadding({\n\t\t\t\t\t\ttop: availableSpace / 2,\n\t\t\t\t\t\tbottom: availableSpace / 2,\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tsetTextareaPadding({ top: 0, bottom: 0 });\n\t\t}\n\t}, [props, value]);\n\n\tuseImperativeHandle(\n\t\tref,\n\t\t() => ({\n\t\t\tfocus: () => {\n\t\t\t\tinputRef.current?.focus();\n\t\t\t},\n\t\t}),\n\t\t[],\n\t);\n\n\tconst containerStyle = useMemo((): CSSProperties => {\n\t\tconst css: CSSProperties = {\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\tdisplay: \"flex\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\toverflow: \"hidden\",\n\t\t};\n\n\t\tswitch (props.justifyContent) {\n\t\t\tcase HorizontalAlign.center:\n\t\t\t\tcss.justifyContent = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase HorizontalAlign.right:\n\t\t\t\tcss.justifyContent = \"flex-end\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.justifyContent = \"flex-start\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\tswitch (props.alignItems) {\n\t\t\tcase VerticalAlign.top:\n\t\t\t\tcss.alignItems = \"flex-start\";\n\t\t\t\tbreak;\n\t\t\tcase VerticalAlign.bottom:\n\t\t\t\tcss.alignItems = \"flex-end\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.alignItems = \"center\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (props.isIndividual) {\n\t\t\tif (props.top) css.paddingTop = toPx.fromDim(props.top);\n\t\t\tif (props.right) css.paddingRight = toPx.fromDim(props.right);\n\t\t\tif (props.bottom) css.paddingBottom = toPx.fromDim(props.bottom);\n\t\t\tif (props.left) css.paddingLeft = toPx.fromDim(props.left);\n\t\t} else if (props.all) {\n\t\t\tconst p = toPx.fromDim(props.all);\n\t\t\tcss.padding = `${p}px`;\n\t\t}\n\n\t\treturn css;\n\t}, [props]);\n\n\tconst inputStyle = useMemo((): CSSProperties => {\n\t\tconst css: CSSProperties = {\n\t\t\tbackground: \"transparent\",\n\t\t\tborder: \"none\",\n\t\t\toutline: \"none\",\n\t\t\tresize: \"none\",\n\t\t\tpadding: 0,\n\t\t\tmargin: 0,\n\t\t\twidth: \"100%\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tfontFamily: \"inherit\",\n\t\t\tcolor: \"inherit\",\n\t\t};\n\n\t\tif (props.fontSize) {\n\t\t\tcss.fontSize = `${toPx.fromDim(props.fontSize)}px`;\n\t\t}\n\n\t\tif (props.fontFamily) css.fontFamily = props.fontFamily;\n\t\tif (props.color) css.color = props.color;\n\n\t\tcss.fontWeight = props.fontWeight ? \"bold\" : \"normal\";\n\t\tcss.fontStyle = props.italic ? \"italic\" : \"normal\";\n\n\t\tconst decorations: string[] = [];\n\t\tif (props.underline) decorations.push(\"underline\");\n\t\tif (props.lineThrough) decorations.push(\"line-through\");\n\t\tcss.textDecoration =\n\t\t\tdecorations.length > 0 ? decorations.join(\" \") : \"none\";\n\n\t\tif (props.lineHeight) css.lineHeight = props.lineHeight;\n\n\t\tswitch (props.justifyContent) {\n\t\t\tcase HorizontalAlign.center:\n\t\t\t\tcss.textAlign = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase HorizontalAlign.right:\n\t\t\t\tcss.textAlign = \"right\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.textAlign = \"left\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn css;\n\t}, [props]);\n\n\tconst ghostStyle = useMemo((): CSSProperties => {\n\t\treturn {\n\t\t\t...inputStyle,\n\t\t\tposition: \"absolute\",\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: \"100%\",\n\t\t\theight: \"auto\",\n\t\t\tvisibility: \"hidden\",\n\t\t\tpointerEvents: \"none\",\n\t\t\toverflow: \"hidden\",\n\t\t\twhiteSpace: \"pre-wrap\",\n\t\t\twordWrap: \"break-word\",\n\t\t\toverflowWrap: \"break-word\",\n\t\t\tpadding: 0,\n\t\t\tborder: \"none\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tresize: \"none\",\n\t\t};\n\t}, [inputStyle]);\n\n\tconst handleChange = (\n\t\te: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n\t) => {\n\t\tonChange(e.target.value);\n\t};\n\n\tconst handleBlur = () => {\n\t\tonBlur?.(value);\n\t};\n\n\tconst isEditable = !readOnly;\n\n\tif (props.multiline) {\n\t\tconst textareaStyle: CSSProperties = {\n\t\t\t...inputStyle,\n\t\t\tresize: \"none\",\n\t\t\toverflow: \"auto\",\n\t\t\theight: textareaHeight !== null ? `${textareaHeight}px` : \"100%\",\n\t\t\tpaddingTop: `${textareaPadding.top}px`,\n\t\t\tpaddingBottom: `${textareaPadding.bottom}px`,\n\t\t};\n\n\t\tconst handleTextareaChange = (\n\t\t\te: React.ChangeEvent<HTMLTextAreaElement>,\n\t\t) => {\n\t\t\thandleChange(e);\n\t\t};\n\n\t\tconst setTextareaRefs = (el: HTMLTextAreaElement | null) => {\n\t\t\ttextareaRef.current = el;\n\t\t\tinputRef.current = el;\n\t\t};\n\n\t\tconst textareaProps = {\n\t\t\tref: setTextareaRefs,\n\t\t\tvalue: value ?? \"\",\n\t\t\tonChange: handleTextareaChange,\n\t\t\tonBlur: handleBlur,\n\t\t\tstyle: textareaStyle,\n\t\t\tplaceholder: props.placeholder,\n\t\t\treadOnly: !isEditable,\n\t\t\ttabIndex: isEditable ? 0 : -1,\n\t\t};\n\n\t\treturn (\n\t\t\t<div ref={containerRef} style={containerStyle}>\n\t\t\t\t<textarea\n\t\t\t\t\tref={ghostRef}\n\t\t\t\t\tstyle={ghostStyle}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\treadOnly\n\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\trows={1}\n\t\t\t\t\tvalue={value ?? \"\"}\n\t\t\t\t/>\n\t\t\t\t<textarea {...textareaProps} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst singleLineStyle: CSSProperties = {\n\t\t...inputStyle,\n\t\theight: \"100%\",\n\t};\n\n\tconst commonInputProps = {\n\t\tref: inputRef as React.RefObject<HTMLInputElement>,\n\t\tvalue: value ?? \"\",\n\t\tonChange: handleChange,\n\t\tonBlur: handleBlur,\n\t\tstyle: singleLineStyle,\n\t\tplaceholder: props.placeholder,\n\t\treadOnly: !isEditable,\n\t\ttabIndex: isEditable ? 0 : -1,\n\t};\n\n\treturn (\n\t\t<div style={containerStyle}>\n\t\t\t<input type=\"text\" {...commonInputProps} />\n\t\t</div>\n\t);\n});\n\nTextRenderer.displayName = \"TextRenderer\";\n","import {\n\ttype BlockPlugin,\n\tDEFAULT_FONT_FAMILY,\n\tfontStyleDefinition,\n\tmultilineDefinition,\n\tplaceholderDefinition,\n\tSelect,\n\ttype SelectOption,\n\tuniversalProperties,\n\tvalidationDefinition,\n} from \"@tatamicks/core\";\n\nimport { TextRenderer } from \"./TextRenderer\";\n\nimport type { TextProps, TextValue } from \"./types\";\n\nexport function createTextPlugin(\n\tfontFamilyOptions: readonly SelectOption[] = DEFAULT_FONT_FAMILY,\n): BlockPlugin<TextProps, TextValue> {\n\treturn {\n\t\tkind: \"text\",\n\n\t\tmeta: {\n\t\t\tdisplayName: \"テキスト\",\n\t\t\tdescription: \"リッチなテキスト編集ブロック\",\n\t\t\tdefaultSize: { w: 4, h: 2 }, // デフォルトサイズ\n\t\t},\n\n\t\tRenderer: TextRenderer,\n\n\t\tproperties: {\n\t\t\t...universalProperties,\n\t\t\t...placeholderDefinition,\n\t\t\t...fontStyleDefinition,\n\t\t\t...multilineDefinition,\n\t\t\t...validationDefinition,\n\n\t\t\tfontFamily: {\n\t\t\t\tdefaultValue: \"sans-serif\",\n\t\t\t\tlabel: \"フォント\",\n\t\t\t\tgroup: \"フォント\",\n\t\t\t\tComponent: Select,\n\t\t\t\tconfig: {\n\t\t\t\t\tplaceholder: \"フォントを選択\",\n\t\t\t\t\toptions: fontFamilyOptions,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\t// バリデーション (Propsの型チェックと初期化)\n\t\tvalidateProps: (props: unknown): TextProps => {\n\t\t\t// createInitialPropsを通すので、基本的にはキャストでOKですが、\n\t\t\t// 必要に応じて厳密なチェックを行います\n\t\t\treturn props as TextProps;\n\t\t},\n\n\t\t// 値のバリデーション\n\t\tvalidateValue: (value: unknown): TextValue | null => {\n\t\t\tif (typeof value === \"string\") return value;\n\t\t\tif (typeof value === \"number\") return String(value);\n\t\t\treturn null;\n\t\t},\n\t};\n}\n\nexport const TextPlugin: BlockPlugin<TextProps, TextValue> = createTextPlugin();\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","TextRenderer","forwardRef","onChange","onBlur","readOnly","ref","inputRef","useRef","textareaRef","containerRef","ghostRef","textareaPadding","setTextareaPadding","useState","textareaHeight","setTextareaHeight","useEffect","ghost","container","containerStyle","paddingTop","paddingBottom","paddingLeft","paddingRight","containerHeight","availableWidth","contentHeight","availableSpace","VerticalAlign","useImperativeHandle","_a","useMemo","css","HorizontalAlign","toPx","p","inputStyle","decorations","ghostStyle","handleChange","e","handleBlur","isEditable","textareaStyle","textareaProps","el","jsxs","jsx","singleLineStyle","commonInputProps","createTextPlugin","fontFamilyOptions","DEFAULT_FONT_FAMILY","universalProperties","placeholderDefinition","fontStyleDefinition","multilineDefinition","validationDefinition","Select","TextPlugin"],"mappings":";;;;;;;;yCAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAA,EACX,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EACjE,MAASF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,EAEX,CACA,OAAAG,EAAA,SAAmBP,EACnBO,EAAA,IAAcN,EACdM,EAAA,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,EAA6CC,sBACT,CACpC,MAAO,CACN,KAAM,OAEN,KAAM,CACL,YAAa,OACb,YAAa,iBACb,YAAa,CAAE,EAAG,EAAG,EAAG,CAAA,CAAE,EAG3B,SAAUpD,EAEV,WAAY,CACX,GAAGqD,EAAAA,oBACH,GAAGC,EAAAA,sBACH,GAAGC,EAAAA,oBACH,GAAGC,EAAAA,oBACH,GAAGC,EAAAA,qBAEH,WAAY,CACX,aAAc,aACd,MAAO,OACP,MAAO,OACP,UAAWC,EAAAA,OACX,OAAQ,CACP,YAAa,UACb,QAASP,CAAA,CACV,CACD,EAID,cAAgBpF,GAGRA,EAIR,cAAgBf,GACX,OAAOA,GAAU,SAAiBA,EAClC,OAAOA,GAAU,SAAiB,OAAOA,CAAK,EAC3C,IACR,CAEF,CAEO,MAAM2G,GAAgDT,GAAA","x_google_ignoreList":[0,1,2]}
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
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 = {};
1
+ import { VerticalAlign as L, HorizontalAlign as W, toPx as S, DEFAULT_FONT_FAMILY as le, Select as se, validationDefinition as ce, multilineDefinition as ue, fontStyleDefinition as fe, placeholderDefinition as de, universalProperties as me } from "@tatamicks/core";
2
+ import be, { forwardRef as ge, useRef as H, useState as te, useEffect as he, useImperativeHandle as xe, useMemo as X } from "react";
3
+ var M = { exports: {} }, N = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -10,29 +10,29 @@ var k = { exports: {} }, R = {};
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 W;
14
- function _e() {
15
- if (W) return R;
16
- W = 1;
13
+ var re;
14
+ function pe() {
15
+ if (re) return N;
16
+ re = 1;
17
17
  var t = Symbol.for("react.transitional.element"), l = Symbol.for("react.fragment");
18
- function b(c, s, u) {
18
+ function b(f, c, u) {
19
19
  var d = null;
20
- if (u !== void 0 && (d = "" + u), s.key !== void 0 && (d = "" + s.key), "key" in s) {
20
+ if (u !== void 0 && (d = "" + u), c.key !== void 0 && (d = "" + c.key), "key" in c) {
21
21
  u = {};
22
- for (var m in s)
23
- m !== "key" && (u[m] = s[m]);
24
- } else u = s;
25
- return s = u.ref, {
22
+ for (var g in c)
23
+ g !== "key" && (u[g] = c[g]);
24
+ } else u = c;
25
+ return c = u.ref, {
26
26
  $$typeof: t,
27
- type: c,
27
+ type: f,
28
28
  key: d,
29
- ref: s !== void 0 ? s : null,
29
+ ref: c !== void 0 ? c : null,
30
30
  props: u
31
31
  };
32
32
  }
33
- return R.Fragment = l, R.jsx = b, R.jsxs = b, R;
33
+ return N.Fragment = l, N.jsx = b, N.jsxs = b, N;
34
34
  }
35
- var v = {};
35
+ var C = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -42,47 +42,47 @@ var v = {};
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
44
  */
45
- var U;
46
- function Ee() {
47
- return U || (U = 1, process.env.NODE_ENV !== "production" && (function() {
45
+ var ne;
46
+ function Re() {
47
+ return ne || (ne = 1, process.env.NODE_ENV !== "production" && (function() {
48
48
  function t(e) {
49
49
  if (e == null) return null;
50
50
  if (typeof e == "function")
51
- return e.$$typeof === re ? null : e.displayName || e.name || null;
51
+ return e.$$typeof === q ? null : e.displayName || e.name || null;
52
52
  if (typeof e == "string") return e;
53
53
  switch (e) {
54
- case w:
54
+ case O:
55
55
  return "Fragment";
56
- case G:
56
+ case Y:
57
57
  return "Profiler";
58
- case H:
58
+ case $:
59
59
  return "StrictMode";
60
- case Q:
60
+ case r:
61
61
  return "Suspense";
62
- case K:
62
+ case s:
63
63
  return "SuspenseList";
64
- case te:
64
+ case m:
65
65
  return "Activity";
66
66
  }
67
67
  if (typeof e == "object")
68
68
  switch (typeof e.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
70
  ), e.$$typeof) {
71
- case J:
71
+ case _:
72
72
  return "Portal";
73
- case Z:
73
+ case U:
74
74
  return e.displayName || "Context";
75
- case X:
75
+ case v:
76
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;
77
+ case V:
78
+ var n = e.render;
79
+ return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
+ case x:
81
+ return n = e.displayName || null, n !== null ? n : t(e.type) || "Memo";
82
+ case p:
83
+ n = e._payload, e = e._init;
84
84
  try {
85
- return t(e(r));
85
+ return t(e(n));
86
86
  } catch {
87
87
  }
88
88
  }
@@ -94,50 +94,50 @@ function Ee() {
94
94
  function b(e) {
95
95
  try {
96
96
  l(e);
97
- var r = !1;
97
+ var n = !1;
98
98
  } catch {
99
- r = !0;
99
+ n = !0;
100
100
  }
101
- if (r) {
102
- r = console;
103
- var a = r.error, o = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
101
+ if (n) {
102
+ n = console;
103
+ var a = n.error, o = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
104
  return a.call(
105
- r,
105
+ n,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
107
  o
108
108
  ), l(e);
109
109
  }
110
110
  }
111
- function c(e) {
112
- if (e === w) return "<>";
113
- if (typeof e == "object" && e !== null && e.$$typeof === O)
111
+ function f(e) {
112
+ if (e === O) return "<>";
113
+ if (typeof e == "object" && e !== null && e.$$typeof === p)
114
114
  return "<...>";
115
115
  try {
116
- var r = t(e);
117
- return r ? "<" + r + ">" : "<...>";
116
+ var n = t(e);
117
+ return n ? "<" + n + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
- function s() {
123
- var e = P.A;
122
+ function c() {
123
+ var e = j.A;
124
124
  return e === null ? null : e.getOwner();
125
125
  }
126
126
  function u() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
129
  function d(e) {
130
- if (D.call(e, "key")) {
131
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
132
- if (r && r.isReactWarning) return !1;
130
+ if (T.call(e, "key")) {
131
+ var n = Object.getOwnPropertyDescriptor(e, "key").get;
132
+ if (n && n.isReactWarning) return !1;
133
133
  }
134
134
  return e.key !== void 0;
135
135
  }
136
- function m(e, r) {
136
+ function g(e, n) {
137
137
  function a() {
138
- I || (I = !0, console.error(
138
+ R || (R = !0, console.error(
139
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
140
+ n
141
141
  ));
142
142
  }
143
143
  a.isReactWarning = !0, Object.defineProperty(e, "key", {
@@ -145,23 +145,23 @@ function Ee() {
145
145
  configurable: !0
146
146
  });
147
147
  }
148
- function A() {
148
+ function F() {
149
149
  var e = t(this.type);
150
- return F[e] || (F[e] = !0, console.error(
150
+ return Z[e] || (Z[e] = !0, console.error(
151
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
152
  )), e = this.props.ref, e !== void 0 ? e : null;
153
153
  }
154
- function j(e, r, a, o, x, N) {
154
+ function D(e, n, a, o, z, B) {
155
155
  var i = a.ref;
156
156
  return e = {
157
- $$typeof: f,
157
+ $$typeof: P,
158
158
  type: e,
159
- key: r,
159
+ key: n,
160
160
  props: a,
161
161
  _owner: o
162
162
  }, (i !== void 0 ? i : null) !== null ? Object.defineProperty(e, "ref", {
163
163
  enumerable: !1,
164
- get: A
164
+ get: F
165
165
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
@@ -176,19 +176,19 @@ function Ee() {
176
176
  configurable: !1,
177
177
  enumerable: !1,
178
178
  writable: !0,
179
- value: x
179
+ value: z
180
180
  }), Object.defineProperty(e, "_debugTask", {
181
181
  configurable: !1,
182
182
  enumerable: !1,
183
183
  writable: !0,
184
- value: N
184
+ value: B
185
185
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
186
186
  }
187
- function T(e, r, a, o, x, N) {
188
- var i = r.children;
187
+ function w(e, n, a, o, z, B) {
188
+ var i = n.children;
189
189
  if (i !== void 0)
190
190
  if (o)
191
- if (ne(i)) {
191
+ if (J(i)) {
192
192
  for (o = 0; o < i.length; o++)
193
193
  h(i[o]);
194
194
  Object.freeze && Object.freeze(i);
@@ -197,12 +197,12 @@ function Ee() {
197
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
198
  );
199
199
  else h(i);
200
- if (D.call(r, "key")) {
200
+ if (T.call(n, "key")) {
201
201
  i = t(e);
202
- var _ = Object.keys(r).filter(function(ae) {
203
- return ae !== "key";
202
+ var k = Object.keys(n).filter(function(ie) {
203
+ return ie !== "key";
204
204
  });
205
- o = 0 < _.length ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}", z[i + o] || (_ = 0 < _.length ? "{" + _.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ o = 0 < k.length ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}", ee[i + o] || (k = 0 < k.length ? "{" + k.join(": ..., ") + ": ...}" : "{}", console.error(
206
206
  `A props object containing a "key" prop is being spread into JSX:
207
207
  let props = %s;
208
208
  <%s {...props} />
@@ -211,178 +211,252 @@ React keys must be passed directly to JSX without using spread:
211
211
  <%s key={someKey} {...props} />`,
212
212
  o,
213
213
  i,
214
- _,
214
+ k,
215
215
  i
216
- ), z[i + o] = !0);
216
+ ), ee[i + o] = !0);
217
217
  }
218
- if (i = null, a !== void 0 && (b(a), i = "" + a), d(r) && (b(r.key), i = "" + r.key), "key" in r) {
218
+ if (i = null, a !== void 0 && (b(a), i = "" + a), d(n) && (b(n.key), i = "" + n.key), "key" in n) {
219
219
  a = {};
220
- for (var C in r)
221
- C !== "key" && (a[C] = r[C]);
222
- } else a = r;
223
- return i && m(
220
+ for (var G in n)
221
+ G !== "key" && (a[G] = n[G]);
222
+ } else a = n;
223
+ return i && g(
224
224
  a,
225
225
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
226
- ), j(
226
+ ), D(
227
227
  e,
228
228
  i,
229
229
  a,
230
- s(),
231
- x,
232
- N
230
+ c(),
231
+ z,
232
+ B
233
233
  );
234
234
  }
235
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));
236
+ A(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === p && (e._payload.status === "fulfilled" ? A(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
237
237
  }
238
- function g(e) {
239
- return typeof e == "object" && e !== null && e.$$typeof === f;
238
+ function A(e) {
239
+ return typeof e == "object" && e !== null && e.$$typeof === P;
240
240
  }
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() {
241
+ var E = be, P = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), U = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), r = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), m = Symbol.for("react.activity"), q = Symbol.for("react.client.reference"), j = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, J = Array.isArray, y = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- n = {
244
+ E = {
245
245
  react_stack_bottom_frame: function(e) {
246
246
  return e();
247
247
  }
248
248
  };
249
- var I, F = {}, Y = n.react_stack_bottom_frame.bind(
250
- n,
249
+ var R, Z = {}, Q = E.react_stack_bottom_frame.bind(
250
+ E,
251
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(
252
+ )(), K = y(f(u)), ee = {};
253
+ C.Fragment = O, C.jsx = function(e, n, a) {
254
+ var o = 1e4 > j.recentlyCreatedOwnerStacks++;
255
+ return w(
256
256
  e,
257
- r,
257
+ n,
258
258
  a,
259
259
  !1,
260
- o ? Error("react-stack-top-frame") : Y,
261
- o ? p(c(e)) : $
260
+ o ? Error("react-stack-top-frame") : Q,
261
+ o ? y(f(e)) : K
262
262
  );
263
- }, v.jsxs = function(e, r, a) {
264
- var o = 1e4 > P.recentlyCreatedOwnerStacks++;
265
- return T(
263
+ }, C.jsxs = function(e, n, a) {
264
+ var o = 1e4 > j.recentlyCreatedOwnerStacks++;
265
+ return w(
266
266
  e,
267
- r,
267
+ n,
268
268
  a,
269
269
  !0,
270
- o ? Error("react-stack-top-frame") : Y,
271
- o ? p(c(e)) : $
270
+ o ? Error("react-stack-top-frame") : Q,
271
+ o ? y(f(e)) : K
272
272
  );
273
273
  };
274
- })()), v;
274
+ })()), C;
275
275
  }
276
- var V;
277
- function he() {
278
- return V || (V = 1, process.env.NODE_ENV === "production" ? k.exports = _e() : k.exports = Ee()), k.exports;
276
+ var ae;
277
+ function Ee() {
278
+ return ae || (ae = 1, process.env.NODE_ENV === "production" ? M.exports = pe() : M.exports = Re()), M.exports;
279
279
  }
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(
280
+ var I = Ee();
281
+ const oe = ge(({ props: t, value: l, onChange: b, onBlur: f, readOnly: c }, u) => {
282
+ const d = H(null), g = H(null), F = H(null), D = H(null), [w, h] = te({ top: 0, bottom: 0 }), [A, E] = te(null);
283
+ he(() => {
284
+ if (!t.multiline) return;
285
+ const r = D.current, s = F.current;
286
+ if (!r || !s) return;
287
+ r.value = l ?? "";
288
+ const x = window.getComputedStyle(s), p = Number.parseFloat(x.paddingTop), m = Number.parseFloat(x.paddingBottom), q = Number.parseFloat(x.paddingLeft), j = Number.parseFloat(x.paddingRight), T = s.clientHeight - p - m, J = s.clientWidth - q - j;
289
+ r.style.width = `${J}px`, r.style.paddingTop = "0px", r.style.paddingBottom = "0px";
290
+ const y = r.scrollHeight;
291
+ if (E(T), y < T) {
292
+ const R = T - y;
293
+ switch (t.alignItems) {
294
+ case L.top:
295
+ h({ top: 0, bottom: R });
296
+ break;
297
+ case L.bottom:
298
+ h({ top: R, bottom: 0 });
299
+ break;
300
+ default:
301
+ h({
302
+ top: R / 2,
303
+ bottom: R / 2
304
+ });
305
+ break;
306
+ }
307
+ } else
308
+ h({ top: 0, bottom: 0 });
309
+ }, [t, l]), xe(
284
310
  u,
285
311
  () => ({
286
312
  focus: () => {
287
- var n;
288
- (n = d.current) == null || n.focus();
313
+ var r;
314
+ (r = d.current) == null || r.focus();
289
315
  }
290
316
  }),
291
317
  []
292
318
  );
293
- const m = M(() => {
294
- const n = {
319
+ const P = X(() => {
320
+ const r = {
295
321
  width: "100%",
296
322
  height: "100%",
297
323
  display: "flex",
298
- // ★ Flexboxを使用
299
324
  boxSizing: "border-box",
300
325
  overflow: "hidden"
301
- // コンテンツが溢れないように
302
326
  };
303
327
  switch (t.justifyContent) {
304
- case y.center:
305
- n.justifyContent = "center";
328
+ case W.center:
329
+ r.justifyContent = "center";
306
330
  break;
307
- case y.right:
308
- n.justifyContent = "flex-end";
331
+ case W.right:
332
+ r.justifyContent = "flex-end";
309
333
  break;
310
334
  default:
311
- n.justifyContent = "flex-start";
335
+ r.justifyContent = "flex-start";
312
336
  break;
313
337
  }
314
338
  switch (t.alignItems) {
315
339
  case L.top:
316
- n.alignItems = "flex-start";
340
+ r.alignItems = "flex-start";
317
341
  break;
318
342
  case L.bottom:
319
- n.alignItems = "flex-end";
343
+ r.alignItems = "flex-end";
320
344
  break;
321
345
  default:
322
- n.alignItems = "center";
346
+ r.alignItems = "center";
323
347
  break;
324
348
  }
325
349
  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));
350
+ t.top && (r.paddingTop = S.fromDim(t.top)), t.right && (r.paddingRight = S.fromDim(t.right)), t.bottom && (r.paddingBottom = S.fromDim(t.bottom)), t.left && (r.paddingLeft = S.fromDim(t.left));
327
351
  else if (t.all) {
328
- const f = E.fromDim(t.all);
329
- n.padding = `${f}px`;
352
+ const s = S.fromDim(t.all);
353
+ r.padding = `${s}px`;
330
354
  }
331
- return n;
332
- }, [t]), A = M(() => {
333
- const n = {
355
+ return r;
356
+ }, [t]), _ = X(() => {
357
+ const r = {
334
358
  background: "transparent",
335
359
  border: "none",
336
360
  outline: "none",
337
361
  resize: "none",
338
362
  padding: 0,
339
- // Paddingはコンテナで管理するため0
340
363
  margin: 0,
341
364
  width: "100%",
342
- // Flexアイテムとして伸長
343
- height: "100%",
344
- // 必要に応じて調整(Textareaなら100%でも良い)
345
365
  boxSizing: "border-box",
346
366
  fontFamily: "inherit",
347
- // 親(設定)のフォントを継承させるか、個別指定するか
348
367
  color: "inherit"
349
368
  };
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";
369
+ t.fontSize && (r.fontSize = `${S.fromDim(t.fontSize)}px`), t.fontFamily && (r.fontFamily = t.fontFamily), t.color && (r.color = t.color), r.fontWeight = t.fontWeight ? "bold" : "normal", r.fontStyle = t.italic ? "italic" : "normal";
370
+ const s = [];
371
+ switch (t.underline && s.push("underline"), t.lineThrough && s.push("line-through"), r.textDecoration = s.length > 0 ? s.join(" ") : "none", t.lineHeight && (r.lineHeight = t.lineHeight), t.justifyContent) {
372
+ case W.center:
373
+ r.textAlign = "center";
355
374
  break;
356
- case y.right:
357
- n.textAlign = "right";
375
+ case W.right:
376
+ r.textAlign = "right";
358
377
  break;
359
378
  default:
360
- n.textAlign = "left";
379
+ r.textAlign = "left";
361
380
  break;
362
381
  }
363
- return n;
364
- }, [t]), j = (n) => {
365
- b(n.target.value);
366
- }, T = () => {
367
- c == null || c(l);
368
- }, h = !s, g = {
382
+ return r;
383
+ }, [t]), O = X(() => ({
384
+ ..._,
385
+ position: "absolute",
386
+ top: 0,
387
+ left: 0,
388
+ width: "100%",
389
+ height: "auto",
390
+ visibility: "hidden",
391
+ pointerEvents: "none",
392
+ overflow: "hidden",
393
+ whiteSpace: "pre-wrap",
394
+ wordWrap: "break-word",
395
+ overflowWrap: "break-word",
396
+ padding: 0,
397
+ border: "none",
398
+ boxSizing: "border-box",
399
+ resize: "none"
400
+ }), [_]), $ = (r) => {
401
+ b(r.target.value);
402
+ }, Y = () => {
403
+ f == null || f(l);
404
+ }, v = !c;
405
+ if (t.multiline) {
406
+ const r = {
407
+ ..._,
408
+ resize: "none",
409
+ overflow: "auto",
410
+ height: A !== null ? `${A}px` : "100%",
411
+ paddingTop: `${w.top}px`,
412
+ paddingBottom: `${w.bottom}px`
413
+ }, p = {
414
+ ref: (m) => {
415
+ g.current = m, d.current = m;
416
+ },
417
+ value: l ?? "",
418
+ onChange: (m) => {
419
+ $(m);
420
+ },
421
+ onBlur: Y,
422
+ style: r,
423
+ placeholder: t.placeholder,
424
+ readOnly: !v,
425
+ tabIndex: v ? 0 : -1
426
+ };
427
+ return /* @__PURE__ */ I.jsxs("div", { ref: F, style: P, children: [
428
+ /* @__PURE__ */ I.jsx(
429
+ "textarea",
430
+ {
431
+ ref: D,
432
+ style: O,
433
+ "aria-hidden": "true",
434
+ readOnly: !0,
435
+ tabIndex: -1,
436
+ rows: 1,
437
+ value: l ?? ""
438
+ }
439
+ ),
440
+ /* @__PURE__ */ I.jsx("textarea", { ...p })
441
+ ] });
442
+ }
443
+ const U = {
444
+ ..._,
445
+ height: "100%"
446
+ }, V = {
369
447
  ref: d,
370
448
  value: l ?? "",
371
- onChange: j,
372
- onBlur: T,
373
- style: A,
449
+ onChange: $,
450
+ onBlur: Y,
451
+ style: U,
374
452
  placeholder: t.placeholder,
375
- readOnly: !h,
376
- tabIndex: h ? 0 : -1
453
+ readOnly: !v,
454
+ tabIndex: v ? 0 : -1
377
455
  };
378
- return t.multiline ? (g.style = {
379
- ...g.style,
380
- height: "100%",
381
- flex: 1
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 }) });
456
+ return /* @__PURE__ */ I.jsx("div", { style: P, children: /* @__PURE__ */ I.jsx("input", { type: "text", ...V }) });
383
457
  });
384
- q.displayName = "TextRenderer";
385
- function Re(t = oe) {
458
+ oe.displayName = "TextRenderer";
459
+ function _e(t = le) {
386
460
  return {
387
461
  kind: "text",
388
462
  meta: {
@@ -391,18 +465,18 @@ function Re(t = oe) {
391
465
  defaultSize: { w: 4, h: 2 }
392
466
  // デフォルトサイズ
393
467
  },
394
- Renderer: q,
468
+ Renderer: oe,
395
469
  properties: {
470
+ ...me,
471
+ ...de,
396
472
  ...fe,
397
- ...ce,
398
473
  ...ue,
399
- ...se,
400
- ...le,
474
+ ...ce,
401
475
  fontFamily: {
402
476
  defaultValue: "sans-serif",
403
477
  label: "フォント",
404
478
  group: "フォント",
405
- Component: ie,
479
+ Component: se,
406
480
  config: {
407
481
  placeholder: "フォントを選択",
408
482
  options: t
@@ -415,10 +489,10 @@ function Re(t = oe) {
415
489
  validateValue: (l) => typeof l == "string" ? l : typeof l == "number" ? String(l) : null
416
490
  };
417
491
  }
418
- const xe = Re();
492
+ const ye = _e();
419
493
  export {
420
- xe as TextPlugin,
421
- q as TextRenderer,
422
- Re as createTextPlugin
494
+ ye as TextPlugin,
495
+ oe as TextRenderer,
496
+ _e as createTextPlugin
423
497
  };
424
498
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/jsx-runtime.js","../src/TextRenderer.tsx","../src/TextPlugin.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"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.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import {\n\ttype CSSProperties,\n\tforwardRef,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n} from \"react\";\nimport {\n\ttype BlockRef,\n\tHorizontalAlign,\n\ttype RendererProps,\n\ttoPx,\n\tVerticalAlign,\n} from \"@tatamicks/core\";\n\nimport type { TextProps, TextValue } from \"./types\";\n\nexport const TextRenderer = forwardRef<\n\tBlockRef,\n\tRendererProps<TextProps, TextValue>\n>(({ props, value, onChange, onBlur, readOnly }, ref) => {\n\t// 入力要素への参照\n\tconst inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n\n\t// 外部に focus メソッドを公開\n\tuseImperativeHandle(\n\t\tref,\n\t\t() => ({\n\t\t\tfocus: () => {\n\t\t\t\tinputRef.current?.focus();\n\t\t\t},\n\t\t}),\n\t\t[],\n\t);\n\n\t// --- コンテナ(Flexbox)のスタイル計算 ---\n\tconst containerStyle = useMemo((): CSSProperties => {\n\t\tconst css: CSSProperties = {\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\tdisplay: \"flex\", // ★ Flexboxを使用\n\t\t\tboxSizing: \"border-box\",\n\t\t\toverflow: \"hidden\", // コンテンツが溢れないように\n\t\t};\n\n\t\t// 1. 配置 (Flexboxで制御)\n\t\t// 水平方向 (justifyContent)\n\t\tswitch (props.justifyContent) {\n\t\t\tcase HorizontalAlign.center:\n\t\t\t\tcss.justifyContent = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase HorizontalAlign.right:\n\t\t\t\tcss.justifyContent = \"flex-end\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.justifyContent = \"flex-start\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// 垂直方向 (alignItems)\n\t\tswitch (props.alignItems) {\n\t\t\tcase VerticalAlign.top:\n\t\t\t\tcss.alignItems = \"flex-start\";\n\t\t\t\tbreak;\n\t\t\tcase VerticalAlign.bottom:\n\t\t\t\tcss.alignItems = \"flex-end\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.alignItems = \"center\";\n\t\t\t\tbreak; // デフォルトは中央\n\t\t}\n\n\t\t// 2. 余白 (Padding) - コンテナ側に適用\n\t\tif (props.isIndividual) {\n\t\t\tif (props.top) css.paddingTop = toPx.fromDim(props.top);\n\t\t\tif (props.right) css.paddingRight = toPx.fromDim(props.right);\n\t\t\tif (props.bottom) css.paddingBottom = toPx.fromDim(props.bottom);\n\t\t\tif (props.left) css.paddingLeft = toPx.fromDim(props.left);\n\t\t} else if (props.all) {\n\t\t\tconst p = toPx.fromDim(props.all);\n\t\t\tcss.padding = `${p}px`;\n\t\t}\n\n\t\treturn css;\n\t}, [props]);\n\n\t// --- 入力要素(Input/Textarea)のスタイル計算 ---\n\tconst inputStyle = useMemo((): CSSProperties => {\n\t\tconst css: CSSProperties = {\n\t\t\tbackground: \"transparent\",\n\t\t\tborder: \"none\",\n\t\t\toutline: \"none\",\n\t\t\tresize: \"none\",\n\t\t\tpadding: 0, // Paddingはコンテナで管理するため0\n\t\t\tmargin: 0,\n\t\t\twidth: \"100%\", // Flexアイテムとして伸長\n\t\t\theight: \"100%\", // 必要に応じて調整(Textareaなら100%でも良い)\n\t\t\tboxSizing: \"border-box\",\n\t\t\tfontFamily: \"inherit\", // 親(設定)のフォントを継承させるか、個別指定するか\n\t\t\tcolor: \"inherit\",\n\t\t};\n\n\t\t// フォント関連\n\t\tif (props.fontSize) {\n\t\t\tcss.fontSize = `${toPx.fromDim(props.fontSize)}px`;\n\t\t}\n\n\t\tif (props.fontFamily) css.fontFamily = props.fontFamily;\n\t\tif (props.color) css.color = props.color;\n\n\t\tcss.fontWeight = props.fontWeight ? \"bold\" : \"normal\";\n\t\tcss.fontStyle = props.italic ? \"italic\" : \"normal\";\n\n\t\tconst decorations: string[] = [];\n\t\tif (props.underline) decorations.push(\"underline\");\n\t\tif (props.lineThrough) decorations.push(\"line-through\");\n\t\tcss.textDecoration =\n\t\t\tdecorations.length > 0 ? decorations.join(\" \") : \"none\";\n\n\t\tif (props.lineHeight) css.lineHeight = props.lineHeight;\n\n\t\t// テキストアライン(入力中のテキスト自体の行揃え)\n\t\t// FlexboxのjustifyContentとは別に、複数行テキストの中身の揃えを指定\n\t\tswitch (props.justifyContent) {\n\t\t\tcase HorizontalAlign.center:\n\t\t\t\tcss.textAlign = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase HorizontalAlign.right:\n\t\t\t\tcss.textAlign = \"right\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.textAlign = \"left\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn css;\n\t}, [props]);\n\n\t// --- イベントハンドラ ---\n\tconst handleChange = (\n\t\te: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n\t) => {\n\t\tonChange(e.target.value);\n\t};\n\n\tconst handleBlur = () => {\n\t\tonBlur?.(value);\n\t};\n\n\t// --- 編集モード判定 ---\n\t// FORMモードでも編集可能にする(initValue編集のため)\n\tconst isEditable = !readOnly;\n\n\tconst commonInputProps = {\n\t\tref: inputRef as React.RefObject<HTMLInputElement & HTMLTextAreaElement>,\n\t\tvalue: value ?? \"\",\n\t\tonChange: handleChange,\n\t\tonBlur: handleBlur,\n\t\tstyle: inputStyle,\n\t\tplaceholder: props.placeholder,\n\t\treadOnly: !isEditable,\n\t\ttabIndex: isEditable ? 0 : -1,\n\t};\n\n\t// Flexアイテムとして振る舞わせるためのスタイル調整\n\t// Textareaの場合は高さを親に合わせる、Inputの場合は中身なりにするなど\n\tif (props.multiline) {\n\t\tcommonInputProps.style = {\n\t\t\t...commonInputProps.style,\n\t\t\theight: \"100%\",\n\t\t\tflex: 1,\n\t\t};\n\t\treturn (\n\t\t\t<div style={containerStyle}>\n\t\t\t\t<textarea {...commonInputProps} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Inputの場合\n\treturn (\n\t\t<div style={containerStyle}>\n\t\t\t<input type=\"text\" {...commonInputProps} />\n\t\t</div>\n\t);\n});\n\nTextRenderer.displayName = \"TextRenderer\";\n","import {\n\ttype BlockPlugin,\n\tDEFAULT_FONT_FAMILY,\n\tfontStyleDefinition,\n\tmultilineDefinition,\n\tplaceholderDefinition,\n\tSelect,\n\ttype SelectOption,\n\tuniversalProperties,\n\tvalidationDefinition,\n} from \"@tatamicks/core\";\n\nimport { TextRenderer } from \"./TextRenderer\";\n\nimport type { TextProps, TextValue } from \"./types\";\n\nexport function createTextPlugin(\n\tfontFamilyOptions: readonly SelectOption[] = DEFAULT_FONT_FAMILY,\n): BlockPlugin<TextProps, TextValue> {\n\treturn {\n\t\tkind: \"text\",\n\n\t\tmeta: {\n\t\t\tdisplayName: \"テキスト\",\n\t\t\tdescription: \"リッチなテキスト編集ブロック\",\n\t\t\tdefaultSize: { w: 4, h: 2 }, // デフォルトサイズ\n\t\t},\n\n\t\tRenderer: TextRenderer,\n\n\t\tproperties: {\n\t\t\t...universalProperties,\n\t\t\t...placeholderDefinition,\n\t\t\t...fontStyleDefinition,\n\t\t\t...multilineDefinition,\n\t\t\t...validationDefinition,\n\n\t\t\tfontFamily: {\n\t\t\t\tdefaultValue: \"sans-serif\",\n\t\t\t\tlabel: \"フォント\",\n\t\t\t\tgroup: \"フォント\",\n\t\t\t\tComponent: Select,\n\t\t\t\tconfig: {\n\t\t\t\t\tplaceholder: \"フォントを選択\",\n\t\t\t\t\toptions: fontFamilyOptions,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\t// バリデーション (Propsの型チェックと初期化)\n\t\tvalidateProps: (props: unknown): TextProps => {\n\t\t\t// createInitialPropsを通すので、基本的にはキャストでOKですが、\n\t\t\t// 必要に応じて厳密なチェックを行います\n\t\t\treturn props as TextProps;\n\t\t},\n\n\t\t// 値のバリデーション\n\t\tvalidateValue: (value: unknown): TextValue | null => {\n\t\t\tif (typeof value === \"string\") return value;\n\t\t\tif (typeof value === \"number\") return String(value);\n\t\t\treturn null;\n\t\t},\n\t};\n}\n\nexport const TextPlugin: BlockPlugin<TextProps, TextValue> = createTextPlugin();\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","TextRenderer","forwardRef","onChange","onBlur","readOnly","ref","inputRef","useRef","useImperativeHandle","_a","containerStyle","useMemo","css","HorizontalAlign","VerticalAlign","toPx","p","inputStyle","decorations","handleChange","e","handleBlur","isEditable","commonInputProps","jsx","createTextPlugin","fontFamilyOptions","DEFAULT_FONT_FAMILY","universalProperties","placeholderDefinition","fontStyleDefinition","multilineDefinition","validationDefinition","Select","TextPlugin"],"mappings":";;;;;;;;;;;;;;;;AAWA,MAAIA,IAAqB,OAAO,IAAI,4BAA4B,GAC9DC,IAAsB,OAAO,IAAI,gBAAgB;AACnD,WAASC,EAAQC,GAAMC,GAAQC,GAAU;AACvC,QAAIC,IAAM;AAGV,QAFWD,MAAX,WAAwBC,IAAM,KAAKD,IACxBD,EAAO,QAAlB,WAA0BE,IAAM,KAAKF,EAAO,MACxC,SAASA,GAAQ;AACnB,MAAAC,IAAW,CAAA;AACX,eAASE,KAAYH;AACnB,QAAUG,MAAV,UAAuBF,EAASE,CAAQ,IAAIH,EAAOG,CAAQ;AAAA,IACjE,MAAS,CAAAF,IAAWD;AAClB,WAAAA,IAASC,EAAS,KACX;AAAA,MACL,UAAUL;AAAA,MACV,MAAMG;AAAA,MACN,KAAKG;AAAA,MACL,KAAgBF,MAAX,SAAoBA,IAAS;AAAA,MAClC,OAAOC;AAAA;EAEX;AACA,SAAAG,EAAA,WAAmBP,GACnBO,EAAA,MAAcN,GACdM,EAAA,OAAeN;;;;;;;;;;;;;;sBCtBE,QAAQ,IAAI,aAA7B,iBACG,WAAY;AACX,aAASO,EAAyBN,GAAM;AACtC,UAAYA,KAAR,KAAc,QAAO;AACzB,UAAmB,OAAOA,KAAt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C,YAAA,EAAU,GAAGa,GAAkB,EAAA,CACjC,KAMDC,gBAAAA,EAAAA,IAAC,OAAA,EAAI,OAAOd,GACX,UAAAc,gBAAAA,EAAAA,IAAC,WAAM,MAAK,QAAQ,GAAGD,EAAA,CAAkB,EAAA,CAC1C;AAEF,CAAC;AAEDvB,EAAa,cAAc;AC3KpB,SAASyB,GACfC,IAA6CC,IACT;AACpC,SAAO;AAAA,IACN,MAAM;AAAA,IAEN,MAAM;AAAA,MACL,aAAa;AAAA,MACb,aAAa;AAAA,MACb,aAAa,EAAE,GAAG,GAAG,GAAG,EAAA;AAAA;AAAA,IAAE;AAAA,IAG3B,UAAU3B;AAAA,IAEV,YAAY;AAAA,MACX,GAAG4B;AAAA,MACH,GAAGC;AAAA,MACH,GAAGC;AAAA,MACH,GAAGC;AAAA,MACH,GAAGC;AAAA,MAEH,YAAY;AAAA,QACX,cAAc;AAAA,QACd,OAAO;AAAA,QACP,OAAO;AAAA,QACP,WAAWC;AAAA,QACX,QAAQ;AAAA,UACP,aAAa;AAAA,UACb,SAASP;AAAA,QAAA;AAAA,MACV;AAAA,IACD;AAAA;AAAA,IAID,eAAe,CAAC3D,MAGRA;AAAA;AAAA,IAIR,eAAe,CAACf,MACX,OAAOA,KAAU,WAAiBA,IAClC,OAAOA,KAAU,WAAiB,OAAOA,CAAK,IAC3C;AAAA,EACR;AAEF;AAEO,MAAMkF,KAAgDT,GAAA;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index.mjs","sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/jsx-runtime.js","../src/TextRenderer.tsx","../src/TextPlugin.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"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.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import {\n\ttype CSSProperties,\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport {\n\ttype BlockRef,\n\tHorizontalAlign,\n\ttype RendererProps,\n\ttoPx,\n\tVerticalAlign,\n} from \"@tatamicks/core\";\n\nimport type { TextProps, TextValue } from \"./types\";\nimport \"./TextRenderer.module.css\";\n\nexport const TextRenderer = forwardRef<\n\tBlockRef,\n\tRendererProps<TextProps, TextValue>\n>(({ props, value, onChange, onBlur, readOnly }, ref) => {\n\t// 入力要素への参照\n\tconst inputRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n\tconst textareaRef = useRef<HTMLTextAreaElement>(null);\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst ghostRef = useRef<HTMLTextAreaElement>(null);\n\n\tconst [textareaPadding, setTextareaPadding] = useState({ top: 0, bottom: 0 });\n\tconst [textareaHeight, setTextareaHeight] = useState<number | null>(null);\n\n\tuseEffect(() => {\n\t\tif (!props.multiline) return;\n\n\t\tconst ghost = ghostRef.current;\n\t\tconst container = containerRef.current;\n\t\tif (!ghost || !container) return;\n\n\t\tghost.value = value ?? \"\";\n\n\t\tconst containerStyle = window.getComputedStyle(container);\n\t\tconst paddingTop = Number.parseFloat(containerStyle.paddingTop);\n\t\tconst paddingBottom = Number.parseFloat(containerStyle.paddingBottom);\n\t\tconst paddingLeft = Number.parseFloat(containerStyle.paddingLeft);\n\t\tconst paddingRight = Number.parseFloat(containerStyle.paddingRight);\n\n\t\tconst containerHeight = container.clientHeight - paddingTop - paddingBottom;\n\t\tconst availableWidth = container.clientWidth - paddingLeft - paddingRight;\n\n\t\tghost.style.width = `${availableWidth}px`;\n\t\tghost.style.paddingTop = \"0px\";\n\t\tghost.style.paddingBottom = \"0px\";\n\n\t\tconst contentHeight = ghost.scrollHeight;\n\n\t\tsetTextareaHeight(containerHeight);\n\n\t\tif (contentHeight < containerHeight) {\n\t\t\tconst availableSpace = containerHeight - contentHeight;\n\n\t\t\tswitch (props.alignItems) {\n\t\t\t\tcase VerticalAlign.top:\n\t\t\t\t\tsetTextareaPadding({ top: 0, bottom: availableSpace });\n\t\t\t\t\tbreak;\n\t\t\t\tcase VerticalAlign.bottom:\n\t\t\t\t\tsetTextareaPadding({ top: availableSpace, bottom: 0 });\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsetTextareaPadding({\n\t\t\t\t\t\ttop: availableSpace / 2,\n\t\t\t\t\t\tbottom: availableSpace / 2,\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tsetTextareaPadding({ top: 0, bottom: 0 });\n\t\t}\n\t}, [props, value]);\n\n\tuseImperativeHandle(\n\t\tref,\n\t\t() => ({\n\t\t\tfocus: () => {\n\t\t\t\tinputRef.current?.focus();\n\t\t\t},\n\t\t}),\n\t\t[],\n\t);\n\n\tconst containerStyle = useMemo((): CSSProperties => {\n\t\tconst css: CSSProperties = {\n\t\t\twidth: \"100%\",\n\t\t\theight: \"100%\",\n\t\t\tdisplay: \"flex\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\toverflow: \"hidden\",\n\t\t};\n\n\t\tswitch (props.justifyContent) {\n\t\t\tcase HorizontalAlign.center:\n\t\t\t\tcss.justifyContent = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase HorizontalAlign.right:\n\t\t\t\tcss.justifyContent = \"flex-end\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.justifyContent = \"flex-start\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\tswitch (props.alignItems) {\n\t\t\tcase VerticalAlign.top:\n\t\t\t\tcss.alignItems = \"flex-start\";\n\t\t\t\tbreak;\n\t\t\tcase VerticalAlign.bottom:\n\t\t\t\tcss.alignItems = \"flex-end\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.alignItems = \"center\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (props.isIndividual) {\n\t\t\tif (props.top) css.paddingTop = toPx.fromDim(props.top);\n\t\t\tif (props.right) css.paddingRight = toPx.fromDim(props.right);\n\t\t\tif (props.bottom) css.paddingBottom = toPx.fromDim(props.bottom);\n\t\t\tif (props.left) css.paddingLeft = toPx.fromDim(props.left);\n\t\t} else if (props.all) {\n\t\t\tconst p = toPx.fromDim(props.all);\n\t\t\tcss.padding = `${p}px`;\n\t\t}\n\n\t\treturn css;\n\t}, [props]);\n\n\tconst inputStyle = useMemo((): CSSProperties => {\n\t\tconst css: CSSProperties = {\n\t\t\tbackground: \"transparent\",\n\t\t\tborder: \"none\",\n\t\t\toutline: \"none\",\n\t\t\tresize: \"none\",\n\t\t\tpadding: 0,\n\t\t\tmargin: 0,\n\t\t\twidth: \"100%\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tfontFamily: \"inherit\",\n\t\t\tcolor: \"inherit\",\n\t\t};\n\n\t\tif (props.fontSize) {\n\t\t\tcss.fontSize = `${toPx.fromDim(props.fontSize)}px`;\n\t\t}\n\n\t\tif (props.fontFamily) css.fontFamily = props.fontFamily;\n\t\tif (props.color) css.color = props.color;\n\n\t\tcss.fontWeight = props.fontWeight ? \"bold\" : \"normal\";\n\t\tcss.fontStyle = props.italic ? \"italic\" : \"normal\";\n\n\t\tconst decorations: string[] = [];\n\t\tif (props.underline) decorations.push(\"underline\");\n\t\tif (props.lineThrough) decorations.push(\"line-through\");\n\t\tcss.textDecoration =\n\t\t\tdecorations.length > 0 ? decorations.join(\" \") : \"none\";\n\n\t\tif (props.lineHeight) css.lineHeight = props.lineHeight;\n\n\t\tswitch (props.justifyContent) {\n\t\t\tcase HorizontalAlign.center:\n\t\t\t\tcss.textAlign = \"center\";\n\t\t\t\tbreak;\n\t\t\tcase HorizontalAlign.right:\n\t\t\t\tcss.textAlign = \"right\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcss.textAlign = \"left\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn css;\n\t}, [props]);\n\n\tconst ghostStyle = useMemo((): CSSProperties => {\n\t\treturn {\n\t\t\t...inputStyle,\n\t\t\tposition: \"absolute\",\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: \"100%\",\n\t\t\theight: \"auto\",\n\t\t\tvisibility: \"hidden\",\n\t\t\tpointerEvents: \"none\",\n\t\t\toverflow: \"hidden\",\n\t\t\twhiteSpace: \"pre-wrap\",\n\t\t\twordWrap: \"break-word\",\n\t\t\toverflowWrap: \"break-word\",\n\t\t\tpadding: 0,\n\t\t\tborder: \"none\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tresize: \"none\",\n\t\t};\n\t}, [inputStyle]);\n\n\tconst handleChange = (\n\t\te: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,\n\t) => {\n\t\tonChange(e.target.value);\n\t};\n\n\tconst handleBlur = () => {\n\t\tonBlur?.(value);\n\t};\n\n\tconst isEditable = !readOnly;\n\n\tif (props.multiline) {\n\t\tconst textareaStyle: CSSProperties = {\n\t\t\t...inputStyle,\n\t\t\tresize: \"none\",\n\t\t\toverflow: \"auto\",\n\t\t\theight: textareaHeight !== null ? `${textareaHeight}px` : \"100%\",\n\t\t\tpaddingTop: `${textareaPadding.top}px`,\n\t\t\tpaddingBottom: `${textareaPadding.bottom}px`,\n\t\t};\n\n\t\tconst handleTextareaChange = (\n\t\t\te: React.ChangeEvent<HTMLTextAreaElement>,\n\t\t) => {\n\t\t\thandleChange(e);\n\t\t};\n\n\t\tconst setTextareaRefs = (el: HTMLTextAreaElement | null) => {\n\t\t\ttextareaRef.current = el;\n\t\t\tinputRef.current = el;\n\t\t};\n\n\t\tconst textareaProps = {\n\t\t\tref: setTextareaRefs,\n\t\t\tvalue: value ?? \"\",\n\t\t\tonChange: handleTextareaChange,\n\t\t\tonBlur: handleBlur,\n\t\t\tstyle: textareaStyle,\n\t\t\tplaceholder: props.placeholder,\n\t\t\treadOnly: !isEditable,\n\t\t\ttabIndex: isEditable ? 0 : -1,\n\t\t};\n\n\t\treturn (\n\t\t\t<div ref={containerRef} style={containerStyle}>\n\t\t\t\t<textarea\n\t\t\t\t\tref={ghostRef}\n\t\t\t\t\tstyle={ghostStyle}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\treadOnly\n\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\trows={1}\n\t\t\t\t\tvalue={value ?? \"\"}\n\t\t\t\t/>\n\t\t\t\t<textarea {...textareaProps} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst singleLineStyle: CSSProperties = {\n\t\t...inputStyle,\n\t\theight: \"100%\",\n\t};\n\n\tconst commonInputProps = {\n\t\tref: inputRef as React.RefObject<HTMLInputElement>,\n\t\tvalue: value ?? \"\",\n\t\tonChange: handleChange,\n\t\tonBlur: handleBlur,\n\t\tstyle: singleLineStyle,\n\t\tplaceholder: props.placeholder,\n\t\treadOnly: !isEditable,\n\t\ttabIndex: isEditable ? 0 : -1,\n\t};\n\n\treturn (\n\t\t<div style={containerStyle}>\n\t\t\t<input type=\"text\" {...commonInputProps} />\n\t\t</div>\n\t);\n});\n\nTextRenderer.displayName = \"TextRenderer\";\n","import {\n\ttype BlockPlugin,\n\tDEFAULT_FONT_FAMILY,\n\tfontStyleDefinition,\n\tmultilineDefinition,\n\tplaceholderDefinition,\n\tSelect,\n\ttype SelectOption,\n\tuniversalProperties,\n\tvalidationDefinition,\n} from \"@tatamicks/core\";\n\nimport { TextRenderer } from \"./TextRenderer\";\n\nimport type { TextProps, TextValue } from \"./types\";\n\nexport function createTextPlugin(\n\tfontFamilyOptions: readonly SelectOption[] = DEFAULT_FONT_FAMILY,\n): BlockPlugin<TextProps, TextValue> {\n\treturn {\n\t\tkind: \"text\",\n\n\t\tmeta: {\n\t\t\tdisplayName: \"テキスト\",\n\t\t\tdescription: \"リッチなテキスト編集ブロック\",\n\t\t\tdefaultSize: { w: 4, h: 2 }, // デフォルトサイズ\n\t\t},\n\n\t\tRenderer: TextRenderer,\n\n\t\tproperties: {\n\t\t\t...universalProperties,\n\t\t\t...placeholderDefinition,\n\t\t\t...fontStyleDefinition,\n\t\t\t...multilineDefinition,\n\t\t\t...validationDefinition,\n\n\t\t\tfontFamily: {\n\t\t\t\tdefaultValue: \"sans-serif\",\n\t\t\t\tlabel: \"フォント\",\n\t\t\t\tgroup: \"フォント\",\n\t\t\t\tComponent: Select,\n\t\t\t\tconfig: {\n\t\t\t\t\tplaceholder: \"フォントを選択\",\n\t\t\t\t\toptions: fontFamilyOptions,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\n\t\t// バリデーション (Propsの型チェックと初期化)\n\t\tvalidateProps: (props: unknown): TextProps => {\n\t\t\t// createInitialPropsを通すので、基本的にはキャストでOKですが、\n\t\t\t// 必要に応じて厳密なチェックを行います\n\t\t\treturn props as TextProps;\n\t\t},\n\n\t\t// 値のバリデーション\n\t\tvalidateValue: (value: unknown): TextValue | null => {\n\t\t\tif (typeof value === \"string\") return value;\n\t\t\tif (typeof value === \"number\") return String(value);\n\t\t\treturn null;\n\t\t},\n\t};\n}\n\nexport const TextPlugin: BlockPlugin<TextProps, TextValue> = createTextPlugin();\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","owner","debugStack","debugTask","refProp","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","isValidElement","object","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","TextRenderer","forwardRef","onChange","onBlur","readOnly","ref","inputRef","useRef","textareaRef","containerRef","ghostRef","textareaPadding","setTextareaPadding","useState","textareaHeight","setTextareaHeight","useEffect","ghost","container","containerStyle","paddingTop","paddingBottom","paddingLeft","paddingRight","containerHeight","availableWidth","contentHeight","availableSpace","VerticalAlign","useImperativeHandle","_a","useMemo","css","HorizontalAlign","toPx","p","inputStyle","decorations","ghostStyle","handleChange","e","handleBlur","isEditable","textareaStyle","textareaProps","el","jsxs","jsx","singleLineStyle","commonInputProps","createTextPlugin","fontFamilyOptions","DEFAULT_FONT_FAMILY","universalProperties","placeholderDefinition","fontStyleDefinition","multilineDefinition","validationDefinition","Select","TextPlugin"],"mappings":";;;;;;;;;;;;;;;;AAWA,MAAIA,IAAqB,O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cAAc;AAAA,QACd,OAAO;AAAA,QACP,OAAO;AAAA,QACP,WAAWC;AAAA,QACX,QAAQ;AAAA,UACP,aAAa;AAAA,UACb,SAASP;AAAA,QAAA;AAAA,MACV;AAAA,IACD;AAAA;AAAA,IAID,eAAe,CAACpF,MAGRA;AAAA;AAAA,IAIR,eAAe,CAACf,MACX,OAAOA,KAAU,WAAiBA,IAClC,OAAOA,KAAU,WAAiB,OAAOA,CAAK,IAC3C;AAAA,EACR;AAEF;AAEO,MAAM2G,KAAgDT,GAAA;","x_google_ignoreList":[0,1,2]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextRenderer.d.ts","sourceRoot":"","sources":["../../src/TextRenderer.tsx"],"names":[],"mappings":"AAOA,OAAO,EACN,KAAK,QAAQ,EAEb,KAAK,aAAa,EAGlB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,YAAY,uHAwKvB,CAAC"}
1
+ {"version":3,"file":"TextRenderer.d.ts","sourceRoot":"","sources":["../../src/TextRenderer.tsx"],"names":[],"mappings":"AASA,OAAO,EACN,KAAK,QAAQ,EAEb,KAAK,aAAa,EAGlB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,SAAS,CAAC;AACpD,OAAO,2BAA2B,CAAC;AAEnC,eAAO,MAAM,YAAY,uHA0QvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tatamicks/text",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "description": "Text plugin for @tatamicks/core",
6
6
  "keywords": [