@rogieking/figui3 2.33.0 → 2.33.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.
Files changed (3) hide show
  1. package/README.md +64 -6
  2. package/package.json +1 -2
  3. package/index.html +0 -5040
package/README.md CHANGED
@@ -9,7 +9,7 @@ A lightweight, zero-dependency web components library for building Figma plugin
9
9
 
10
10
  View the interactive component documentation at **[rogie.github.io/figui3](https://rogie.github.io/figui3/)**
11
11
 
12
- The demo page (`index.html`) is included in the npm package, so you can also open it locally after installing.
12
+ The docs page source is kept in this repo as `old.html` for reference and local testing.
13
13
 
14
14
  ## Features
15
15
 
@@ -64,6 +64,24 @@ cd figui3
64
64
  bun install
65
65
  bun dev # Core component docs at http://localhost:3000
66
66
  npm run dev:playground # Interactive playground app (routes: /figui3, /propkit)
67
+ npm run build:playground # Build playground app
68
+ bun build # Build dist/fig.js
69
+ ```
70
+
71
+ ### Playground (`/figui3` and `/propkit`)
72
+
73
+ The playground app is the fastest way to author and validate component markup.
74
+
75
+ - **`/figui3`**: component-focused examples and attribute controls for FigUI3 primitives.
76
+ - **`/propkit`**: property-panel patterns composed from FigUI3 controls.
77
+ - Live preview, attributes editing, and code view stay synchronized.
78
+ - Attribute controls write real component markup and preserve internal-only playground metadata where needed.
79
+
80
+ Open locally:
81
+
82
+ ```bash
83
+ npm run dev:playground
84
+ # then visit http://localhost:5173/figui3 or http://localhost:5173/propkit
67
85
  ```
68
86
 
69
87
  ## Quick Start
@@ -216,6 +234,42 @@ A modal dialog component with drag support.
216
234
 
217
235
  ---
218
236
 
237
+ ### Popup (`<fig-popup>`)
238
+
239
+ An anchored floating surface built on `<dialog>`, with collision-aware positioning and optional popover beak styling.
240
+
241
+ | Attribute | Type | Default | Description |
242
+ |-----------|------|---------|-------------|
243
+ | `anchor` | string | — | CSS selector for the anchor element |
244
+ | `position` | string | `"top center"` | Placement (`"top"`, `"left"`, `"center right"`, etc.) |
245
+ | `offset` | string | `"0 0"` | X/Y offset in px-like tokens (`"8 8"`) |
246
+ | `viewport-margin` | string | `"8"` | Viewport safety margin (CSS shorthand style) |
247
+ | `variant` | string | — | Use `"popover"` to render a beak |
248
+ | `theme` | string | — | `"light"`, `"dark"`, or `"menu"` |
249
+ | `closedby` | string | `"any"` | Dismiss behavior: `"any"`, `"closerequest"`, `"none"` |
250
+ | `open` | boolean/string | `false` | Open when present and not `"false"` |
251
+
252
+ ```html
253
+ <fig-button id="popup-anchor" onclick="const p=document.getElementById('demo-popup'); p.toggleAttribute('open');">
254
+ Toggle popup
255
+ </fig-button>
256
+
257
+ <dialog
258
+ id="demo-popup"
259
+ is="fig-popup"
260
+ anchor="#popup-anchor"
261
+ position="center right"
262
+ offset="8 8"
263
+ viewport-margin="8"
264
+ variant="popover"
265
+ closedby="none"
266
+ >
267
+ <fig-header><h3>Popup</h3></fig-header>
268
+ </dialog>
269
+ ```
270
+
271
+ ---
272
+
219
273
  ### Tabs (`<fig-tabs>` / `<fig-tab>`)
220
274
 
221
275
  Tabbed navigation component.
@@ -530,6 +584,7 @@ A form field wrapper with flexible layout. Automatically links `<label>` element
530
584
  | Attribute | Type | Default | Description |
531
585
  |-----------|------|---------|-------------|
532
586
  | `direction` | string | `"column"` | Layout: `"column"`, `"row"`, `"horizontal"` |
587
+ | `columns` | string | — | Optional horizontal split preset: `"thirds"` or `"half"` |
533
588
  | `label` | string | — | Programmatically set the label text |
534
589
 
535
590
  ```html
@@ -544,6 +599,12 @@ A form field wrapper with flexible layout. Automatically links `<label>` element
544
599
  <label>Volume</label>
545
600
  <fig-slider min="0" max="100" value="50"></fig-slider>
546
601
  </fig-field>
602
+
603
+ <!-- Horizontal with 1/3 + 2/3 split -->
604
+ <fig-field direction="horizontal" columns="thirds">
605
+ <label>Opacity</label>
606
+ <fig-slider value="50"></fig-slider>
607
+ </fig-field>
547
608
  ```
548
609
 
549
610
  ---
@@ -675,16 +736,13 @@ A toast notification component.
675
736
  | `duration` | number | `5000` | Auto-dismiss ms (0 = no dismiss) |
676
737
  | `offset` | number | `16` | Distance from bottom |
677
738
  | `theme` | string | `"dark"` | Theme: `"dark"`, `"light"`, `"danger"`, `"brand"` |
678
- | `open` | boolean | `false` | Whether visible |
679
739
 
680
740
  ```html
741
+ <fig-button onclick="document.getElementById('myToast').showToast()">Show toast</fig-button>
742
+
681
743
  <fig-toast id="myToast" theme="brand" duration="3000">
682
744
  Settings saved successfully!
683
745
  </fig-toast>
684
-
685
- <script>
686
- document.getElementById('myToast').show();
687
- </script>
688
746
  ```
689
747
 
690
748
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "2.33.0",
3
+ "version": "2.33.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",
@@ -19,7 +19,6 @@
19
19
  "fig.css",
20
20
  "base.css",
21
21
  "components.css",
22
- "index.html",
23
22
  "dist/",
24
23
  ".cursor/skills/",
25
24
  "README.md",