@stackable-labs/sdk-extension-contracts 1.99.0 → 1.100.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/index.d.ts +12 -5
- package/dist/index.js +17 -15
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -228,6 +228,17 @@ declare const UI_TAG_DEFINITIONS: {
|
|
|
228
228
|
readonly size: readonly ["sm", "md", "lg"];
|
|
229
229
|
};
|
|
230
230
|
};
|
|
231
|
+
readonly 'ui-qr-code': {
|
|
232
|
+
readonly description: "QR code rendered from a string payload";
|
|
233
|
+
readonly icon: "qr-code";
|
|
234
|
+
readonly category: "composite";
|
|
235
|
+
readonly attributes: readonly ["value", "size", "variant", "level", "alt", "className"];
|
|
236
|
+
readonly attributeValues: {
|
|
237
|
+
readonly size: readonly ["sm", "md", "lg"];
|
|
238
|
+
readonly variant: readonly ["default", "inverted"];
|
|
239
|
+
readonly level: readonly ["low", "medium", "quartile", "high"];
|
|
240
|
+
};
|
|
241
|
+
};
|
|
231
242
|
readonly 'ui-link': {
|
|
232
243
|
readonly description: "Hyperlink element";
|
|
233
244
|
readonly icon: "link";
|
|
@@ -322,16 +333,12 @@ declare const UI_TAG_CHILDREN: Partial<Record<UITag, readonly UITag[]>>;
|
|
|
322
333
|
declare const UI_TAG_COMPOUND: Partial<Record<UITag, readonly UITag[]>>;
|
|
323
334
|
/** Category for each UI tag — used for grouping in stories and palettes. */
|
|
324
335
|
declare const UI_TAG_CATEGORIES: Record<UITag, UITagCategory>;
|
|
325
|
-
/**
|
|
326
|
-
* Convert a UI tag to its PascalCase component name.
|
|
327
|
-
* e.g., 'ui-card-content' → 'CardContent'
|
|
328
|
-
*/
|
|
329
336
|
declare const tagToComponentName: (tag: UITag) => string;
|
|
330
337
|
/**
|
|
331
338
|
* Supported icon names (subset of lucide-react).
|
|
332
339
|
* Extensions reference icons by name; host renders the actual icon component.
|
|
333
340
|
*/
|
|
334
|
-
declare const ALLOWED_ICONS: readonly ["arrow-left", "calendar", "check-circle-2", "chevron-left", "chevron-right", "clock", "credit-card", "external-link", "help-circle", "info", "loader-2", "mail", "map-pin", "message-circle", "message-square", "package", "phone", "search", "shopping-bag", "sparkles", "truck", "user", "x-circle", "alert-circle", "book-open"];
|
|
341
|
+
declare const ALLOWED_ICONS: readonly ["arrow-left", "calendar", "check-circle-2", "chevron-left", "chevron-right", "clock", "credit-card", "external-link", "help-circle", "info", "loader-2", "mail", "map-pin", "message-circle", "message-square", "package", "phone", "search", "shopping-bag", "sparkles", "truck", "user", "x-circle", "alert-circle", "book-open", "qr-code"];
|
|
335
342
|
type AllowedIconName = (typeof ALLOWED_ICONS)[number];
|
|
336
343
|
|
|
337
344
|
/**
|
package/dist/index.js
CHANGED
|
@@ -9,19 +9,6 @@ var CUSTOM_ROLE = {
|
|
|
9
9
|
};
|
|
10
10
|
new Set(Object.values(CUSTOM_ROLE));
|
|
11
11
|
|
|
12
|
-
// ../../../lib/contracts/src/permissions.ts
|
|
13
|
-
var ORG_ROLE = {
|
|
14
|
-
ADMIN: "org:admin",
|
|
15
|
-
MEMBER: "org:member"
|
|
16
|
-
};
|
|
17
|
-
var EDITOR_ROLES = [
|
|
18
|
-
ORG_ROLE.ADMIN
|
|
19
|
-
];
|
|
20
|
-
[
|
|
21
|
-
...Object.values(EDITOR_ROLES),
|
|
22
|
-
ORG_ROLE.MEMBER
|
|
23
|
-
];
|
|
24
|
-
|
|
25
12
|
// ../../../lib/contracts/src/marketplace.ts
|
|
26
13
|
var EXTENSION_CATEGORY = {
|
|
27
14
|
COMMERCE: "commerce",
|
|
@@ -229,6 +216,17 @@ var UI_TAG_DEFINITIONS = {
|
|
|
229
216
|
size: ["sm", "md", "lg"]
|
|
230
217
|
}
|
|
231
218
|
},
|
|
219
|
+
"ui-qr-code": {
|
|
220
|
+
description: "QR code rendered from a string payload",
|
|
221
|
+
icon: "qr-code",
|
|
222
|
+
category: "composite",
|
|
223
|
+
attributes: ["value", "size", "variant", "level", "alt", "className"],
|
|
224
|
+
attributeValues: {
|
|
225
|
+
size: ["sm", "md", "lg"],
|
|
226
|
+
variant: ["default", "inverted"],
|
|
227
|
+
level: ["low", "medium", "quartile", "high"]
|
|
228
|
+
}
|
|
229
|
+
},
|
|
232
230
|
"ui-link": {
|
|
233
231
|
description: "Hyperlink element",
|
|
234
232
|
icon: "link",
|
|
@@ -313,7 +311,10 @@ var UI_TAG_COMPOUND = {
|
|
|
313
311
|
var UI_TAG_CATEGORIES = Object.fromEntries(
|
|
314
312
|
UI_TAGS.map((tag) => [tag, defs[tag].category])
|
|
315
313
|
);
|
|
316
|
-
var
|
|
314
|
+
var TAG_NAME_OVERRIDES = {
|
|
315
|
+
"ui-qr-code": "QRCode"
|
|
316
|
+
};
|
|
317
|
+
var tagToComponentName = (tag) => TAG_NAME_OVERRIDES[tag] ?? tag.replace(/^ui-/, "").split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
317
318
|
var ALLOWED_ICONS = [
|
|
318
319
|
"arrow-left",
|
|
319
320
|
"calendar",
|
|
@@ -339,7 +340,8 @@ var ALLOWED_ICONS = [
|
|
|
339
340
|
"user",
|
|
340
341
|
"x-circle",
|
|
341
342
|
"alert-circle",
|
|
342
|
-
"book-open"
|
|
343
|
+
"book-open",
|
|
344
|
+
"qr-code"
|
|
343
345
|
];
|
|
344
346
|
|
|
345
347
|
// src/capabilities.ts
|