@nocode-factory/sanity-kit 2.33.1 → 2.33.3

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
@@ -1388,7 +1388,7 @@ export declare function ActorName(props: {
1388
1388
  * quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
1389
1389
  * le vérifie.
1390
1390
  */
1391
- export declare const KIT_VERSION = "2.33.1";
1391
+ export declare const KIT_VERSION = "2.33.3";
1392
1392
  /**
1393
1393
  * Données de la page proposées comme colonnes.
1394
1394
  *
package/dist/index.js CHANGED
@@ -1383,7 +1383,7 @@ function explainGrantError(error) {
1383
1383
  * quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
1384
1384
  * le vérifie.
1385
1385
  */
1386
- const KIT_VERSION = "2.33.1";
1386
+ const KIT_VERSION = "2.33.3";
1387
1387
  /**
1388
1388
  * Signale ce Studio au service du kit, une fois par montage.
1389
1389
  *
@@ -1726,7 +1726,7 @@ function useKitUpdate() {
1726
1726
  !controller.signal.aborted && body?.version && setLatest(body.version);
1727
1727
  }).catch(() => {}), () => controller.abort();
1728
1728
  }, []);
1729
- let available = !!(latest && !isPrerelease(latest) && compareVersions(latest, "2.33.1") > 0);
1729
+ let available = !!(latest && !isPrerelease(latest) && compareVersions(latest, "2.33.3") > 0);
1730
1730
  return {
1731
1731
  current: KIT_VERSION,
1732
1732
  latest,
@@ -9483,23 +9483,21 @@ function NcfPresentationHeader(props) {
9483
9483
  };
9484
9484
  }), useEffect(() => {
9485
9485
  let panel = previewPanel(), content = contentPanel();
9486
- if (!panel || !content || !hideForm) return;
9486
+ if (!content || !hideForm) return;
9487
9487
  let hidden = [content], handle = content.previousElementSibling;
9488
9488
  handle && handle !== panel && !handle.id && hidden.push(handle);
9489
9489
  let apply = () => {
9490
9490
  for (let h of hidden) h.style.getPropertyValue("display") !== "none" && h.style.setProperty("display", "none", "important");
9491
- panel.style.getPropertyPriority("flex-grow") !== "important" && panel.style.setProperty("flex-grow", "1000", "important");
9492
9491
  };
9493
9492
  apply();
9494
9493
  let observer = new MutationObserver(apply);
9495
- for (let el of [panel, ...hidden]) observer.observe(el, {
9494
+ for (let el of hidden) observer.observe(el, {
9496
9495
  attributes: !0,
9497
9496
  attributeFilter: ["style"]
9498
9497
  });
9499
9498
  return () => {
9500
9499
  observer.disconnect();
9501
9500
  for (let h of hidden) h.style.removeProperty("display");
9502
- panel.style.removeProperty("flex-grow");
9503
9501
  };
9504
9502
  }), /* @__PURE__ */ jsxs(Flex, {
9505
9503
  ref,
@@ -9574,34 +9572,37 @@ function PagesNavigator() {
9574
9572
  gap: 2,
9575
9573
  padding: 2,
9576
9574
  style: { flex: "none" },
9577
- children: [/* @__PURE__ */ jsx(Text, {
9578
- size: 1,
9579
- weight: "semibold",
9580
- children: "Pages"
9581
- }), /* @__PURE__ */ jsxs(Flex, {
9582
- gap: 2,
9583
- children: [/* @__PURE__ */ jsx(Box, {
9584
- flex: 1,
9585
- children: /* @__PURE__ */ jsx(TextInput, {
9586
- icon: SearchIcon,
9587
- fontSize: 1,
9588
- padding: 2,
9589
- placeholder: "Search",
9590
- value: search,
9591
- onChange: (e) => setSearch(e.currentTarget.value)
9592
- })
9593
- }), i18n && i18n.locales.length > 1 && /* @__PURE__ */ jsx(Select, {
9575
+ children: [
9576
+ /* @__PURE__ */ jsx(Text, {
9577
+ size: 1,
9578
+ weight: "semibold",
9579
+ children: "Pages"
9580
+ }),
9581
+ /* @__PURE__ */ jsx(TextInput, {
9582
+ icon: SearchIcon,
9594
9583
  fontSize: 1,
9595
9584
  padding: 2,
9596
- value: activeLocale,
9597
- onChange: (e) => setLocale(e.currentTarget.value),
9598
- style: { width: 88 },
9599
- children: i18n.locales.map((code) => /* @__PURE__ */ jsx("option", {
9600
- value: code,
9601
- children: code.toUpperCase()
9602
- }, code))
9603
- })]
9604
- })]
9585
+ placeholder: "Search",
9586
+ value: search,
9587
+ onChange: (e) => setSearch(e.currentTarget.value)
9588
+ }),
9589
+ i18n && i18n.locales.length > 1 && /* @__PURE__ */ jsx(Flex, {
9590
+ gap: 1,
9591
+ wrap: "wrap",
9592
+ children: i18n.locales.map((code) => {
9593
+ let active = code === activeLocale;
9594
+ return /* @__PURE__ */ jsx(Button, {
9595
+ text: code.toUpperCase(),
9596
+ fontSize: 1,
9597
+ padding: 2,
9598
+ mode: active ? "default" : "ghost",
9599
+ tone: active ? "primary" : "default",
9600
+ "aria-pressed": active,
9601
+ onClick: () => setLocale(code)
9602
+ }, code);
9603
+ })
9604
+ })
9605
+ ]
9605
9606
  }), /* @__PURE__ */ jsx(Box, {
9606
9607
  flex: 1,
9607
9608
  style: {