@spaceandtimelabs/makeinfinite-ui 0.47.0 → 0.47.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.
|
@@ -19126,13 +19126,6 @@ const cC = /* @__PURE__ */ Kn(Zg), W6 = Zg.WidthProvider(cC), G6 = Fo.div`
|
|
|
19126
19126
|
align-items: center;
|
|
19127
19127
|
}
|
|
19128
19128
|
|
|
19129
|
-
.grid-item {
|
|
19130
|
-
width: 100%;
|
|
19131
|
-
height: 100%;
|
|
19132
|
-
position: relative;
|
|
19133
|
-
overflow: hidden;
|
|
19134
|
-
}
|
|
19135
|
-
|
|
19136
19129
|
.selected {
|
|
19137
19130
|
border: 2px solid #cc0aac;
|
|
19138
19131
|
border-radius: 5px;
|
|
@@ -19158,26 +19151,16 @@ const cC = /* @__PURE__ */ Kn(Zg), W6 = Zg.WidthProvider(cC), G6 = Fo.div`
|
|
|
19158
19151
|
preventCollision: !0,
|
|
19159
19152
|
margin: [0, 0],
|
|
19160
19153
|
layout: e.layout,
|
|
19161
|
-
children: e.components.map((t) => /* @__PURE__ */ g.jsx("div", {
|
|
19154
|
+
children: e.components.map((t) => /* @__PURE__ */ g.jsx("div", { children: t.component }, t.id))
|
|
19162
19155
|
}
|
|
19163
19156
|
) }) }), Y6 = Fo.div`
|
|
19164
19157
|
.mi-container {
|
|
19165
19158
|
display: flex;
|
|
19166
19159
|
flex-direction: row;
|
|
19167
|
-
|
|
19168
|
-
height: 100vh;
|
|
19169
19160
|
}
|
|
19170
19161
|
|
|
19171
19162
|
.mi-workspace {
|
|
19172
|
-
flex
|
|
19173
|
-
flex-grow: 3;
|
|
19174
|
-
overflow: auto;
|
|
19175
|
-
}
|
|
19176
|
-
|
|
19177
|
-
.mi-toolspace {
|
|
19178
|
-
flex-basis: 0;
|
|
19179
|
-
flex-grow: 1;
|
|
19180
|
-
overflow: auto;
|
|
19163
|
+
flex: 1;
|
|
19181
19164
|
}
|
|
19182
19165
|
`, Ioe = () => {
|
|
19183
19166
|
const [e, t] = Fe([]), [n, r] = Fe([]), [o, i] = Fe(!1), { projectMetadata: a } = b1(), { siteBackground: s, setSiteBackground: l } = Pm(), { siteBackgroundColor: c, siteBackgroundImage: u } = Pm(), d = async () => {
|
|
@@ -19207,7 +19190,7 @@ const cC = /* @__PURE__ */ Kn(Zg), W6 = Zg.WidthProvider(cC), G6 = Fo.div`
|
|
|
19207
19190
|
!a.projectName && !a.projectURL || d();
|
|
19208
19191
|
}, [a.projectName, a.projectURL]), /* @__PURE__ */ g.jsx("div", { children: /* @__PURE__ */ g.jsxs(Y6, { children: [
|
|
19209
19192
|
/* @__PURE__ */ g.jsx(c8, { isVisible: o }),
|
|
19210
|
-
/* @__PURE__ */ g.jsx("div", { className: "mi-container", children: /* @__PURE__ */ g.jsx("div", { className: "mi-workspace",
|
|
19193
|
+
/* @__PURE__ */ g.jsx("div", { className: "mi-container", style: { ...h }, children: /* @__PURE__ */ g.jsx("div", { className: "mi-workspace", children: /* @__PURE__ */ g.jsx(q6, { components: e, layout: n }) }) })
|
|
19211
19194
|
] }) });
|
|
19212
19195
|
}, Ooe = z.forwardRef(
|
|
19213
19196
|
({
|
|
@@ -155,13 +155,6 @@ object-assign
|
|
|
155
155
|
align-items: center;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.grid-item {
|
|
159
|
-
width: 100%;
|
|
160
|
-
height: 100%;
|
|
161
|
-
position: relative;
|
|
162
|
-
overflow: hidden;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
158
|
.selected {
|
|
166
159
|
border: 2px solid #cc0aac;
|
|
167
160
|
border-radius: 5px;
|
|
@@ -175,26 +168,16 @@ object-assign
|
|
|
175
168
|
.react-grid-drag-handle {
|
|
176
169
|
cursor: move;
|
|
177
170
|
}
|
|
178
|
-
`,xS=e=>g.jsx(g.Fragment,{children:g.jsx(zH,{children:g.jsx(LH,{className:"layout",rowHeight:50,cols:12,compactType:null,isResizable:!1,isDraggable:!1,preventCollision:!0,margin:[0,0],layout:e.layout,children:e.components.map(t=>g.jsx("div",{
|
|
171
|
+
`,xS=e=>g.jsx(g.Fragment,{children:g.jsx(zH,{children:g.jsx(LH,{className:"layout",rowHeight:50,cols:12,compactType:null,isResizable:!1,isDraggable:!1,preventCollision:!0,margin:[0,0],layout:e.layout,children:e.components.map(t=>g.jsx("div",{children:t.component},t.id))})})}),BH=So.div`
|
|
179
172
|
.mi-container {
|
|
180
173
|
display: flex;
|
|
181
174
|
flex-direction: row;
|
|
182
|
-
|
|
183
|
-
height: 100vh;
|
|
184
175
|
}
|
|
185
176
|
|
|
186
177
|
.mi-workspace {
|
|
187
|
-
flex
|
|
188
|
-
flex-grow: 3;
|
|
189
|
-
overflow: auto;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.mi-toolspace {
|
|
193
|
-
flex-basis: 0;
|
|
194
|
-
flex-grow: 1;
|
|
195
|
-
overflow: auto;
|
|
178
|
+
flex: 1;
|
|
196
179
|
}
|
|
197
|
-
`,HH=()=>{const[e,t]=E.useState([]),[n,r]=E.useState([]),[o,i]=E.useState(!1),{projectMetadata:a}=fp(),{siteBackground:s,setSiteBackground:l}=Pw(),{siteBackgroundColor:c,siteBackgroundImage:u}=Pw(),d=async()=>{i(!0),await Ux(a.projectName,a.projectURL),i(!1),await qh(a.projectName,a.projectURL),await U4(a.projectName);const p=await Lx(a.projectName);t(p.components),r(p.layout);const m=`${window.miDir}/${a.projectName}/src/theme.json`,v=await window.pfs.readFile(m,"utf8"),w=JSON.parse(v),b=w.tailwind,x=w.siteBackground;window.tailwind.config=b,zx(b),l(x)},f=Bx(a.projectName,u),h=E.useMemo(()=>u?{backgroundImage:u?`url(${f})`:"",backgroundSize:"cover",backgroundRepeat:"no-repeat"}:c?{background:c||""}:{},[s,u,c,f]);return E.useEffect(()=>{!a.projectName&&!a.projectURL||d()},[a.projectName,a.projectURL]),g.jsx("div",{children:g.jsxs(BH,{children:[g.jsx(u8,{isVisible:o}),g.jsx("div",{className:"mi-container",children:g.jsx("div",{className:"mi-workspace",
|
|
180
|
+
`,HH=()=>{const[e,t]=E.useState([]),[n,r]=E.useState([]),[o,i]=E.useState(!1),{projectMetadata:a}=fp(),{siteBackground:s,setSiteBackground:l}=Pw(),{siteBackgroundColor:c,siteBackgroundImage:u}=Pw(),d=async()=>{i(!0),await Ux(a.projectName,a.projectURL),i(!1),await qh(a.projectName,a.projectURL),await U4(a.projectName);const p=await Lx(a.projectName);t(p.components),r(p.layout);const m=`${window.miDir}/${a.projectName}/src/theme.json`,v=await window.pfs.readFile(m,"utf8"),w=JSON.parse(v),b=w.tailwind,x=w.siteBackground;window.tailwind.config=b,zx(b),l(x)},f=Bx(a.projectName,u),h=E.useMemo(()=>u?{backgroundImage:u?`url(${f})`:"",backgroundSize:"cover",backgroundRepeat:"no-repeat"}:c?{background:c||""}:{},[s,u,c,f]);return E.useEffect(()=>{!a.projectName&&!a.projectURL||d()},[a.projectName,a.projectURL]),g.jsx("div",{children:g.jsxs(BH,{children:[g.jsx(u8,{isVisible:o}),g.jsx("div",{className:"mi-container",style:{...h},children:g.jsx("div",{className:"mi-workspace",children:g.jsx(xS,{components:e,layout:n})})})]})})},VH=E.forwardRef(({style:e,className:t,onMouseDown:n,onMouseUp:r,onTouchEnd:o,children:i,componentId:a},s)=>{const{selectedComponentId:l}=fp(),c=E.useMemo(()=>l===a,[l]),u=E.Children.toArray(i),d=u.filter(h=>h.key===".$resizableHandle-se"),f=u.filter(h=>h.key!==".$resizableHandle-se");return g.jsxs("div",{style:{...e},className:t+(c?" selected":""),ref:s,onMouseDown:n,onMouseUp:r,onTouchEnd:o,children:[g.jsx("div",{className:"grid-item "+(c?"selected":""),children:f}),d]})});class UH extends E.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}render(){const{hasError:t,error:n}=this.state,{children:r,fallback:o,fallbackProps:i}=this.props;return t&&(this.resetState(),o)?g.jsx(o,{error:n,...i}):r}resetState(){this.state={hasError:!1,error:null}}}const WH=e=>g.jsx(g.Fragment,{children:g.jsx("div",{className:"droppable-element",draggable:!0,unselectable:"on",onDragStart:t=>{t.dataTransfer.setData("text/plain",""),t.dataTransfer.setData("application/reactgridlayout",JSON.stringify({id:e.id,type:e.type,initialSize:e.initialSize,metadata:e.metadata}))},children:e.node})}),GH=em.WidthProvider(bS),qH=So.div`
|
|
198
181
|
.react-grid-layout {
|
|
199
182
|
position: relative;
|
|
200
183
|
// transition: height 200ms ease;
|