@medialane/ui 0.107.0 → 0.107.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.
- package/dist/utils/use-collections.cjs +7 -4
- package/dist/utils/use-collections.cjs.map +1 -1
- package/dist/utils/use-collections.d.cts +6 -1
- package/dist/utils/use-collections.d.ts +6 -1
- package/dist/utils/use-collections.js +7 -4
- package/dist/utils/use-collections.js.map +1 -1
- package/package.json +2 -2
|
@@ -39,16 +39,19 @@ module.exports = __toCommonJS(use_collections_exports);
|
|
|
39
39
|
var import_swr = __toESM(require("swr"), 1);
|
|
40
40
|
var import_use_medialane_client = require("./use-medialane-client.js");
|
|
41
41
|
var import_query_keys = require("./query-keys.js");
|
|
42
|
-
function useCollections(getClient, page = 1, limit = 20, isFeatured, sort = "recent", hideEmpty = true, service) {
|
|
42
|
+
function useCollections(getClient, page = 1, limit = 20, isFeatured, sort = "recent", hideEmpty = true, service, standard, fallback) {
|
|
43
43
|
const client = (0, import_use_medialane_client.useMedialaneClient)(getClient);
|
|
44
|
-
const key = import_query_keys.queryKeys.collections(page, limit, isFeatured, sort, hideEmpty, service)
|
|
44
|
+
const key = `${import_query_keys.queryKeys.collections(page, limit, isFeatured, sort, hideEmpty, service)}-${standard ?? ""}`;
|
|
45
45
|
const { data, error, isLoading, mutate } = (0, import_swr.default)(
|
|
46
46
|
key,
|
|
47
47
|
async () => {
|
|
48
|
-
const res = await client.api.getCollections(page, limit, isFeatured, sort, service);
|
|
48
|
+
const res = await client.api.getCollections(page, limit, isFeatured, sort, service, void 0, standard);
|
|
49
49
|
return hideEmpty ? { ...res, data: res.data.filter((collection) => (collection.totalSupply ?? 0) > 0) } : res;
|
|
50
50
|
},
|
|
51
|
-
{
|
|
51
|
+
{
|
|
52
|
+
revalidateOnFocus: false,
|
|
53
|
+
...fallback ? { fallbackData: { data: fallback } } : {}
|
|
54
|
+
}
|
|
52
55
|
);
|
|
53
56
|
return {
|
|
54
57
|
collections: data?.data ?? [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/use-collections.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { ApiCollection, ApiResponse, CollectionTokensSort } from \"@medialane/sdk\";\nimport { queryKeys } from \"./query-keys.js\";\n\nexport type CollectionSort = \"recent\" | \"supply\" | \"floor\" | \"volume\" | \"name\";\n\nexport function useCollections(\n getClient: () => MedialaneClient,\n page = 1,\n limit = 20,\n isFeatured?: boolean,\n sort: CollectionSort = \"recent\",\n hideEmpty = true,\n service?: string\n) {\n const client = useMedialaneClient(getClient);\n const key = queryKeys.collections(page, limit, isFeatured, sort, hideEmpty, service)
|
|
1
|
+
{"version":3,"sources":["../../src/utils/use-collections.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { ApiCollection, ApiResponse, CollectionTokensSort } from \"@medialane/sdk\";\nimport { queryKeys } from \"./query-keys.js\";\n\nexport type CollectionSort = \"recent\" | \"supply\" | \"floor\" | \"volume\" | \"name\";\n\nexport function useCollections(\n getClient: () => MedialaneClient,\n page = 1,\n limit = 20,\n isFeatured?: boolean,\n sort: CollectionSort = \"recent\",\n hideEmpty = true,\n service?: string,\n /** Token standard filter — single value or comma-separated list (e.g. \"ERC721,ERC1155\"). */\n standard?: string,\n /** Server-fetched seed (e.g. homepage hero) — first render shows real data,\n * SWR still revalidates in the background. */\n fallback?: ApiCollection[]\n) {\n const client = useMedialaneClient(getClient);\n const key = `${queryKeys.collections(page, limit, isFeatured, sort, hideEmpty, service)}-${standard ?? \"\"}`;\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiCollection[]>>(\n key,\n async () => {\n const res = await client.api.getCollections(page, limit, isFeatured, sort, service, undefined, standard);\n return hideEmpty\n ? { ...res, data: res.data.filter((collection) => (collection.totalSupply ?? 0) > 0) }\n : res;\n },\n {\n revalidateOnFocus: false,\n ...(fallback ? { fallbackData: { data: fallback } as ApiResponse<ApiCollection[]> } : {}),\n }\n );\n\n return {\n collections: data?.data ?? [],\n meta: data?.meta,\n isLoading,\n error,\n mutate,\n };\n}\n\nexport function useCollection(getClient: () => MedialaneClient, contract: string | null) {\n const client = useMedialaneClient(getClient);\n\n const { data, error, isLoading } = useSWR(\n contract ? queryKeys.collection(contract) : null,\n () => client.api.getCollection(contract!),\n { revalidateOnFocus: false }\n );\n\n return { collection: data?.data ?? null, isLoading, error };\n}\n\nexport function useCollectionsByOwner(getClient: () => MedialaneClient, owner: string | null) {\n const client = useMedialaneClient(getClient);\n\n const { data, error, isLoading, mutate } = useSWR(\n owner ? queryKeys.collectionsOwner(owner) : null,\n () => client.api.getCollectionsByOwner(owner!),\n { revalidateOnFocus: false, refreshInterval: 60_000 }\n );\n\n return { collections: data?.data ?? [], isLoading, error, mutate };\n}\n\nexport function useCollectionTokens(\n getClient: () => MedialaneClient,\n contract: string | null,\n page = 1,\n limit = 24,\n sort: CollectionTokensSort = \"recent\"\n) {\n const client = useMedialaneClient(getClient);\n\n const { data, error, isLoading, mutate } = useSWR(\n contract ? queryKeys.collectionTokens(contract, page, limit, sort) : null,\n () => client.api.getCollectionTokens(contract!, page, limit, sort),\n { revalidateOnFocus: false }\n );\n\n return { tokens: data?.data ?? [], meta: data?.meta, isLoading, error, mutate };\n}\n\n/** From a token list ordered by tokenId (ascending), picks up to `count`\n * tokens surrounding `currentTokenId` — the ones after it first, then the\n * ones before, backfilling from whichever side has room near a collection\n * edge. Returned in ascending tokenId order for a natural \"keep browsing\"\n * feel. Falls back to the first `count` tokens when the current one isn't\n * in the fetched page (e.g. a collection larger than the pool). */\nfunction pickNearbyTokens<T extends { tokenId: string }>(\n tokens: T[],\n currentTokenId: string | null,\n count: number\n): T[] {\n if (!currentTokenId) return tokens.slice(0, count);\n const idx = tokens.findIndex((t) => String(t.tokenId) === String(currentTokenId));\n if (idx === -1) return tokens.slice(0, count);\n\n const picked: T[] = [];\n let after = idx + 1;\n let before = idx - 1;\n while (picked.length < count && (after < tokens.length || before >= 0)) {\n if (after < tokens.length) picked.push(tokens[after++]);\n if (picked.length < count && before >= 0) picked.push(tokens[before--]);\n }\n return picked.sort((a, b) => Number(a.tokenId) - Number(b.tokenId));\n}\n\n/** Asset-page \"more from this collection\" strip — tokens near `currentTokenId`\n * by id, not just whatever minted most recently (which can be anywhere in a\n * large collection and feel unrelated to the piece being viewed). Pulls a\n * bounded pool sorted `oldest` (ascending mint order, i.e. tokenId order for\n * every Medialane-issued collection) and windows around the current token. */\nexport function useNearbyCollectionTokens(\n getClient: () => MedialaneClient,\n contract: string | null,\n currentTokenId: string | null,\n count = 4,\n poolSize = 60\n) {\n const { tokens, isLoading, error } = useCollectionTokens(getClient, contract, 1, poolSize, \"oldest\");\n return { tokens: pickNearbyTokens(tokens, currentTokenId, count), isLoading, error };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AACnB,kCAAmC;AAGnC,wBAA0B;AAInB,SAAS,eACd,WACA,OAAO,GACP,QAAQ,IACR,YACA,OAAuB,UACvB,YAAY,MACZ,SAEA,UAGA,UACA;AACA,QAAM,aAAS,gDAAmB,SAAS;AAC3C,QAAM,MAAM,GAAG,4BAAU,YAAY,MAAM,OAAO,YAAY,MAAM,WAAW,OAAO,CAAC,IAAI,YAAY,EAAE;AAEzG,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC;AAAA,IACA,YAAY;AACV,YAAM,MAAM,MAAM,OAAO,IAAI,eAAe,MAAM,OAAO,YAAY,MAAM,SAAS,QAAW,QAAQ;AACvG,aAAO,YACH,EAAE,GAAG,KAAK,MAAM,IAAI,KA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AAoB,UAAW,MAAM,OAAO,IAAI;AAAA,IACjE,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AAEA,SAAO,EAAE,QAAQ,MAAM,QAAQ,CAAC,GAAG,MAAM,MAAM,MAAM,WAAW,OAAO,OAAO;AAChF;AAQA,SAAS,iBACP,QACA,gBACA,OACK;AACL,MAAI,CAAC,eAAgB,QAAO,OAAO,MAAM,GAAG,KAAK;AACjD,QAAM,MAAM,OAAO,UAAU,CAAC,MAAM,OAAO,EAAE,OAAO,MAAM,OAAO,cAAc,CAAC;AAChF,MAAI,QAAQ,GAAI,QAAO,OAAO,MAAM,GAAG,KAAK;AAE5C,QAAM,SAAc,CAAC;AACrB,MAAI,QAAQ,MAAM;AAClB,MAAI,SAAS,MAAM;AACnB,SAAO,OAAO,SAAS,UAAU,QAAQ,OAAO,UAAU,UAAU,IAAI;AACtE,QAAI,QAAQ,OAAO,OAAQ,QAAO,KAAK,OAAO,OAAO,CAAC;AACtD,QAAI,OAAO,SAAS,SAAS,UAAU,EAAG,QAAO,KAAK,OAAO,QAAQ,CAAC;AAAA,EACxE;AACA,SAAO,OAAO,KAAK,CAAC,GAAG,MAAM,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,CAAC;AACpE;AAOO,SAAS,0BACd,WACA,UACA,gBACA,QAAQ,GACR,WAAW,IACX;AACA,QAAM,EAAE,QAAQ,WAAW,MAAM,IAAI,oBAAoB,WAAW,UAAU,GAAG,UAAU,QAAQ;AACnG,SAAO,EAAE,QAAQ,iBAAiB,QAAQ,gBAAgB,KAAK,GAAG,WAAW,MAAM;AACrF;","names":["useSWR"]}
|
|
@@ -4,7 +4,12 @@ import { ApiCollection, CollectionTokensSort, ApiResponse } from '@medialane/sdk
|
|
|
4
4
|
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
5
5
|
|
|
6
6
|
type CollectionSort = "recent" | "supply" | "floor" | "volume" | "name";
|
|
7
|
-
declare function useCollections(getClient: () => MedialaneClient, page?: number, limit?: number, isFeatured?: boolean, sort?: CollectionSort, hideEmpty?: boolean, service?: string
|
|
7
|
+
declare function useCollections(getClient: () => MedialaneClient, page?: number, limit?: number, isFeatured?: boolean, sort?: CollectionSort, hideEmpty?: boolean, service?: string,
|
|
8
|
+
/** Token standard filter — single value or comma-separated list (e.g. "ERC721,ERC1155"). */
|
|
9
|
+
standard?: string,
|
|
10
|
+
/** Server-fetched seed (e.g. homepage hero) — first render shows real data,
|
|
11
|
+
* SWR still revalidates in the background. */
|
|
12
|
+
fallback?: ApiCollection[]): {
|
|
8
13
|
collections: ApiCollection[];
|
|
9
14
|
meta: _medialane_sdk.ApiMeta | undefined;
|
|
10
15
|
isLoading: boolean;
|
|
@@ -4,7 +4,12 @@ import { ApiCollection, CollectionTokensSort, ApiResponse } from '@medialane/sdk
|
|
|
4
4
|
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
5
5
|
|
|
6
6
|
type CollectionSort = "recent" | "supply" | "floor" | "volume" | "name";
|
|
7
|
-
declare function useCollections(getClient: () => MedialaneClient, page?: number, limit?: number, isFeatured?: boolean, sort?: CollectionSort, hideEmpty?: boolean, service?: string
|
|
7
|
+
declare function useCollections(getClient: () => MedialaneClient, page?: number, limit?: number, isFeatured?: boolean, sort?: CollectionSort, hideEmpty?: boolean, service?: string,
|
|
8
|
+
/** Token standard filter — single value or comma-separated list (e.g. "ERC721,ERC1155"). */
|
|
9
|
+
standard?: string,
|
|
10
|
+
/** Server-fetched seed (e.g. homepage hero) — first render shows real data,
|
|
11
|
+
* SWR still revalidates in the background. */
|
|
12
|
+
fallback?: ApiCollection[]): {
|
|
8
13
|
collections: ApiCollection[];
|
|
9
14
|
meta: _medialane_sdk.ApiMeta | undefined;
|
|
10
15
|
isLoading: boolean;
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
import useSWR from "swr";
|
|
3
3
|
import { useMedialaneClient } from "./use-medialane-client.js";
|
|
4
4
|
import { queryKeys } from "./query-keys.js";
|
|
5
|
-
function useCollections(getClient, page = 1, limit = 20, isFeatured, sort = "recent", hideEmpty = true, service) {
|
|
5
|
+
function useCollections(getClient, page = 1, limit = 20, isFeatured, sort = "recent", hideEmpty = true, service, standard, fallback) {
|
|
6
6
|
const client = useMedialaneClient(getClient);
|
|
7
|
-
const key = queryKeys.collections(page, limit, isFeatured, sort, hideEmpty, service)
|
|
7
|
+
const key = `${queryKeys.collections(page, limit, isFeatured, sort, hideEmpty, service)}-${standard ?? ""}`;
|
|
8
8
|
const { data, error, isLoading, mutate } = useSWR(
|
|
9
9
|
key,
|
|
10
10
|
async () => {
|
|
11
|
-
const res = await client.api.getCollections(page, limit, isFeatured, sort, service);
|
|
11
|
+
const res = await client.api.getCollections(page, limit, isFeatured, sort, service, void 0, standard);
|
|
12
12
|
return hideEmpty ? { ...res, data: res.data.filter((collection) => (collection.totalSupply ?? 0) > 0) } : res;
|
|
13
13
|
},
|
|
14
|
-
{
|
|
14
|
+
{
|
|
15
|
+
revalidateOnFocus: false,
|
|
16
|
+
...fallback ? { fallbackData: { data: fallback } } : {}
|
|
17
|
+
}
|
|
15
18
|
);
|
|
16
19
|
return {
|
|
17
20
|
collections: data?.data ?? [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/use-collections.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { ApiCollection, ApiResponse, CollectionTokensSort } from \"@medialane/sdk\";\nimport { queryKeys } from \"./query-keys.js\";\n\nexport type CollectionSort = \"recent\" | \"supply\" | \"floor\" | \"volume\" | \"name\";\n\nexport function useCollections(\n getClient: () => MedialaneClient,\n page = 1,\n limit = 20,\n isFeatured?: boolean,\n sort: CollectionSort = \"recent\",\n hideEmpty = true,\n service?: string\n) {\n const client = useMedialaneClient(getClient);\n const key = queryKeys.collections(page, limit, isFeatured, sort, hideEmpty, service)
|
|
1
|
+
{"version":3,"sources":["../../src/utils/use-collections.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { ApiCollection, ApiResponse, CollectionTokensSort } from \"@medialane/sdk\";\nimport { queryKeys } from \"./query-keys.js\";\n\nexport type CollectionSort = \"recent\" | \"supply\" | \"floor\" | \"volume\" | \"name\";\n\nexport function useCollections(\n getClient: () => MedialaneClient,\n page = 1,\n limit = 20,\n isFeatured?: boolean,\n sort: CollectionSort = \"recent\",\n hideEmpty = true,\n service?: string,\n /** Token standard filter — single value or comma-separated list (e.g. \"ERC721,ERC1155\"). */\n standard?: string,\n /** Server-fetched seed (e.g. homepage hero) — first render shows real data,\n * SWR still revalidates in the background. */\n fallback?: ApiCollection[]\n) {\n const client = useMedialaneClient(getClient);\n const key = `${queryKeys.collections(page, limit, isFeatured, sort, hideEmpty, service)}-${standard ?? \"\"}`;\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiCollection[]>>(\n key,\n async () => {\n const res = await client.api.getCollections(page, limit, isFeatured, sort, service, undefined, standard);\n return hideEmpty\n ? { ...res, data: res.data.filter((collection) => (collection.totalSupply ?? 0) > 0) }\n : res;\n },\n {\n revalidateOnFocus: false,\n ...(fallback ? { fallbackData: { data: fallback } as ApiResponse<ApiCollection[]> } : {}),\n }\n );\n\n return {\n collections: data?.data ?? [],\n meta: data?.meta,\n isLoading,\n error,\n mutate,\n };\n}\n\nexport function useCollection(getClient: () => MedialaneClient, contract: string | null) {\n const client = useMedialaneClient(getClient);\n\n const { data, error, isLoading } = useSWR(\n contract ? queryKeys.collection(contract) : null,\n () => client.api.getCollection(contract!),\n { revalidateOnFocus: false }\n );\n\n return { collection: data?.data ?? null, isLoading, error };\n}\n\nexport function useCollectionsByOwner(getClient: () => MedialaneClient, owner: string | null) {\n const client = useMedialaneClient(getClient);\n\n const { data, error, isLoading, mutate } = useSWR(\n owner ? queryKeys.collectionsOwner(owner) : null,\n () => client.api.getCollectionsByOwner(owner!),\n { revalidateOnFocus: false, refreshInterval: 60_000 }\n );\n\n return { collections: data?.data ?? [], isLoading, error, mutate };\n}\n\nexport function useCollectionTokens(\n getClient: () => MedialaneClient,\n contract: string | null,\n page = 1,\n limit = 24,\n sort: CollectionTokensSort = \"recent\"\n) {\n const client = useMedialaneClient(getClient);\n\n const { data, error, isLoading, mutate } = useSWR(\n contract ? queryKeys.collectionTokens(contract, page, limit, sort) : null,\n () => client.api.getCollectionTokens(contract!, page, limit, sort),\n { revalidateOnFocus: false }\n );\n\n return { tokens: data?.data ?? [], meta: data?.meta, isLoading, error, mutate };\n}\n\n/** From a token list ordered by tokenId (ascending), picks up to `count`\n * tokens surrounding `currentTokenId` — the ones after it first, then the\n * ones before, backfilling from whichever side has room near a collection\n * edge. Returned in ascending tokenId order for a natural \"keep browsing\"\n * feel. Falls back to the first `count` tokens when the current one isn't\n * in the fetched page (e.g. a collection larger than the pool). */\nfunction pickNearbyTokens<T extends { tokenId: string }>(\n tokens: T[],\n currentTokenId: string | null,\n count: number\n): T[] {\n if (!currentTokenId) return tokens.slice(0, count);\n const idx = tokens.findIndex((t) => String(t.tokenId) === String(currentTokenId));\n if (idx === -1) return tokens.slice(0, count);\n\n const picked: T[] = [];\n let after = idx + 1;\n let before = idx - 1;\n while (picked.length < count && (after < tokens.length || before >= 0)) {\n if (after < tokens.length) picked.push(tokens[after++]);\n if (picked.length < count && before >= 0) picked.push(tokens[before--]);\n }\n return picked.sort((a, b) => Number(a.tokenId) - Number(b.tokenId));\n}\n\n/** Asset-page \"more from this collection\" strip — tokens near `currentTokenId`\n * by id, not just whatever minted most recently (which can be anywhere in a\n * large collection and feel unrelated to the piece being viewed). Pulls a\n * bounded pool sorted `oldest` (ascending mint order, i.e. tokenId order for\n * every Medialane-issued collection) and windows around the current token. */\nexport function useNearbyCollectionTokens(\n getClient: () => MedialaneClient,\n contract: string | null,\n currentTokenId: string | null,\n count = 4,\n poolSize = 60\n) {\n const { tokens, isLoading, error } = useCollectionTokens(getClient, contract, 1, poolSize, \"oldest\");\n return { tokens: pickNearbyTokens(tokens, currentTokenId, count), isLoading, error };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AACnB,SAAS,0BAA0B;AAGnC,SAAS,iBAAiB;AAInB,SAAS,eACd,WACA,OAAO,GACP,QAAQ,IACR,YACA,OAAuB,UACvB,YAAY,MACZ,SAEA,UAGA,UACA;AACA,QAAM,SAAS,mBAAmB,SAAS;AAC3C,QAAM,MAAM,GAAG,UAAU,YAAY,MAAM,OAAO,YAAY,MAAM,WAAW,OAAO,CAAC,IAAI,YAAY,EAAE;AAEzG,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC;AAAA,IACA,YAAY;AACV,YAAM,MAAM,MAAM,OAAO,IAAI,eAAe,MAAM,OAAO,YAAY,MAAM,SAAS,QAAW,QAAQ;AACvG,aAAO,YACH,EAAE,GAAG,KAAK,MAAM,IAAI,KAAK,OAAO,CAAC,gBAAgB,WAAW,eAAe,KAAK,CAAC,EAAE,IACnF;AAAA,IACN;AAAA,IACA;AAAA,MACE,mBAAmB;AAAA,MACnB,GAAI,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,EAAkC,IAAI,CAAC;AAAA,IACzF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,aAAa,MAAM,QAAQ,CAAC;AAAA,IAC5B,MAAM,MAAM;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,cAAc,WAAkC,UAAyB;AACvF,QAAM,SAAS,mBAAmB,SAAS;AAE3C,QAAM,EAAE,MAAM,OAAO,UAAU,IAAI;AAAA,IACjC,WAAW,UAAU,WAAW,QAAQ,IAAI;AAAA,IAC5C,MAAM,OAAO,IAAI,cAAc,QAAS;AAAA,IACxC,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AAEA,SAAO,EAAE,YAAY,MAAM,QAAQ,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,UAAU,EAAG,QAAO,KAAK,OAAO,QAAQ,CAAC;AAAA,EACxE;AACA,SAAO,OAAO,KAAK,CAAC,GAAG,MAAM,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,CAAC;AACpE;AAOO,SAAS,0BACd,WACA,UACA,gBACA,QAAQ,GACR,WAAW,IACX;AACA,QAAM,EAAE,QAAQ,WAAW,MAAM,IAAI,oBAAoB,WAAW,UAAU,GAAG,UAAU,QAAQ;AACnG,SAAO,EAAE,QAAQ,iBAAiB,QAAQ,gBAAgB,KAAK,GAAG,WAAW,MAAM;AACrF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medialane/ui",
|
|
3
|
-
"version": "0.107.
|
|
3
|
+
"version": "0.107.1",
|
|
4
4
|
"description": "Shared UI components for Medialane apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"tailwind-merge": ">=2.0.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@medialane/sdk": "0.85.
|
|
79
|
+
"@medialane/sdk": "0.85.5",
|
|
80
80
|
"@radix-ui/react-checkbox": "^1.3.8",
|
|
81
81
|
"@radix-ui/react-collapsible": "^1.1.17",
|
|
82
82
|
"@radix-ui/react-dialog": "^1.1.20",
|