@rogieking/figui3 6.23.4 → 6.24.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/README.md +18 -4
- package/components.css +38 -23
- package/dist/components.css +1 -1
- package/dist/fig-editor.css +1 -1
- package/dist/fig-editor.js +1 -1
- package/dist/fig-lab.css +1 -1
- package/dist/fig-lab.js +3 -3
- package/dist/fig.css +1 -1
- package/dist/fig.js +3 -3
- package/fig-editor.js +1 -1
- package/fig-lab.css +89 -0
- package/fig-lab.js +8 -0
- package/fig.js +10 -9
- package/package.json +1 -1
package/fig-lab.js
CHANGED
|
@@ -25,6 +25,14 @@ function figLabUniqueId(prefix = "fig-lab") {
|
|
|
25
25
|
return `${prefix}-${figLabUniqueIdCounter}`;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/* Presentation-only composition surface for AI prompt controls. */
|
|
29
|
+
class FigAiPrompt extends HTMLElement {}
|
|
30
|
+
figLabDefineElement("fig-ai-prompt", FigAiPrompt);
|
|
31
|
+
|
|
32
|
+
/* Presentation-only message surface for AI conversations. */
|
|
33
|
+
class FigChatMessage extends HTMLElement {}
|
|
34
|
+
figLabDefineElement("fig-chat-message", FigChatMessage);
|
|
35
|
+
|
|
28
36
|
/* Field + Switch wrapper */
|
|
29
37
|
class PropskitSwitch extends HTMLElement {
|
|
30
38
|
#field = null;
|
package/fig.js
CHANGED
|
@@ -5425,7 +5425,7 @@ class FigSelect extends HTMLElement {
|
|
|
5425
5425
|
return (
|
|
5426
5426
|
node?.nodeType === 1 &&
|
|
5427
5427
|
(node.tagName === "FIG-SELECT-OPTION" ||
|
|
5428
|
-
node.tagName === "FIG-
|
|
5428
|
+
node.tagName === "FIG-SEPARATOR" ||
|
|
5429
5429
|
node.tagName === "FIG-SELECT-OPTIONS")
|
|
5430
5430
|
);
|
|
5431
5431
|
}
|
|
@@ -14522,7 +14522,7 @@ class FigEasingCurve extends HTMLElement {
|
|
|
14522
14522
|
if (!this.#isEditEnabled() && !p.value && !p.spring) continue;
|
|
14523
14523
|
if (p.group !== currentGroup) {
|
|
14524
14524
|
if (p.group) {
|
|
14525
|
-
optionsHTML += `<fig-
|
|
14525
|
+
optionsHTML += `<fig-separator label="${FigEasingCurve.#escapeAttribute(p.group)}"></fig-separator>`;
|
|
14526
14526
|
}
|
|
14527
14527
|
currentGroup = p.group;
|
|
14528
14528
|
}
|
|
@@ -19350,10 +19350,10 @@ class FigMenuItem extends HTMLElement {
|
|
|
19350
19350
|
figDefineElement("fig-menu-item", FigMenuItem);
|
|
19351
19351
|
|
|
19352
19352
|
/**
|
|
19353
|
-
* Visual divider between
|
|
19353
|
+
* Visual divider between content groups.
|
|
19354
19354
|
* @attr {string} label - Optional group label shown in secondary text under the line.
|
|
19355
19355
|
*/
|
|
19356
|
-
class
|
|
19356
|
+
class FigSeparator extends HTMLElement {
|
|
19357
19357
|
static get observedAttributes() {
|
|
19358
19358
|
return ["label"];
|
|
19359
19359
|
}
|
|
@@ -19385,7 +19385,7 @@ class FigMenuSeparator extends HTMLElement {
|
|
|
19385
19385
|
else this.removeAttribute("aria-label");
|
|
19386
19386
|
}
|
|
19387
19387
|
}
|
|
19388
|
-
figDefineElement("fig-
|
|
19388
|
+
figDefineElement("fig-separator", FigSeparator);
|
|
19389
19389
|
|
|
19390
19390
|
class FigMenu extends HTMLElement {
|
|
19391
19391
|
#popup = null;
|
|
@@ -19464,7 +19464,7 @@ class FigMenu extends HTMLElement {
|
|
|
19464
19464
|
this.#popup.removeEventListener("close", this.#boundPopupClose);
|
|
19465
19465
|
const items = Array.from(
|
|
19466
19466
|
this.#panel?.querySelectorAll(
|
|
19467
|
-
":scope > fig-menu-item, :scope > fig-
|
|
19467
|
+
":scope > fig-menu-item, :scope > fig-separator",
|
|
19468
19468
|
) ?? [],
|
|
19469
19469
|
);
|
|
19470
19470
|
for (const item of items) this.insertBefore(item, this.#popup);
|
|
@@ -19507,7 +19507,7 @@ class FigMenu extends HTMLElement {
|
|
|
19507
19507
|
#detectTrigger() {
|
|
19508
19508
|
this.#trigger =
|
|
19509
19509
|
this.querySelector("[fig-menu-trigger]") ||
|
|
19510
|
-
this.querySelector(":scope > :not(fig-menu-item):not(fig-
|
|
19510
|
+
this.querySelector(":scope > :not(fig-menu-item):not(fig-separator)");
|
|
19511
19511
|
}
|
|
19512
19512
|
|
|
19513
19513
|
#usesContextMenuTrigger() {
|
|
@@ -19547,7 +19547,7 @@ class FigMenu extends HTMLElement {
|
|
|
19547
19547
|
#moveItemsToPopup() {
|
|
19548
19548
|
if (!this.#panel) return;
|
|
19549
19549
|
const items = Array.from(this.querySelectorAll(
|
|
19550
|
-
":scope > fig-menu-item, :scope > fig-
|
|
19550
|
+
":scope > fig-menu-item, :scope > fig-separator"
|
|
19551
19551
|
));
|
|
19552
19552
|
for (const item of items) {
|
|
19553
19553
|
this.#panel.appendChild(item);
|
|
@@ -19587,7 +19587,8 @@ class FigMenu extends HTMLElement {
|
|
|
19587
19587
|
for (const node of mutation.addedNodes) {
|
|
19588
19588
|
if (node.nodeType !== 1 || node === this.#popup) continue;
|
|
19589
19589
|
if (
|
|
19590
|
-
(node.tagName === "FIG-MENU-ITEM" ||
|
|
19590
|
+
(node.tagName === "FIG-MENU-ITEM" ||
|
|
19591
|
+
node.tagName === "FIG-SEPARATOR") &&
|
|
19591
19592
|
node.parentElement === this
|
|
19592
19593
|
) {
|
|
19593
19594
|
this.#panel?.appendChild(node);
|
package/package.json
CHANGED