@manifest-editor/shell 1.4.0 → 1.4.2

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.cts CHANGED
@@ -88,6 +88,7 @@ interface Config {
88
88
  Range?: EditorConfig;
89
89
  Collection?: EditorConfig;
90
90
  ContentResource?: EditorConfig;
91
+ EmbeddedCollection?: EditorConfig;
91
92
  };
92
93
  editorFeatureFlags: {
93
94
  enableMultiImageCanvases?: boolean;
package/dist/index.d.ts CHANGED
@@ -88,6 +88,7 @@ interface Config {
88
88
  Range?: EditorConfig;
89
89
  Collection?: EditorConfig;
90
90
  ContentResource?: EditorConfig;
91
+ EmbeddedCollection?: EditorConfig;
91
92
  };
92
93
  editorFeatureFlags: {
93
94
  enableMultiImageCanvases?: boolean;
package/dist/index.js CHANGED
@@ -2886,11 +2886,18 @@ function BaseEditor({ currentTab = void 0 }) {
2886
2886
  const resource = useEditingResource();
2887
2887
  const currentResourceContext = useContext13(ResourceReactContext);
2888
2888
  const app = useApp();
2889
+ const rootResource = useAppResource();
2889
2890
  const vault = useVault6();
2890
2891
  const { change } = useLayoutActions();
2891
2892
  const set = useSetCustomTitle();
2892
2893
  const { editorConfig } = useConfig();
2893
- const resourceConfig = (resource?.resource.source?.type ? editorConfig[resource?.resource.source?.type] : editorConfig.All) || {};
2894
+ const resourceId = resource?.resource.source?.id;
2895
+ let resourceType = resource?.resource.source?.type;
2896
+ const isNested = resourceId !== rootResource.id;
2897
+ if (resourceId && isNested && rootResource.type === "Collection" && resourceType === "Collection") {
2898
+ resourceType = "EmbeddedCollection";
2899
+ }
2900
+ const resourceConfig = (resourceType ? editorConfig[resourceType] : editorConfig.All) || {};
2894
2901
  const newResourceContext = useMemo14(() => {
2895
2902
  const newCtx = { ...currentResourceContext };
2896
2903
  const id = resource?.resource.source.id;
@@ -2936,7 +2943,7 @@ function BaseEditor({ currentTab = void 0 }) {
2936
2943
  }, [resource, app]);
2937
2944
  useEffect10(() => {
2938
2945
  set(match?.label || "");
2939
- });
2946
+ }, [match]);
2940
2947
  useEffect10(() => {
2941
2948
  const availableKeys = match?.editors.map((editor, key) => editor.id + key) || [];
2942
2949
  const currentKey = availableKeys.find((key) => key === currentTab);
@@ -2959,6 +2966,8 @@ function BaseEditor({ currentTab = void 0 }) {
2959
2966
  /* @__PURE__ */ jsx21(
2960
2967
  SidebarTabs,
2961
2968
  {
2969
+ isNested,
2970
+ rootResource,
2962
2971
  menuId: resource.resource.source.id,
2963
2972
  menu: (match?.editors || []).map((editor, key) => {
2964
2973
  return {
@@ -4233,7 +4242,7 @@ var HandleControls = forwardRef2(function HandleControls2({ dir, open, actions,
4233
4242
  children: /* @__PURE__ */ jsx31(ResetIcon, {})
4234
4243
  }
4235
4244
  ) : null,
4236
- open ? /* @__PURE__ */ jsx31(ResizeHandle, {}) : null
4245
+ open ? /* @__PURE__ */ jsx31(ResizeHandle, { "aria-label": "Reorder item" }) : null
4237
4246
  ] })
4238
4247
  ] });
4239
4248
  });