@tightknitai/block-kitchen 0.10.25 → 0.10.26

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
@@ -580,7 +580,10 @@ const shareVariant: PaletteVariant = {
580
580
  };
581
581
  ```
582
582
 
583
- A locked variant without `onLockedSelect` is inert. In the mobile sheet,
583
+ Pass `badge.className` to restyle the tag to match your app (for example
584
+ your plan badges' colors); it's merged over the defaults, so a conflicting
585
+ Tailwind class replaces the built-in one. A locked variant without
586
+ `onLockedSelect` is inert. In the mobile sheet,
584
587
  picking one closes the sheet first, so whatever the host opens isn't stacked
585
588
  on top of it.
586
589
 
@@ -1,5 +1,5 @@
1
- import { S as SupportedBlock } from './palette-DTE9U5si.cjs';
2
- export { ad as SupportedBlockType } from './palette-DTE9U5si.cjs';
1
+ import { S as SupportedBlock } from './palette-Cnz2jz8O.cjs';
2
+ export { ad as SupportedBlockType } from './palette-Cnz2jz8O.cjs';
3
3
  import 'react';
4
4
  import 'slack-web-api-client';
5
5
 
package/dist/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as SupportedBlock } from './palette-DTE9U5si.js';
2
- export { ad as SupportedBlockType } from './palette-DTE9U5si.js';
1
+ import { S as SupportedBlock } from './palette-Cnz2jz8O.js';
2
+ export { ad as SupportedBlockType } from './palette-Cnz2jz8O.js';
3
3
  import 'react';
4
4
  import 'slack-web-api-client';
5
5
 
package/dist/index.cjs CHANGED
@@ -4504,7 +4504,7 @@ function PaletteItem({
4504
4504
  {
4505
4505
  ref: setNodeRef,
4506
4506
  className: cn(
4507
- "group flex items-center gap-2 rounded px-2 py-1 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground has-[:focus-visible]:bg-accent has-[:focus-visible]:text-foreground",
4507
+ "group flex items-start gap-2 rounded px-2 py-1 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground has-[:focus-visible]:bg-accent has-[:focus-visible]:text-foreground",
4508
4508
  isDragging && "opacity-50"
4509
4509
  ),
4510
4510
  children: [
@@ -4512,16 +4512,12 @@ function PaletteItem({
4512
4512
  "div",
4513
4513
  {
4514
4514
  ref: setActivatorNodeRef,
4515
- className: "-my-1 flex min-w-0 flex-1 cursor-grab items-center gap-2 rounded py-1 active:cursor-grabbing focus-visible:outline-none",
4515
+ className: "-my-1 flex min-w-0 flex-1 cursor-grab items-start gap-2 rounded py-1 active:cursor-grabbing focus-visible:outline-none",
4516
4516
  ...attributes,
4517
4517
  ...listeners,
4518
4518
  children: [
4519
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVertical, { className: "h-3.5 w-3.5 shrink-0" }),
4520
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: variant.label }),
4521
- variant.badge ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4522
- " ",
4523
- /* @__PURE__ */ jsxRuntime.jsx(VariantBadge, { badge: variant.badge })
4524
- ] }) : null
4519
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVertical, { className: "mt-[3px] h-3.5 w-3.5 shrink-0" }),
4520
+ /* @__PURE__ */ jsxRuntime.jsx(RailLabel, { variant })
4525
4521
  ]
4526
4522
  }
4527
4523
  ),
@@ -4546,13 +4542,15 @@ function LockedPaletteItem({
4546
4542
  }) {
4547
4543
  const select = variant.onLockedSelect;
4548
4544
  const className = cn(
4549
- "flex w-full items-center text-left text-muted-foreground",
4550
- isSheet ? "min-h-11 gap-3 rounded-md px-3 py-2 text-sm font-medium" : "gap-2 rounded px-2 py-1 text-sm"
4545
+ "flex w-full text-left text-muted-foreground",
4546
+ isSheet ? "min-h-11 items-center gap-3 rounded-md px-3 py-2 text-sm font-medium" : "items-start gap-2 rounded px-2 py-1 text-sm"
4551
4547
  );
4552
4548
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4553
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { "aria-hidden": true, className: cn("shrink-0", isSheet ? "h-4 w-4" : "h-3.5 w-3.5") }),
4554
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", children: variant.label }),
4555
- variant.badge ? /* @__PURE__ */ jsxRuntime.jsx(VariantBadge, { badge: variant.badge }) : null
4549
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { "aria-hidden": true, className: cn("shrink-0", isSheet ? "h-4 w-4" : "mt-[3px] h-3.5 w-3.5") }),
4550
+ isSheet ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4551
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate", children: variant.label }),
4552
+ variant.badge ? /* @__PURE__ */ jsxRuntime.jsx(VariantBadge, { badge: variant.badge }) : null
4553
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(RailLabel, { variant })
4556
4554
  ] });
4557
4555
  if (!select) {
4558
4556
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-disabled": "true", className, children: content });
@@ -4574,12 +4572,31 @@ function LockedPaletteItem({
4574
4572
  }
4575
4573
  );
4576
4574
  }
4575
+ function RailLabel({ variant }) {
4576
+ if (!variant.badge) {
4577
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: variant.label });
4578
+ }
4579
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-col items-start gap-0.5", children: [
4580
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-full truncate", children: variant.label }),
4581
+ " ",
4582
+ /* @__PURE__ */ jsxRuntime.jsx(VariantBadge, { badge: variant.badge })
4583
+ ] });
4584
+ }
4577
4585
  function VariantBadge({ badge }) {
4578
4586
  const Icon = badge.icon;
4579
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex shrink-0 items-center gap-1 rounded-full border bg-background px-1.5 text-[10px] font-medium leading-4 text-muted-foreground", children: [
4580
- Icon ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": true, className: "h-2.5 w-2.5 shrink-0" }) : null,
4581
- badge.label
4582
- ] });
4587
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4588
+ "span",
4589
+ {
4590
+ className: cn(
4591
+ "inline-flex shrink-0 items-center gap-1 rounded-full border bg-background px-1.5 text-[10px] font-medium leading-4 text-muted-foreground",
4592
+ badge.className
4593
+ ),
4594
+ children: [
4595
+ Icon ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { "aria-hidden": true, className: "h-2.5 w-2.5 shrink-0" }) : null,
4596
+ badge.label
4597
+ ]
4598
+ }
4599
+ );
4583
4600
  }
4584
4601
  function SendDialog({
4585
4602
  open,