@embeddable.com/sdk-utils 0.8.2-next.0 → 0.8.3-next.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.
@@ -8,6 +8,7 @@ export declare const EXTERNAL_LIBRARY_GLOBAL_HOOKS_META_NAME = "globalHooks.json
8
8
  export declare const getComponentLibraryMeta: (ctx: any, componentLibrary: string | ComponentLibraryConfig) => Promise<{
9
9
  components: string[];
10
10
  editors: string[];
11
+ previews: string[];
11
12
  plugin: string;
12
13
  }>;
13
14
  export declare const getGlobalHooksMeta: (ctx: any, libraryName: string) => Promise<GlobalHooksMeta>;
package/lib/index.esm.js CHANGED
@@ -4332,6 +4332,7 @@ const getComponentLibraryConfig = (componentLibrary) => {
4332
4332
  const EXTERNAL_LIBRARY_META_FILE_NAME = "embeddable-components.json";
4333
4333
  const EXTERNAL_LIBRARY_GLOBAL_HOOKS_META_NAME = "globalHooks.json";
4334
4334
  const getComponentLibraryMeta = async (ctx, componentLibrary) => {
4335
+ var _a;
4335
4336
  const { libraryName, include, exclude } = getComponentLibraryConfig(componentLibrary);
4336
4337
  const libraryMeta = (await loadJson(getLibraryPath(ctx, libraryName, EXTERNAL_LIBRARY_META_FILE_NAME)));
4337
4338
  const filterItems = (items) => {
@@ -4345,6 +4346,7 @@ const getComponentLibraryMeta = async (ctx, componentLibrary) => {
4345
4346
  ...libraryMeta,
4346
4347
  components: filterItems(libraryMeta.components),
4347
4348
  editors: filterItems(libraryMeta.editors),
4349
+ previews: filterItems((_a = libraryMeta.previews) !== null && _a !== void 0 ? _a : []),
4348
4350
  };
4349
4351
  };
4350
4352
  const getGlobalHooksMeta = async (ctx, libraryName) => {