@spaceandtimelabs/makeinfinite-ui 0.29.1 → 0.30.0

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.d.ts CHANGED
@@ -98,6 +98,8 @@ export declare const RGPreviewLayout: (props: {
98
98
  layout: any;
99
99
  }) => JSX_2.Element;
100
100
 
101
+ export declare const setTailwindTheme: (theme: object) => void;
102
+
101
103
  export declare const syncAndRetry: (projectName: string, projectRepository: string) => Promise<void>;
102
104
 
103
105
  export declare const useAPI: () => APIContextType;
@@ -14526,7 +14526,12 @@ const G_ = (e) => {
14526
14526
  throw new Error(`Project "${e}" not found`);
14527
14527
  const a = `${window.miDir}/${i}/src/assets/images/${t}`, o = await window.pfs.readFile(a), s = Buffer.from(o).toString("base64"), l = ((u = t.split(".").pop()) == null ? void 0 : u.toLowerCase()) || "";
14528
14528
  return `data:${r[l] ?? "image/jpeg"};base64,${s}`;
14529
- }, nE = (e, t) => {
14529
+ }, nE = (e) => {
14530
+ if (window.tailwind)
14531
+ window.tailwind.config = e;
14532
+ else
14533
+ throw new Error("Could not load tailwind theme: missing tailwind global.");
14534
+ }, iE = (e, t) => {
14530
14535
  const [r, n] = Ne.useState("");
14531
14536
  return Ne.useEffect(() => {
14532
14537
  (async () => {
@@ -18412,7 +18417,6 @@ const dh = /* @__PURE__ */ Ot(dc), $x = dc.WidthProvider(dh), Tx = yr.div`
18412
18417
 
18413
18418
  justify-content: center;
18414
18419
  align-items: center;
18415
-
18416
18420
  }
18417
18421
 
18418
18422
  .grid-item {
@@ -18468,7 +18472,7 @@ const dh = /* @__PURE__ */ Ot(dc), $x = dc.WidthProvider(dh), Tx = yr.div`
18468
18472
  flex-grow: 1;
18469
18473
  overflow: auto;
18470
18474
  }
18471
- `, oE = () => {
18475
+ `, sE = () => {
18472
18476
  const [e, t] = ht([]), [r, n] = ht([]), [i, a] = ht(!1), { projectMetadata: o } = Ed(), s = async () => {
18473
18477
  a(!0), await Ob(o.projectName, o.projectURL), a(!1), await Cb(o.projectName, o.projectURL), await Eb(o.projectName);
18474
18478
  const l = await Z_(
@@ -18482,7 +18486,7 @@ const dh = /* @__PURE__ */ Ot(dc), $x = dc.WidthProvider(dh), Tx = yr.div`
18482
18486
  /* @__PURE__ */ ge.jsx(_d, { isVisible: i }),
18483
18487
  /* @__PURE__ */ ge.jsx("div", { className: "mi-container", children: /* @__PURE__ */ ge.jsx("div", { className: "mi-workspace", style: { backgroundColor: "#6f4d80" }, children: /* @__PURE__ */ ge.jsx(Ax, { components: e, layout: r }) }) })
18484
18488
  ] }) });
18485
- }, sE = Ne.forwardRef(
18489
+ }, cE = Ne.forwardRef(
18486
18490
  ({
18487
18491
  style: e,
18488
18492
  className: t,
@@ -18514,7 +18518,7 @@ const dh = /* @__PURE__ */ Ot(dc), $x = dc.WidthProvider(dh), Tx = yr.div`
18514
18518
  );
18515
18519
  }
18516
18520
  );
18517
- class cE extends Ne.Component {
18521
+ class lE extends Ne.Component {
18518
18522
  constructor(t) {
18519
18523
  super(t), this.state = {
18520
18524
  hasError: !1,
@@ -18538,7 +18542,7 @@ class cE extends Ne.Component {
18538
18542
  };
18539
18543
  }
18540
18544
  }
18541
- const lE = (e) => /* @__PURE__ */ ge.jsx(ge.Fragment, { children: /* @__PURE__ */ ge.jsx(
18545
+ const uE = (e) => /* @__PURE__ */ ge.jsx(ge.Fragment, { children: /* @__PURE__ */ ge.jsx(
18542
18546
  "div",
18543
18547
  {
18544
18548
  className: "droppable-element",
@@ -18633,7 +18637,7 @@ const lE = (e) => /* @__PURE__ */ ge.jsx(ge.Fragment, { children: /* @__PURE__ *
18633
18637
  .react-grid-drag-handle {
18634
18638
  cursor: move;
18635
18639
  }
18636
- `, uE = (e) => /* @__PURE__ */ ge.jsx(ge.Fragment, { children: /* @__PURE__ */ ge.jsx(Bx, { children: /* @__PURE__ */ ge.jsx(jx, { children: /* @__PURE__ */ ge.jsx(
18640
+ `, fE = (e) => /* @__PURE__ */ ge.jsx(ge.Fragment, { children: /* @__PURE__ */ ge.jsx(Bx, { children: /* @__PURE__ */ ge.jsx(jx, { children: /* @__PURE__ */ ge.jsx(
18637
18641
  Ix,
18638
18642
  {
18639
18643
  className: "layout",
@@ -18651,27 +18655,28 @@ const lE = (e) => /* @__PURE__ */ ge.jsx(ge.Fragment, { children: /* @__PURE__ *
18651
18655
  draggableHandle: ".react-grid-drag-handle",
18652
18656
  children: e.components
18653
18657
  }
18654
- ) }) }) }), fE = () => {
18658
+ ) }) }) }), dE = () => {
18655
18659
  typeof window < "u" && (window.Buffer = ms.Buffer, window.fs = new lp("fs"), window.pfs = window.fs.promises, window.miDir = "/mi");
18656
18660
  };
18657
18661
  export {
18658
- oE as MiniApp,
18662
+ sE as MiniApp,
18659
18663
  tE as ProjectProvider,
18660
- sE as RGComponent,
18661
- cE as RGComponentErrorBoundary,
18662
- lE as RGDroppable,
18663
- uE as RGEditLayout,
18664
+ cE as RGComponent,
18665
+ lE as RGComponentErrorBoundary,
18666
+ uE as RGDroppable,
18667
+ fE as RGEditLayout,
18664
18668
  Ax as RGPreviewLayout,
18665
18669
  Jx as getHeadCommit,
18666
18670
  eE as getRedoTargetCommitForFile,
18667
18671
  Cb as getTags,
18668
18672
  Qx as getUndoTargetCommitForFile,
18669
- fE as initializeMakeInfinite,
18673
+ dE as initializeMakeInfinite,
18670
18674
  bb as listDir,
18671
18675
  rE as loadLibraryComponents,
18672
18676
  Z_ as loadProjectComponents,
18677
+ nE as setTailwindTheme,
18673
18678
  Ob as syncAndRetry,
18674
18679
  N_ as useAPI,
18675
- nE as useB64UrlForProjectImage,
18680
+ iE as useB64UrlForProjectImage,
18676
18681
  Ed as useProject
18677
18682
  };