@middag-io/react 0.35.3 → 0.36.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.
@@ -1590,8 +1590,8 @@ function Di({ children: e, onClose: t }) {
1590
1590
  }
1591
1591
  //#endregion
1592
1592
  //#region src/app/ContractPage.tsx
1593
- function Oi({ contract: e, overlay: t }) {
1594
- let { t: n } = I(), r = Ar(() => Yr(e), [e]), i = Ar(() => ui(e?.shell) ?? ui("immersive"), [e?.shell]), a = Ar(() => di(e?.layout?.template) || di("stack"), [e?.layout?.template]), o = H((e) => {
1593
+ function Oi({ contract: e, overlay: t, shellMode: n = "full" }) {
1594
+ let { t: r } = I(), i = Ar(() => Yr(e), [e]), a = Ar(() => ui(e?.shell) ?? ui("immersive"), [e?.shell]), o = Ar(() => di(e?.layout?.template) || di("stack"), [e?.layout?.template]), s = H((e) => {
1595
1595
  let t = fi(e.type);
1596
1596
  return t ? ri(e) ? /* @__PURE__ */ q(yi, { children: /* @__PURE__ */ q(ni, {
1597
1597
  block: e,
@@ -1602,35 +1602,43 @@ function Oi({ contract: e, overlay: t }) {
1602
1602
  }) }, e.key) : /* @__PURE__ */ J("div", {
1603
1603
  role: "alert",
1604
1604
  className: "border-muted-foreground/30 text-muted-foreground rounded border border-dashed p-2 text-xs",
1605
- children: [n("middag.ui.block.unknown_type"), null]
1605
+ children: [r("middag.ui.block.unknown_type"), null]
1606
1606
  }, e.key);
1607
- }, [n]);
1608
- if (r) return /* @__PURE__ */ J("div", {
1607
+ }, [r]);
1608
+ if (i) return /* @__PURE__ */ J("div", {
1609
1609
  role: "alert",
1610
1610
  className: "border-destructive/20 bg-destructive/10 text-destructive m-4 rounded-md border p-4 text-sm",
1611
1611
  children: [/* @__PURE__ */ q("p", {
1612
1612
  className: "font-semibold",
1613
- children: n("middag.ui.contract.invalid")
1613
+ children: r("middag.ui.contract.invalid")
1614
1614
  }), null]
1615
1615
  });
1616
- if (!i) return /* @__PURE__ */ J("div", {
1616
+ if (!o) return /* @__PURE__ */ J("div", {
1617
1617
  role: "alert",
1618
1618
  className: "border-destructive/20 bg-destructive/10 text-destructive m-4 rounded-md border p-4 text-sm",
1619
- children: [n("middag.ui.shell.unknown_type"), null]
1619
+ children: [r("middag.ui.layout.unknown_type"), null]
1620
+ });
1621
+ let c = /* @__PURE__ */ q(o, {
1622
+ layout: e.layout,
1623
+ renderBlock: s
1620
1624
  });
1625
+ if (n === "content-only") {
1626
+ let n = /* @__PURE__ */ q(Zr, {
1627
+ entities: e.entities ?? {},
1628
+ children: c
1629
+ });
1630
+ return t ? /* @__PURE__ */ q(Di, { children: n }) : n;
1631
+ }
1621
1632
  if (!a) return /* @__PURE__ */ J("div", {
1622
1633
  role: "alert",
1623
1634
  className: "border-destructive/20 bg-destructive/10 text-destructive m-4 rounded-md border p-4 text-sm",
1624
- children: [n("middag.ui.layout.unknown_type"), null]
1635
+ children: [r("middag.ui.shell.unknown_type"), null]
1625
1636
  });
1626
- let s = /* @__PURE__ */ q(Zr, {
1637
+ let l = /* @__PURE__ */ q(Zr, {
1627
1638
  entities: e.entities ?? {},
1628
- children: /* @__PURE__ */ q(i, { children: /* @__PURE__ */ q(a, {
1629
- layout: e.layout,
1630
- renderBlock: o
1631
- }) })
1639
+ children: /* @__PURE__ */ q(a, { children: c })
1632
1640
  });
1633
- return t ? /* @__PURE__ */ q(Di, { children: s }) : s;
1641
+ return t ? /* @__PURE__ */ q(Di, { children: l }) : l;
1634
1642
  }
1635
1643
  //#endregion
1636
1644
  //#region src/base/form/fields/field-registry.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middag-io/react",
3
- "version": "0.35.3",
3
+ "version": "0.36.1",
4
4
  "type": "module",
5
5
  "description": "MIDDAG shared React UI library for Moodle, WordPress and other Inertia hosts",
6
6
  "license": "Apache-2.0",