@aduptive/strapi-blockscene 1.0.0-alpha.1 → 1.0.0-alpha.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/README.md CHANGED
@@ -292,10 +292,11 @@ the configured static base.
292
292
 
293
293
  ## Guarantees and limits
294
294
 
295
- Tested versions: Strapi 4.26.1 (Node 20) and 5.52.1 (Node 22) in the local
296
- labs of this repository, and 5.23.5 and 5.31.0 in two real site projects. The
297
- peer ranges (`>=5.23.0 <6`, `>=4.20.0 <5`) express what installs without
298
- overrides, not a promise for every minor in between.
295
+ Tested versions: Strapi 4.11.0 and 4.26.1 (Node 20), 5.0.0 and 5.52.1
296
+ (Node 22) in the local labs of this repository, and 5.23.5 and 5.31.0 in two
297
+ real site projects. The peer ranges (`>=5.0.0 <6`, `>=4.11.0 <5`) express what
298
+ installs without overrides, not a promise for every minor in between. Strapi
299
+ 4.0–4.10 is out of reach: those admins run React 17 and lack `useFetchClient`.
299
300
 
300
301
 
301
302
  - Native component payloads and ordinary Strapi save/publish flow.
package/dist/admin.cjs CHANGED
@@ -1731,14 +1731,16 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
1731
1731
  ] })
1732
1732
  ] }) });
1733
1733
  }
1734
- function register(app, Component) {
1734
+ function register(app, Component, to) {
1735
1735
  app.createSettingSection(
1736
1736
  { id: "blockscene", intlLabel: { id: "blockscene.title", defaultMessage: "Blockscene" } },
1737
1737
  [{
1738
1738
  id: "blockscene-settings",
1739
- to: "/settings/blockscene",
1739
+ to,
1740
1740
  intlLabel: { id: "blockscene.settings", defaultMessage: "Gallery" },
1741
- Component: async () => Component,
1741
+ // Module shape: older Strapi 4 (e.g. 4.11) only reads `.default` from the loader result.
1742
+ // Not an `async` function: Strapi 5 warns on AsyncFunction loaders.
1743
+ Component: () => Promise.resolve({ default: Component }),
1742
1744
  permissions: permissions.read
1743
1745
  }]
1744
1746
  );
@@ -1828,7 +1830,7 @@ function usePermissions() {
1828
1830
  var SettingsPage = () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Settings, { useClient: import_helper_plugin.useFetchClient, usePermissions, MediaPicker, ToggleField, SelectField, previewSupported: false });
1829
1831
  var strapi4_default = {
1830
1832
  register(app) {
1831
- register(app, SettingsPage);
1833
+ register(app, SettingsPage, "/settings/blockscene");
1832
1834
  app.registerPlugin({ id: "blockscene", name: "Blockscene" });
1833
1835
  },
1834
1836
  registerTrads,
package/dist/admin.mjs CHANGED
@@ -1698,14 +1698,16 @@ function Settings({ useClient, usePermissions: usePermissions2, MediaPicker: Med
1698
1698
  ] })
1699
1699
  ] }) });
1700
1700
  }
1701
- function register(app, Component) {
1701
+ function register(app, Component, to) {
1702
1702
  app.createSettingSection(
1703
1703
  { id: "blockscene", intlLabel: { id: "blockscene.title", defaultMessage: "Blockscene" } },
1704
1704
  [{
1705
1705
  id: "blockscene-settings",
1706
- to: "/settings/blockscene",
1706
+ to,
1707
1707
  intlLabel: { id: "blockscene.settings", defaultMessage: "Gallery" },
1708
- Component: async () => Component,
1708
+ // Module shape: older Strapi 4 (e.g. 4.11) only reads `.default` from the loader result.
1709
+ // Not an `async` function: Strapi 5 warns on AsyncFunction loaders.
1710
+ Component: () => Promise.resolve({ default: Component }),
1709
1711
  permissions: permissions.read
1710
1712
  }]
1711
1713
  );
@@ -1795,7 +1797,7 @@ function usePermissions() {
1795
1797
  var SettingsPage = () => /* @__PURE__ */ jsx4(Settings, { useClient: useFetchClient, usePermissions, MediaPicker, ToggleField, SelectField, previewSupported: false });
1796
1798
  var strapi4_default = {
1797
1799
  register(app) {
1798
- register(app, SettingsPage);
1800
+ register(app, SettingsPage, "/settings/blockscene");
1799
1801
  app.registerPlugin({ id: "blockscene", name: "Blockscene" });
1800
1802
  },
1801
1803
  registerTrads,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aduptive/strapi-blockscene",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.3",
4
4
  "description": "Visual component gallery for native Strapi dynamic zones.",
5
5
  "license": "MIT",
6
6
  "author": "Andrea Scarpello <aduptive@gmail.com>",
@@ -39,14 +39,13 @@
39
39
  "node": ">=18.17 <21"
40
40
  },
41
41
  "peerDependencies": {
42
- "@strapi/strapi": ">=4.20.0 <5",
42
+ "@strapi/strapi": ">=4.11.0 <5",
43
43
  "@strapi/design-system": "^1.19.0",
44
44
  "react": "^18.0.0",
45
45
  "react-dom": "^18.0.0",
46
46
  "styled-components": "^5.3.0",
47
47
  "react-intl": "^6.0.0",
48
- "@strapi/helper-plugin": ">=4.20.0 <5",
49
- "@strapi/admin": ">=4.20.0 <5"
48
+ "@strapi/helper-plugin": ">=4.11.0 <5"
50
49
  },
51
50
  "dependencies": {
52
51
  "fractional-indexing": "3.2.0"