@rogieking/figui3 8.4.0 → 8.5.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.
package/fig-lab.css CHANGED
@@ -76,6 +76,34 @@ fig-ai-prompt {
76
76
  }
77
77
  }
78
78
 
79
+ fig-ai-context {
80
+ --fig-ai-context-margin-inline: var(--spacer-3);
81
+
82
+ display: flex;
83
+ flex-direction: column;
84
+ gap: var(--spacer-2);
85
+ box-sizing: border-box;
86
+ width: calc(
87
+ 100% - var(--fig-ai-context-margin-inline) -
88
+ var(--fig-ai-context-margin-inline)
89
+ );
90
+ margin-inline: var(--fig-ai-context-margin-inline);
91
+ padding: var(--spacer-2) var(--spacer-2-5);
92
+ padding-bottom: var(--spacer-4);
93
+ border: 1px solid var(--figma-color-border);
94
+ border-bottom: none;
95
+ border-radius: var(--radius-large) var(--radius-large) 0 0;
96
+ color: var(--figma-color-text);
97
+
98
+ &>fig-attachments{
99
+ margin-inline: calc(-1 * var(--spacer-1));
100
+ }
101
+ }
102
+
103
+ fig-ai-context:has(+ fig-ai-prompt) {
104
+ margin-bottom: calc(-1 * var(--spacer-3));
105
+ }
106
+
79
107
  fig-attachments {
80
108
  display: flex;
81
109
  flex-wrap: wrap;
package/fig-lab.js CHANGED
@@ -241,6 +241,10 @@ function figLabUniqueId(prefix = "fig-lab") {
241
241
  class FigAiPrompt extends HTMLElement {}
242
242
  figLabDefineElement("fig-ai-prompt", FigAiPrompt);
243
243
 
244
+ /* Presentation-only open container for attachments and status rows above a prompt. */
245
+ class FigAiContext extends HTMLElement {}
246
+ figLabDefineElement("fig-ai-context", FigAiContext);
247
+
244
248
  /* Presentation-only message surface for AI conversations. */
245
249
  class FigChatMessage extends HTMLElement {}
246
250
  figLabDefineElement("fig-chat-message", FigChatMessage);
package/fig.js CHANGED
@@ -8741,7 +8741,15 @@ class FigInputFill extends HTMLElement {
8741
8741
  })
8742
8742
  .join(", ");
8743
8743
  const interpolation = gradientInterpolationClause(this.#gradient);
8744
- return `linear-gradient(${this.#gradient.angle}deg${interpolation ? ` ${interpolation}` : ""}, ${stops})`;
8744
+ const interpolationSuffix = interpolation ? ` ${interpolation}` : "";
8745
+ switch (this.#gradient.type) {
8746
+ case "radial":
8747
+ return `radial-gradient(circle${interpolationSuffix}, ${stops})`;
8748
+ case "angular":
8749
+ return `conic-gradient(from ${this.#gradient.angle}deg${interpolationSuffix}, ${stops})`;
8750
+ default:
8751
+ return `linear-gradient(${this.#gradient.angle}deg${interpolationSuffix}, ${stops})`;
8752
+ }
8745
8753
  }
8746
8754
  case "image":
8747
8755
  return this.#image.url ? `url(${this.#image.url})` : "#D9D9D9";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "8.4.0",
3
+ "version": "8.5.0",
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",