@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/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-MENU-SEPARATOR" ||
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-menu-separator label="${FigEasingCurve.#escapeAttribute(p.group)}"></fig-menu-separator>`;
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 menu item groups.
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 FigMenuSeparator extends HTMLElement {
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-menu-separator", FigMenuSeparator);
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-menu-separator",
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-menu-separator)");
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-menu-separator"
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" || node.tagName === "FIG-MENU-SEPARATOR") &&
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "6.23.4",
3
+ "version": "6.24.1",
4
4
  "description": "A lightweight web components library for building Figma plugin and widget UIs with native look and feel",
5
5
  "author": "Rogie King",
6
6
  "license": "MIT",