@ostack.tech/kform-scaffolder 1.1.0 → 1.1.1
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.
|
@@ -1382,7 +1382,7 @@ function SchematicBuilder({ name = "kform", title = document.title, basePath, ba
|
|
|
1382
1382
|
/* @__PURE__ */ jsx(LoadSchematic, {}),
|
|
1383
1383
|
/* @__PURE__ */ jsx(SaveSchematic, {}),
|
|
1384
1384
|
/* @__PURE__ */ jsx(ScaffoldToZip, {})
|
|
1385
|
-
] }), configs = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(UseFileBase64SerializerConfig, {}), /* @__PURE__ */ jsx(UseTableValuesSerializerConfig, {})] }), version = "1.1.
|
|
1385
|
+
] }), configs = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(UseFileBase64SerializerConfig, {}), /* @__PURE__ */ jsx(UseTableValuesSerializerConfig, {})] }), version = "1.1.1" }) {
|
|
1386
1386
|
const [useSchematic] = useState(() => create(persist(() => createSchematic({
|
|
1387
1387
|
kind: classSchematicKind.kind,
|
|
1388
1388
|
packageSuffix: defaultRootClassPackage,
|
package/package.json
CHANGED
|
@@ -170,4 +170,4 @@ suspend fun assert<%= formClass %>NotContainsWarning(
|
|
|
170
170
|
LocatedValidationWarning(path, code),
|
|
171
171
|
validate<%= formClass %>(<%= formVar %>, path, externalContexts),
|
|
172
172
|
)
|
|
173
|
-
`;function ya(e,t){ga(t,`${e.name}Validator.kt`,va,{filePackage:t.currentPackage,formVar:Jr(e.name),formClass:e.name})}var ba=typeof document<`u`?C.useLayoutEffect:C.useEffect;function xa(e,t){ba(()=>{if(!e){t(void 0);return}let n=()=>t(e.getBoundingClientRect());n();let r=new ResizeObserver(([e])=>e&&n());return r.observe(e),window.addEventListener(`resize`,n),()=>{r.disconnect(),window.removeEventListener(`resize`,n),t(void 0)}},[e,t])}function Sa({children:e}){let[t,n]=(0,C.useState)(null),[r,i]=(0,C.useState)(null);return xa(t,e=>{r&&e&&(r.style.setProperty(`--anchor-top`,`${e.top}px`),r.style.setProperty(`--anchor-left`,`${e.left}px`),r.style.setProperty(`--anchor-bottom`,`${e.bottom}px`),r.style.setProperty(`--anchor-right`,`${e.right}px`),r.style.setProperty(`--anchor-width`,`${e.width}px`),r.style.setProperty(`--anchor-height`,`${e.height}px`))}),xa(r,e=>{r&&e&&(r.style.setProperty(`--width`,`${e.width}px`),r.style.setProperty(`--height`,`${e.height}px`))}),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`builder-icon-button builder-action builder-config-schematic`,popoverTarget:`builder-config-popover`,title:`Config`,"aria-label":`Config`,ref:n,children:`⚙️`}),(0,W.jsx)(`div`,{popover:``,id:`builder-config-popover`,ref:i,children:e})]})}var Ca={currentDir:`shared/src/commonMain/kotlin`},wa={currentDir:`shared/src/commonTest/kotlin`};function Ta({name:e=`kform`,title:t=document.title,basePath:n,basePackage:r,baseDir:i,defaultRootClassPackage:a=`org.example`,defaultRootClassName:o=`MyForm`,schematicKinds:s=Vi,scaffolders:c=[hr(Hi,Ca),hr(Fr,Ca),hr(_a,Ca),hr(ya,wa)],scaffoldingData:l=e=>e.config,actions:u=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fr,{}),(0,W.jsx)(pr,{}),(0,W.jsx)(xr,{})]}),configs:d=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Cr,{}),(0,W.jsx)(wr,{})]}),version:f=`1.1.
|
|
173
|
+
`;function ya(e,t){ga(t,`${e.name}Validator.kt`,va,{filePackage:t.currentPackage,formVar:Jr(e.name),formClass:e.name})}var ba=typeof document<`u`?C.useLayoutEffect:C.useEffect;function xa(e,t){ba(()=>{if(!e){t(void 0);return}let n=()=>t(e.getBoundingClientRect());n();let r=new ResizeObserver(([e])=>e&&n());return r.observe(e),window.addEventListener(`resize`,n),()=>{r.disconnect(),window.removeEventListener(`resize`,n),t(void 0)}},[e,t])}function Sa({children:e}){let[t,n]=(0,C.useState)(null),[r,i]=(0,C.useState)(null);return xa(t,e=>{r&&e&&(r.style.setProperty(`--anchor-top`,`${e.top}px`),r.style.setProperty(`--anchor-left`,`${e.left}px`),r.style.setProperty(`--anchor-bottom`,`${e.bottom}px`),r.style.setProperty(`--anchor-right`,`${e.right}px`),r.style.setProperty(`--anchor-width`,`${e.width}px`),r.style.setProperty(`--anchor-height`,`${e.height}px`))}),xa(r,e=>{r&&e&&(r.style.setProperty(`--width`,`${e.width}px`),r.style.setProperty(`--height`,`${e.height}px`))}),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`builder-icon-button builder-action builder-config-schematic`,popoverTarget:`builder-config-popover`,title:`Config`,"aria-label":`Config`,ref:n,children:`⚙️`}),(0,W.jsx)(`div`,{popover:``,id:`builder-config-popover`,ref:i,children:e})]})}var Ca={currentDir:`shared/src/commonMain/kotlin`},wa={currentDir:`shared/src/commonTest/kotlin`};function Ta({name:e=`kform`,title:t=document.title,basePath:n,basePackage:r,baseDir:i,defaultRootClassPackage:a=`org.example`,defaultRootClassName:o=`MyForm`,schematicKinds:s=Vi,scaffolders:c=[hr(Hi,Ca),hr(Fr,Ca),hr(_a,Ca),hr(ya,wa)],scaffoldingData:l=e=>e.config,actions:u=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(fr,{}),(0,W.jsx)(pr,{}),(0,W.jsx)(xr,{})]}),configs:d=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Cr,{}),(0,W.jsx)(wr,{})]}),version:f=`1.1.1`}){let[p]=(0,C.useState)(()=>Gn(Jn(()=>ti({kind:Bi.kind,packageSuffix:a,name:o,children:[]}),{name:e}))),m=(0,C.useMemo)(()=>new Map(s.sort((e,t)=>e.kind.localeCompare(t.kind)).map(e=>[e.kind,e])),[s]),h=(0,C.useRef)(null),[g,_]=(0,C.useState)(null),v=xe(be(xt,{activationConstraint:{distance:10,delay:400,tolerance:20}}),be(gt));return(0,W.jsx)(lr,{value:{name:e,basePath:n,basePackage:r,baseDir:i,schematicKinds:m,scaffolders:c,scaffoldingData:l,getRootSchematic:p.getState,useSchematic:p,setSchematic:p.setState,removeSchematic:()=>{},parentPackage:r,draggedSchematic:g,latestSchematicFileHandleRef:h},children:(0,W.jsxs)(yn,{sensors:v,collisionDetection:ke,onDragStart:e=>_({id:e.active.id,...e.active.data.current}),onDragEnd:e=>{let{parentId:t,sortBefore:n,ignored:r}=e.over?.data.current??{};r||p.setState(r=>ni(r,e.active.id,t,n)),_(null)},children:[(0,W.jsxs)(`form`,{className:`builder-root`,children:[(0,W.jsxs)(`header`,{className:`builder-header`,children:[(0,W.jsx)(`h1`,{className:`builder-title`,children:t}),f&&(0,W.jsx)(`div`,{className:`builder-version`,children:f}),(0,W.jsxs)(`div`,{className:`builder-actions`,children:[d&&(0,W.jsx)(Sa,{children:d}),u]})]}),(0,W.jsx)(gi,{})]}),(0,W.jsx)(zn,{children:g&&(0,W.jsx)(`div`,{className:`builder-dragged`,children:g.node})})]})})}(0,S.createRoot)(document.getElementById(`root`)).render((0,W.jsx)(C.StrictMode,{children:(0,W.jsx)(Ta,{})}));
|
package/webapp/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<meta name="color-scheme" content="light dark" />
|
|
8
8
|
<title>Form Scaffolder—ostack/KForm</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-1og7sA79.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-BKUWl2po.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|