@designa8/vibedesign-linear-internal-v1-b737 0.13.3 → 0.13.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @designa8/vibedesign-linear-internal-v1-b737
2
2
 
3
- Complete design system generated by Atoms Design, version **0.13.3**.
3
+ Complete design system generated by Atoms Design, version **0.13.4**.
4
4
  Tokens, atoms, molecules, organisms, and templates — import from the package root;
5
5
  never hardcode visual values in consumer code.
6
6
 
package/dist/index.cjs CHANGED
@@ -11029,7 +11029,6 @@ var PromptInputBar = React90.forwardRef(
11029
11029
  const [internalImages, setInternalImages] = React90.useState(
11030
11030
  []
11031
11031
  );
11032
- const [internalModelId, setInternalModelId] = React90.useState(void 0);
11033
11032
  const [menuOpen, setMenuOpen] = React90.useState(false);
11034
11033
  const [menuPos, setMenuPos] = React90.useState(null);
11035
11034
  const [mounted, setMounted] = React90.useState(false);
@@ -11058,8 +11057,7 @@ var PromptInputBar = React90.forwardRef(
11058
11057
  React90.useEffect(() => {
11059
11058
  if (selectedModelId !== void 0) setPickedModelId(selectedModelId);
11060
11059
  }, [selectedModelId]);
11061
- const activeModelId = pickedModelId ?? internalModelId;
11062
- const currentModel = models?.find((m) => m.id === activeModelId) ?? models?.[0];
11060
+ const currentModel = models?.find((m) => m.id === pickedModelId) ?? models?.[0];
11063
11061
  const prefersReducedMotion = React90.useCallback(
11064
11062
  () => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches,
11065
11063
  []
@@ -11274,11 +11272,8 @@ var PromptInputBar = React90.forwardRef(
11274
11272
  return;
11275
11273
  }
11276
11274
  setPickedModelId(model.id);
11277
- if (selectedModelId === void 0) setInternalModelId(model.id);
11278
11275
  onModelChange?.(model.id);
11279
- window.requestAnimationFrame(() => {
11280
- menuPanelRef.current?.querySelector('[data-menu-item][aria-checked="true"]')?.focus({ preventScroll: true });
11281
- });
11276
+ closeMenu();
11282
11277
  };
11283
11278
  const handleMenuKeyDown = (e) => {
11284
11279
  if (e.key === "Escape") {
@@ -11317,7 +11312,7 @@ var PromptInputBar = React90.forwardRef(
11317
11312
  ref: menuPanelRef,
11318
11313
  id: `${uid}-menu`,
11319
11314
  role: "menu",
11320
- "aria-label": `Prompt options. Current model: ${currentModel?.name ?? "none"}`,
11315
+ "aria-label": "Prompt options",
11321
11316
  "aria-hidden": menuOpen ? void 0 : true,
11322
11317
  "data-state": menuOpen ? "open" : "closed",
11323
11318
  inert: !menuOpen,
@@ -11459,13 +11454,13 @@ var PromptInputBar = React90.forwardRef(
11459
11454
  inert: isRecording,
11460
11455
  className: ROW_LAYER,
11461
11456
  children: [
11462
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
11463
- IconButton,
11457
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
11458
+ Button,
11464
11459
  {
11465
11460
  ref: plusRef,
11466
- icon: "plus",
11467
- size: "lg",
11461
+ iconOnly: true,
11468
11462
  variant: "soft",
11463
+ size: "lg",
11469
11464
  "aria-label": triggerLabel,
11470
11465
  "aria-haspopup": "menu",
11471
11466
  "aria-expanded": menuOpen,
@@ -11477,7 +11472,11 @@ var PromptInputBar = React90.forwardRef(
11477
11472
  ROUND,
11478
11473
  "shrink-0 transition-transform duration-200 ease-out",
11479
11474
  menuOpen && "rotate-45"
11480
- )
11475
+ ),
11476
+ children: [
11477
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { name: "plus", size: 18 }),
11478
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "sr-only", children: currentModel?.name ?? "" })
11479
+ ]
11481
11480
  }
11482
11481
  ),
11483
11482
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
package/dist/index.js CHANGED
@@ -10883,7 +10883,6 @@ var PromptInputBar = React90.forwardRef(
10883
10883
  const [internalImages, setInternalImages] = React90.useState(
10884
10884
  []
10885
10885
  );
10886
- const [internalModelId, setInternalModelId] = React90.useState(void 0);
10887
10886
  const [menuOpen, setMenuOpen] = React90.useState(false);
10888
10887
  const [menuPos, setMenuPos] = React90.useState(null);
10889
10888
  const [mounted, setMounted] = React90.useState(false);
@@ -10912,8 +10911,7 @@ var PromptInputBar = React90.forwardRef(
10912
10911
  React90.useEffect(() => {
10913
10912
  if (selectedModelId !== void 0) setPickedModelId(selectedModelId);
10914
10913
  }, [selectedModelId]);
10915
- const activeModelId = pickedModelId ?? internalModelId;
10916
- const currentModel = models?.find((m) => m.id === activeModelId) ?? models?.[0];
10914
+ const currentModel = models?.find((m) => m.id === pickedModelId) ?? models?.[0];
10917
10915
  const prefersReducedMotion = React90.useCallback(
10918
10916
  () => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches,
10919
10917
  []
@@ -11128,11 +11126,8 @@ var PromptInputBar = React90.forwardRef(
11128
11126
  return;
11129
11127
  }
11130
11128
  setPickedModelId(model.id);
11131
- if (selectedModelId === void 0) setInternalModelId(model.id);
11132
11129
  onModelChange?.(model.id);
11133
- window.requestAnimationFrame(() => {
11134
- menuPanelRef.current?.querySelector('[data-menu-item][aria-checked="true"]')?.focus({ preventScroll: true });
11135
- });
11130
+ closeMenu();
11136
11131
  };
11137
11132
  const handleMenuKeyDown = (e) => {
11138
11133
  if (e.key === "Escape") {
@@ -11171,7 +11166,7 @@ var PromptInputBar = React90.forwardRef(
11171
11166
  ref: menuPanelRef,
11172
11167
  id: `${uid}-menu`,
11173
11168
  role: "menu",
11174
- "aria-label": `Prompt options. Current model: ${currentModel?.name ?? "none"}`,
11169
+ "aria-label": "Prompt options",
11175
11170
  "aria-hidden": menuOpen ? void 0 : true,
11176
11171
  "data-state": menuOpen ? "open" : "closed",
11177
11172
  inert: !menuOpen,
@@ -11313,13 +11308,13 @@ var PromptInputBar = React90.forwardRef(
11313
11308
  inert: isRecording,
11314
11309
  className: ROW_LAYER,
11315
11310
  children: [
11316
- /* @__PURE__ */ jsx90(
11317
- IconButton,
11311
+ /* @__PURE__ */ jsxs82(
11312
+ Button,
11318
11313
  {
11319
11314
  ref: plusRef,
11320
- icon: "plus",
11321
- size: "lg",
11315
+ iconOnly: true,
11322
11316
  variant: "soft",
11317
+ size: "lg",
11323
11318
  "aria-label": triggerLabel,
11324
11319
  "aria-haspopup": "menu",
11325
11320
  "aria-expanded": menuOpen,
@@ -11331,7 +11326,11 @@ var PromptInputBar = React90.forwardRef(
11331
11326
  ROUND,
11332
11327
  "shrink-0 transition-transform duration-200 ease-out",
11333
11328
  menuOpen && "rotate-45"
11334
- )
11329
+ ),
11330
+ children: [
11331
+ /* @__PURE__ */ jsx90(Icon, { name: "plus", size: 18 }),
11332
+ /* @__PURE__ */ jsx90("span", { className: "sr-only", children: currentModel?.name ?? "" })
11333
+ ]
11335
11334
  }
11336
11335
  ),
11337
11336
  /* @__PURE__ */ jsx90(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-linear-internal-v1-b737",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "description": "Complete design system \"My Project linear-internal-v1\" generated by Atoms Design.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -216,9 +216,6 @@ export const PromptInputBar = React.forwardRef<
216
216
  const [internalImages, setInternalImages] = React.useState<PastedImage[]>(
217
217
  [],
218
218
  );
219
- const [internalModelId, setInternalModelId] = React.useState<
220
- string | undefined
221
- >(undefined);
222
219
  const [menuOpen, setMenuOpen] = React.useState(false);
223
220
  const [menuPos, setMenuPos] = React.useState<{
224
221
  top: number;
@@ -255,8 +252,8 @@ export const PromptInputBar = React.forwardRef<
255
252
  suggestDesigns !== undefined ? suggestDesigns : internalSuggest;
256
253
  const hasModels = Boolean(models && models.length > 0);
257
254
 
258
- /* The tick has to move the instant a row is picked, even before a controlled
259
- parent echoes the id back, so the picked id is mirrored locally. */
255
+ /* The pick has to read back on the trigger the instant a row is chosen, even
256
+ before a controlled parent echoes the id, so it is mirrored locally. */
260
257
  const [pickedModelId, setPickedModelId] = React.useState<
261
258
  string | undefined
262
259
  >(selectedModelId);
@@ -265,9 +262,8 @@ export const PromptInputBar = React.forwardRef<
265
262
  if (selectedModelId !== undefined) setPickedModelId(selectedModelId);
266
263
  }, [selectedModelId]);
267
264
 
268
- const activeModelId = pickedModelId ?? internalModelId;
269
265
  const currentModel =
270
- models?.find((m) => m.id === activeModelId) ?? models?.[0];
266
+ models?.find((m) => m.id === pickedModelId) ?? models?.[0];
271
267
 
272
268
  const prefersReducedMotion = React.useCallback(
273
269
  () =>
@@ -522,21 +518,14 @@ export const PromptInputBar = React.forwardRef<
522
518
  onSuggestDesignsChange?.(next);
523
519
  };
524
520
 
525
- /* A model picker is a radio list: the tick has to be seen to move, so the
526
- panel stays open on a pick and focus follows the chosen row. */
527
521
  const handleModelSelect = (model: PromptInputBarModel) => {
528
522
  if (model.available === false) {
529
523
  onUnavailableModelClick?.(model.id);
530
524
  return;
531
525
  }
532
526
  setPickedModelId(model.id);
533
- if (selectedModelId === undefined) setInternalModelId(model.id);
534
527
  onModelChange?.(model.id);
535
- window.requestAnimationFrame(() => {
536
- menuPanelRef.current
537
- ?.querySelector<HTMLElement>('[data-menu-item][aria-checked="true"]')
538
- ?.focus({ preventScroll: true });
539
- });
528
+ closeMenu();
540
529
  };
541
530
 
542
531
  /* Arrow keys walk the rows of the open menu, Escape closes it. */
@@ -585,9 +574,7 @@ export const PromptInputBar = React.forwardRef<
585
574
  ref={menuPanelRef}
586
575
  id={`${uid}-menu`}
587
576
  role="menu"
588
- aria-label={`Prompt options. Current model: ${
589
- currentModel?.name ?? "none"
590
- }`}
577
+ aria-label="Prompt options"
591
578
  aria-hidden={menuOpen ? undefined : true}
592
579
  data-state={menuOpen ? "open" : "closed"}
593
580
  inert={!menuOpen}
@@ -746,11 +733,14 @@ export const PromptInputBar = React.forwardRef<
746
733
  inert={isRecording}
747
734
  className={ROW_LAYER}
748
735
  >
749
- <IconButton
736
+ {/* One 36px circle: soft fill, inset hairline ring, ink glyph. The
737
+ model name lives in its label and its hidden text, so a pick
738
+ reads back on the trigger itself. */}
739
+ <Button
750
740
  ref={plusRef}
751
- icon="plus"
752
- size="lg"
741
+ iconOnly
753
742
  variant="soft"
743
+ size="lg"
754
744
  aria-label={triggerLabel}
755
745
  aria-haspopup="menu"
756
746
  aria-expanded={menuOpen}
@@ -763,7 +753,10 @@ export const PromptInputBar = React.forwardRef<
763
753
  "shrink-0 transition-transform duration-200 ease-out",
764
754
  menuOpen && "rotate-45",
765
755
  )}
766
- />
756
+ >
757
+ <Icon name="plus" size={18} />
758
+ <span className="sr-only">{currentModel?.name ?? ""}</span>
759
+ </Button>
767
760
 
768
761
  <Button
769
762
  variant="tint"