@pipe0/react 1.0.37 → 1.0.38

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 (94) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/components/compound/effect-catalog/category-filter.mjs +1 -1
  3. package/dist/components/compound/effect-catalog/category-filter.mjs.map +1 -1
  4. package/dist/components/compound/effect-catalog/search-filter.mjs +1 -1
  5. package/dist/components/compound/effect-catalog/search-filter.mjs.map +1 -1
  6. package/dist/components/compound/pipe-catalog/category-filter.mjs +1 -1
  7. package/dist/components/compound/pipe-catalog/category-filter.mjs.map +1 -1
  8. package/dist/components/compound/pipe-catalog/input-field-filter.mjs +1 -1
  9. package/dist/components/compound/pipe-catalog/input-field-filter.mjs.map +1 -1
  10. package/dist/components/compound/pipe-catalog/output-field-filter.mjs +1 -1
  11. package/dist/components/compound/pipe-catalog/output-field-filter.mjs.map +1 -1
  12. package/dist/components/compound/pipe-catalog/provider-filter.mjs +1 -1
  13. package/dist/components/compound/pipe-catalog/provider-filter.mjs.map +1 -1
  14. package/dist/components/compound/pipe-catalog/search-filter.mjs +1 -1
  15. package/dist/components/compound/pipe-catalog/search-filter.mjs.map +1 -1
  16. package/dist/components/compound/pipe-catalog/tag-filter.mjs +1 -1
  17. package/dist/components/compound/pipe-catalog/tag-filter.mjs.map +1 -1
  18. package/dist/components/compound/search-catalog/category-filter.mjs +1 -1
  19. package/dist/components/compound/search-catalog/category-filter.mjs.map +1 -1
  20. package/dist/components/compound/search-catalog/output-field-filter.mjs +1 -1
  21. package/dist/components/compound/search-catalog/output-field-filter.mjs.map +1 -1
  22. package/dist/components/compound/search-catalog/provider-filter.mjs +1 -1
  23. package/dist/components/compound/search-catalog/provider-filter.mjs.map +1 -1
  24. package/dist/components/compound/search-catalog/search-filter.mjs +1 -1
  25. package/dist/components/compound/search-catalog/search-filter.mjs.map +1 -1
  26. package/dist/components/compound/search-catalog/tag-filter.mjs +1 -1
  27. package/dist/components/compound/search-catalog/tag-filter.mjs.map +1 -1
  28. package/dist/components/defaults/adapters/json-extraction-input.mjs +1 -1
  29. package/dist/components/defaults/adapters/loose-object-input.mjs +1 -1
  30. package/dist/components/defaults/adapters/loose-object-input.mjs.map +1 -1
  31. package/dist/components/defaults/adapters/pipes-run-if-input.mjs +1 -1
  32. package/dist/components/defaults/adapters/prompt-input.mjs +1 -1
  33. package/dist/components/defaults/adapters/providers-input.mjs +1 -2
  34. package/dist/components/defaults/adapters/providers-input.mjs.map +1 -1
  35. package/dist/components/defaults/adapters/select-input.mjs +1 -1
  36. package/dist/components/defaults/adapters/select-input.mjs.map +1 -1
  37. package/dist/components/defaults/adapters/tagged-ordered-multi-create-input.mjs +2 -3
  38. package/dist/components/defaults/adapters/tagged-ordered-multi-create-input.mjs.map +1 -1
  39. package/dist/components/defaults/adapters/tagged-text-input.mjs +1 -1
  40. package/dist/components/defaults/adapters/tagged-text-input.mjs.map +1 -1
  41. package/dist/components/defaults/catalog/active-filter-pill.mjs +1 -1
  42. package/dist/components/defaults/catalog/active-filter-pill.mjs.map +1 -1
  43. package/dist/components/defaults/catalog/card-derived.d.mts.map +1 -1
  44. package/dist/components/defaults/catalog/card-derived.mjs +9 -6
  45. package/dist/components/defaults/catalog/card-derived.mjs.map +1 -1
  46. package/dist/components/defaults/catalog/category-section.d.mts +2 -2
  47. package/dist/components/defaults/catalog/category-section.d.mts.map +1 -1
  48. package/dist/components/defaults/catalog/category-section.mjs +10 -15
  49. package/dist/components/defaults/catalog/category-section.mjs.map +1 -1
  50. package/dist/components/defaults/catalog/provider-avatars.mjs +1 -1
  51. package/dist/components/defaults/catalog/provider-avatars.mjs.map +1 -1
  52. package/dist/components/defaults/layout/field-wrapper.mjs +2 -2
  53. package/dist/components/defaults/layout/field-wrapper.mjs.map +1 -1
  54. package/dist/components/defaults/layout/group.mjs +2 -1
  55. package/dist/components/defaults/layout/group.mjs.map +1 -1
  56. package/dist/components/defaults/layout/section.mjs +5 -8
  57. package/dist/components/defaults/layout/section.mjs.map +1 -1
  58. package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs +1 -1
  59. package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs.map +1 -1
  60. package/dist/components/internal/LiquidEditor/UnifiedReferencePicker.mjs +1 -1
  61. package/dist/components/internal/LiquidEditor/UnifiedReferencePicker.mjs.map +1 -1
  62. package/dist/components/internal/combobox/include-exclude-combobox.mjs +2 -3
  63. package/dist/components/internal/combobox/include-exclude-combobox.mjs.map +1 -1
  64. package/dist/components/internal/combobox/suggest-combobox.mjs +2 -3
  65. package/dist/components/internal/combobox/suggest-combobox.mjs.map +1 -1
  66. package/dist/components/internal/icons.d.mts +14 -0
  67. package/dist/components/internal/icons.d.mts.map +1 -0
  68. package/dist/components/internal/icons.mjs +137 -185
  69. package/dist/components/internal/icons.mjs.map +1 -1
  70. package/dist/components/ui/combobox.mjs +4 -4
  71. package/dist/components/ui/combobox.mjs.map +1 -1
  72. package/dist/components/ui/select.mjs +5 -5
  73. package/dist/components/ui/select.mjs.map +1 -1
  74. package/dist/hooks/use-pipe-catalog-table.d.mts +8 -8
  75. package/dist/hooks/use-search-catalog-table.d.mts +6 -6
  76. package/dist/styles/pipe0-form.css +1 -1
  77. package/dist/utils/catalog-helpers.d.mts +4 -5
  78. package/dist/utils/catalog-helpers.d.mts.map +1 -1
  79. package/dist/utils/catalog-helpers.mjs +4 -4
  80. package/dist/utils/catalog-helpers.mjs.map +1 -1
  81. package/dist/widgets/avatar-group.d.mts +12 -3
  82. package/dist/widgets/avatar-group.d.mts.map +1 -1
  83. package/dist/widgets/avatar-group.mjs +173 -50
  84. package/dist/widgets/avatar-group.mjs.map +1 -1
  85. package/dist/widgets/field-type-badge.d.mts.map +1 -1
  86. package/dist/widgets/field-type-badge.mjs +1 -1
  87. package/dist/widgets/field-type-badge.mjs.map +1 -1
  88. package/dist/widgets/icon-glyph.mjs +2 -3
  89. package/dist/widgets/icon-glyph.mjs.map +1 -1
  90. package/dist/widgets/token-pricing-badge.mjs +1 -1
  91. package/dist/widgets/token-pricing-badge.mjs.map +1 -1
  92. package/package.json +4 -3
  93. package/dist/widgets/glyphs/linkedin.mjs +0 -32
  94. package/dist/widgets/glyphs/linkedin.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @pipe0/elements-react
2
2
 
3
+ ## 1.0.38
4
+
5
+ ### Patch Changes
6
+
7
+ - a7a7d88: feat: add Happenstance network search, warm intro and company contacts
8
+ - e0ae99e: New pipes
9
+ - Updated dependencies [a7a7d88]
10
+ - Updated dependencies [e0ae99e]
11
+ - @pipe0/base@1.0.38
12
+
3
13
  ## 1.0.37
4
14
 
5
15
  ### Patch Changes
@@ -1,10 +1,10 @@
1
1
  import { useEffectCatalogContext } from "../../../context/effect-catalog-context.mjs";
2
2
  import { DefaultCategoryFilter } from "../../defaults/catalog/category-filter.mjs";
3
+ import { Cog, Eraser, Sparkles, X, Zap } from "../../internal/icons.mjs";
3
4
  import { mergeProps } from "@base-ui/react/merge-props";
4
5
  import { useRender } from "@base-ui/react/use-render";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { getSheetEffectCategoryEntries } from "@pipe0/base";
7
- import { Cog, Eraser, Sparkles, X, Zap } from "lucide-react";
8
8
 
9
9
  //#region src/components/compound/effect-catalog/category-filter.tsx
10
10
  const EFFECT_CATEGORY_ICONS = {
@@ -1 +1 @@
1
- {"version":3,"file":"category-filter.mjs","names":[],"sources":["../../../../src/components/compound/effect-catalog/category-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { getSheetEffectCategoryEntries, type SheetEffectCategory } from \"@pipe0/base\";\nimport { Cog, Eraser, Sparkles, X, Zap } from \"lucide-react\";\nimport { useEffectCatalogContext } from \"../../../context/effect-catalog-context.js\";\nimport {\n type CategoryOption,\n DefaultCategoryFilter,\n} from \"../../defaults/catalog/category-filter.js\";\n\nconst EFFECT_CATEGORY_ICONS: Record<\n SheetEffectCategory,\n CategoryOption<SheetEffectCategory>[\"icon\"]\n> = {\n data_hygiene: Eraser,\n enrichment: Zap,\n internal: Cog,\n deprecated: X,\n};\n\nconst DEFAULT_OPTIONS: ReadonlyArray<CategoryOption<SheetEffectCategory>> = [\n { id: null, label: \"All\", icon: Sparkles },\n ...[...getSheetEffectCategoryEntries()]\n .sort((a, b) => a.order - b.order)\n .map(\n (entry): CategoryOption<SheetEffectCategory> => ({\n id: entry.id,\n label: entry.label,\n icon: EFFECT_CATEGORY_ICONS[entry.id],\n }),\n ),\n];\n\nexport interface EffectCatalogCategoryFilterState {\n value: SheetEffectCategory | null;\n setValue: (value: SheetEffectCategory | null) => void;\n options: ReadonlyArray<CategoryOption<SheetEffectCategory>>;\n counts: Partial<Record<SheetEffectCategory, number>>;\n totalCount: number;\n isActive: boolean;\n}\n\nexport interface EffectCatalogCategoryFilterProps\n extends useRender.ComponentProps<\"div\", EffectCatalogCategoryFilterState> {\n /** Override the default category options. */\n options?: ReadonlyArray<CategoryOption<SheetEffectCategory>>;\n}\n\nexport function EffectCatalogCategoryFilter({\n options = DEFAULT_OPTIONS,\n className,\n render,\n ...props\n}: EffectCatalogCategoryFilterProps) {\n const ctx = useEffectCatalogContext();\n const value = ctx.category;\n const isActive = value !== null;\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: {\n value,\n setValue: ctx.setCategory,\n options,\n counts: ctx.baselineCategoryCounts,\n totalCount: ctx.baselineCardCount,\n isActive,\n },\n stateAttributesMapping: {\n setValue: () => null,\n options: () => null,\n counts: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n ...({ \"data-p0\": \"catalog-category-filter\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (render) return element;\n\n return (\n <DefaultCategoryFilter\n options={options}\n value={ctx.category}\n onChange={ctx.setCategory}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAUA,MAAM,wBAGF;CACF,cAAc;CACd,YAAY;CACZ,UAAU;CACV,YAAY;CACb;AAED,MAAM,kBAAsE,CAC1E;CAAE,IAAI;CAAM,OAAO;CAAO,MAAM;CAAU,EAC1C,GAAG,CAAC,GAAG,+BAA+B,CAAC,CACpC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,CACjC,KACE,WAAgD;CAC/C,IAAI,MAAM;CACV,OAAO,MAAM;CACb,MAAM,sBAAsB,MAAM;CACnC,EACF,CACJ;AAiBD,SAAgB,4BAA4B,EAC1C,UAAU,iBACV,WACA,QACA,GAAG,SACgC;CACnC,MAAM,MAAM,yBAAyB;CACrC,MAAM,QAAQ,IAAI;CAClB,MAAM,WAAW,UAAU;CAE3B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GACL;GACA,UAAU,IAAI;GACd;GACA,QAAQ,IAAI;GACZ,YAAY,IAAI;GAChB;GACD;EACD,wBAAwB;GACtB,gBAAgB;GAChB,eAAe;GACf,cAAc;GACf;EACD,OAAO,WACL;GACE;GACM,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,oBAAC,uBAAD;EACW;EACT,OAAO,IAAI;EACX,UAAU,IAAI;EACH;EACX"}
1
+ {"version":3,"file":"category-filter.mjs","names":[],"sources":["../../../../src/components/compound/effect-catalog/category-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { getSheetEffectCategoryEntries, type SheetEffectCategory } from \"@pipe0/base\";\nimport { useEffectCatalogContext } from \"../../../context/effect-catalog-context.js\";\nimport {\n type CategoryOption,\n DefaultCategoryFilter,\n} from \"../../defaults/catalog/category-filter.js\";\nimport { Cog, Eraser, Sparkles, X, Zap } from \"../../internal/icons.js\";\n\nconst EFFECT_CATEGORY_ICONS: Record<\n SheetEffectCategory,\n CategoryOption<SheetEffectCategory>[\"icon\"]\n> = {\n data_hygiene: Eraser,\n enrichment: Zap,\n internal: Cog,\n deprecated: X,\n};\n\nconst DEFAULT_OPTIONS: ReadonlyArray<CategoryOption<SheetEffectCategory>> = [\n { id: null, label: \"All\", icon: Sparkles },\n ...[...getSheetEffectCategoryEntries()]\n .sort((a, b) => a.order - b.order)\n .map(\n (entry): CategoryOption<SheetEffectCategory> => ({\n id: entry.id,\n label: entry.label,\n icon: EFFECT_CATEGORY_ICONS[entry.id],\n }),\n ),\n];\n\nexport interface EffectCatalogCategoryFilterState {\n value: SheetEffectCategory | null;\n setValue: (value: SheetEffectCategory | null) => void;\n options: ReadonlyArray<CategoryOption<SheetEffectCategory>>;\n counts: Partial<Record<SheetEffectCategory, number>>;\n totalCount: number;\n isActive: boolean;\n}\n\nexport interface EffectCatalogCategoryFilterProps\n extends useRender.ComponentProps<\"div\", EffectCatalogCategoryFilterState> {\n /** Override the default category options. */\n options?: ReadonlyArray<CategoryOption<SheetEffectCategory>>;\n}\n\nexport function EffectCatalogCategoryFilter({\n options = DEFAULT_OPTIONS,\n className,\n render,\n ...props\n}: EffectCatalogCategoryFilterProps) {\n const ctx = useEffectCatalogContext();\n const value = ctx.category;\n const isActive = value !== null;\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: {\n value,\n setValue: ctx.setCategory,\n options,\n counts: ctx.baselineCategoryCounts,\n totalCount: ctx.baselineCardCount,\n isActive,\n },\n stateAttributesMapping: {\n setValue: () => null,\n options: () => null,\n counts: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n ...({ \"data-p0\": \"catalog-category-filter\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (render) return element;\n\n return (\n <DefaultCategoryFilter\n options={options}\n value={ctx.category}\n onChange={ctx.setCategory}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAUA,MAAM,wBAGF;CACF,cAAc;CACd,YAAY;CACZ,UAAU;CACV,YAAY;CACb;AAED,MAAM,kBAAsE,CAC1E;CAAE,IAAI;CAAM,OAAO;CAAO,MAAM;CAAU,EAC1C,GAAG,CAAC,GAAG,+BAA+B,CAAC,CACpC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,CACjC,KACE,WAAgD;CAC/C,IAAI,MAAM;CACV,OAAO,MAAM;CACb,MAAM,sBAAsB,MAAM;CACnC,EACF,CACJ;AAiBD,SAAgB,4BAA4B,EAC1C,UAAU,iBACV,WACA,QACA,GAAG,SACgC;CACnC,MAAM,MAAM,yBAAyB;CACrC,MAAM,QAAQ,IAAI;CAClB,MAAM,WAAW,UAAU;CAE3B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GACL;GACA,UAAU,IAAI;GACd;GACA,QAAQ,IAAI;GACZ,YAAY,IAAI;GAChB;GACD;EACD,wBAAwB;GACtB,gBAAgB;GAChB,eAAe;GACf,cAAc;GACf;EACD,OAAO,WACL;GACE;GACM,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,oBAAC,uBAAD;EACW;EACT,OAAO,IAAI;EACX,UAAU,IAAI;EACH;EACX"}
@@ -1,11 +1,11 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
2
  import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
3
3
  import { useEffectCatalogContext } from "../../../context/effect-catalog-context.mjs";
4
+ import { Search } from "../../internal/icons.mjs";
4
5
  import { Input } from "../../ui/input.mjs";
5
6
  import { mergeProps } from "@base-ui/react/merge-props";
6
7
  import { useRender } from "@base-ui/react/use-render";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
- import { Search } from "lucide-react";
9
9
 
10
10
  //#region src/components/compound/effect-catalog/search-filter.tsx
11
11
  function EffectCatalogSearchFilter({ placeholder = "Search effects...", className, render, ...props }) {
@@ -1 +1 @@
1
- {"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/effect-catalog/search-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { Search as SearchIcon } from \"lucide-react\";\nimport type { ChangeEvent } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { useEffectCatalogContext } from \"../../../context/effect-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface EffectCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface EffectCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", EffectCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function EffectCatalogSearchFilter({\n placeholder = \"Search effects...\",\n className,\n render,\n ...props\n}: EffectCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = useEffectCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n const inputElement = useRender({\n defaultTagName: \"input\",\n render,\n state: { value: globalFilterInput, setValue: setGlobalFilterInput, isActive },\n stateAttributesMapping: {\n setValue: () => null,\n },\n props: mergeProps<\"input\">(\n {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n className: render ? cn(classNames?.searchInput, className) : undefined,\n },\n props,\n ),\n });\n\n if (render) return inputElement;\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,0BAA0B,EACxC,cAAc,qBACd,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,EAAE,mBAAmB,yBAAyB,yBAAyB;CAC7E,MAAM,EAAE,eAAe,kBAAkB;CAGzC,MAAM,eAAe,UAAU;EAC7B,gBAAgB;EAChB;EACA,OAAO;GAAE,OAAO;GAAmB,UAAU;GAAsB,UALpD,CAAC,CAAC;GAK4D;EAC7E,wBAAwB,EACtB,gBAAgB,MACjB;EACD,OAAO,WACL;GACE,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,WAAW,SAAS,GAAG,YAAY,aAAa,UAAU,GAAG;GAC9D,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
1
+ {"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/effect-catalog/search-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ChangeEvent } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { useEffectCatalogContext } from \"../../../context/effect-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Search as SearchIcon } from \"../../internal/icons.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface EffectCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface EffectCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", EffectCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function EffectCatalogSearchFilter({\n placeholder = \"Search effects...\",\n className,\n render,\n ...props\n}: EffectCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = useEffectCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n const inputElement = useRender({\n defaultTagName: \"input\",\n render,\n state: { value: globalFilterInput, setValue: setGlobalFilterInput, isActive },\n stateAttributesMapping: {\n setValue: () => null,\n },\n props: mergeProps<\"input\">(\n {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n className: render ? cn(classNames?.searchInput, className) : undefined,\n },\n props,\n ),\n });\n\n if (render) return inputElement;\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,0BAA0B,EACxC,cAAc,qBACd,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,EAAE,mBAAmB,yBAAyB,yBAAyB;CAC7E,MAAM,EAAE,eAAe,kBAAkB;CAGzC,MAAM,eAAe,UAAU;EAC7B,gBAAgB;EAChB;EACA,OAAO;GAAE,OAAO;GAAmB,UAAU;GAAsB,UALpD,CAAC,CAAC;GAK4D;EAC7E,wBAAwB,EACtB,gBAAgB,MACjB;EACD,OAAO,WACL;GACE,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,WAAW,SAAS,GAAG,YAAY,aAAa,UAAU,GAAG;GAC9D,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
@@ -1,10 +1,10 @@
1
1
  import { usePipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
2
2
  import { DefaultCategoryFilter } from "../../defaults/catalog/category-filter.mjs";
3
+ import { Building2, Database, Hammer, Plug, ScanFace, Search, Users, X, Zap } from "../../internal/icons.mjs";
3
4
  import { mergeProps } from "@base-ui/react/merge-props";
4
5
  import { useRender } from "@base-ui/react/use-render";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { getPipeCategoryEntries } from "@pipe0/base";
7
- import { Building2, Database, Hammer, Plug, ScanFace, Search, Users, X, Zap } from "lucide-react";
8
8
 
9
9
  //#region src/components/compound/pipe-catalog/category-filter.tsx
10
10
  const PIPE_CATEGORY_ICONS = {
@@ -1 +1 @@
1
- {"version":3,"file":"category-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/pipe-catalog/category-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { getPipeCategoryEntries, type PipeCategory } from \"@pipe0/base\";\nimport {\n Building2,\n Database,\n Hammer,\n Plug,\n ScanFace,\n Search as SearchIcon,\n Users,\n X,\n Zap,\n} from \"lucide-react\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport {\n type CategoryOption,\n DefaultCategoryFilter,\n} from \"../../defaults/catalog/category-filter.js\";\n\nconst PIPE_CATEGORY_ICONS: Record<PipeCategory, CategoryOption<PipeCategory>[\"icon\"]> = {\n people_data: ScanFace,\n company_data: Building2,\n find_people: Users,\n find_comapnies: SearchIcon,\n tools: Hammer,\n actions: Zap,\n integrations: Plug,\n deprecated: X,\n};\n\nconst DEFAULT_OPTIONS: ReadonlyArray<CategoryOption<PipeCategory>> = [\n { id: null, label: \"All\", icon: Database },\n ...[...getPipeCategoryEntries()]\n .sort((a, b) => a.order - b.order)\n .map(\n (entry): CategoryOption<PipeCategory> => ({\n id: entry.id,\n label: entry.label,\n icon: PIPE_CATEGORY_ICONS[entry.id],\n }),\n ),\n];\n\nexport interface PipeCatalogCategoryFilterState {\n value: PipeCategory | null;\n setValue: (value: PipeCategory | null) => void;\n options: ReadonlyArray<CategoryOption<PipeCategory>>;\n counts: Partial<Record<PipeCategory, number>>;\n totalCount: number;\n isActive: boolean;\n}\n\nexport interface PipeCatalogCategoryFilterProps\n extends useRender.ComponentProps<\"div\", PipeCatalogCategoryFilterState> {\n /** Override the default category options. */\n options?: ReadonlyArray<CategoryOption<PipeCategory>>;\n}\n\nexport function PipeCatalogCategoryFilter({\n options = DEFAULT_OPTIONS,\n className,\n render,\n ...props\n}: PipeCatalogCategoryFilterProps) {\n const ctx = usePipeCatalogContext();\n const value = ctx.category;\n const isActive = value !== null;\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: {\n value,\n setValue: ctx.setCategory,\n options,\n counts: ctx.baselineCategoryCounts,\n totalCount: ctx.baselineCardCount,\n isActive,\n },\n stateAttributesMapping: {\n setValue: () => null,\n options: () => null,\n counts: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n ...({ \"data-p0\": \"catalog-category-filter\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (render) return element;\n\n return (\n <DefaultCategoryFilter\n options={options}\n value={ctx.category}\n onChange={ctx.setCategory}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAoBA,MAAM,sBAAkF;CACtF,aAAa;CACb,cAAc;CACd,aAAa;CACb,gBAAgBA;CAChB,OAAO;CACP,SAAS;CACT,cAAc;CACd,YAAY;CACb;AAED,MAAM,kBAA+D,CACnE;CAAE,IAAI;CAAM,OAAO;CAAO,MAAM;CAAU,EAC1C,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAC7B,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,CACjC,KACE,WAAyC;CACxC,IAAI,MAAM;CACV,OAAO,MAAM;CACb,MAAM,oBAAoB,MAAM;CACjC,EACF,CACJ;AAiBD,SAAgB,0BAA0B,EACxC,UAAU,iBACV,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,MAAM,uBAAuB;CACnC,MAAM,QAAQ,IAAI;CAClB,MAAM,WAAW,UAAU;CAE3B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GACL;GACA,UAAU,IAAI;GACd;GACA,QAAQ,IAAI;GACZ,YAAY,IAAI;GAChB;GACD;EACD,wBAAwB;GACtB,gBAAgB;GAChB,eAAe;GACf,cAAc;GACf;EACD,OAAO,WACL;GACE;GACM,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,oBAAC,uBAAD;EACW;EACT,OAAO,IAAI;EACX,UAAU,IAAI;EACH;EACX"}
1
+ {"version":3,"file":"category-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/pipe-catalog/category-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { getPipeCategoryEntries, type PipeCategory } from \"@pipe0/base\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport {\n type CategoryOption,\n DefaultCategoryFilter,\n} from \"../../defaults/catalog/category-filter.js\";\nimport {\n Building2,\n Database,\n Hammer,\n Plug,\n ScanFace,\n Search as SearchIcon,\n Users,\n X,\n Zap,\n} from \"../../internal/icons.js\";\n\nconst PIPE_CATEGORY_ICONS: Record<PipeCategory, CategoryOption<PipeCategory>[\"icon\"]> = {\n people_data: ScanFace,\n company_data: Building2,\n find_people: Users,\n find_comapnies: SearchIcon,\n tools: Hammer,\n actions: Zap,\n integrations: Plug,\n deprecated: X,\n};\n\nconst DEFAULT_OPTIONS: ReadonlyArray<CategoryOption<PipeCategory>> = [\n { id: null, label: \"All\", icon: Database },\n ...[...getPipeCategoryEntries()]\n .sort((a, b) => a.order - b.order)\n .map(\n (entry): CategoryOption<PipeCategory> => ({\n id: entry.id,\n label: entry.label,\n icon: PIPE_CATEGORY_ICONS[entry.id],\n }),\n ),\n];\n\nexport interface PipeCatalogCategoryFilterState {\n value: PipeCategory | null;\n setValue: (value: PipeCategory | null) => void;\n options: ReadonlyArray<CategoryOption<PipeCategory>>;\n counts: Partial<Record<PipeCategory, number>>;\n totalCount: number;\n isActive: boolean;\n}\n\nexport interface PipeCatalogCategoryFilterProps\n extends useRender.ComponentProps<\"div\", PipeCatalogCategoryFilterState> {\n /** Override the default category options. */\n options?: ReadonlyArray<CategoryOption<PipeCategory>>;\n}\n\nexport function PipeCatalogCategoryFilter({\n options = DEFAULT_OPTIONS,\n className,\n render,\n ...props\n}: PipeCatalogCategoryFilterProps) {\n const ctx = usePipeCatalogContext();\n const value = ctx.category;\n const isActive = value !== null;\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: {\n value,\n setValue: ctx.setCategory,\n options,\n counts: ctx.baselineCategoryCounts,\n totalCount: ctx.baselineCardCount,\n isActive,\n },\n stateAttributesMapping: {\n setValue: () => null,\n options: () => null,\n counts: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n ...({ \"data-p0\": \"catalog-category-filter\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (render) return element;\n\n return (\n <DefaultCategoryFilter\n options={options}\n value={ctx.category}\n onChange={ctx.setCategory}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAoBA,MAAM,sBAAkF;CACtF,aAAa;CACb,cAAc;CACd,aAAa;CACb,gBAAgBA;CAChB,OAAO;CACP,SAAS;CACT,cAAc;CACd,YAAY;CACb;AAED,MAAM,kBAA+D,CACnE;CAAE,IAAI;CAAM,OAAO;CAAO,MAAM;CAAU,EAC1C,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAC7B,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,CACjC,KACE,WAAyC;CACxC,IAAI,MAAM;CACV,OAAO,MAAM;CACb,MAAM,oBAAoB,MAAM;CACjC,EACF,CACJ;AAiBD,SAAgB,0BAA0B,EACxC,UAAU,iBACV,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,MAAM,uBAAuB;CACnC,MAAM,QAAQ,IAAI;CAClB,MAAM,WAAW,UAAU;CAE3B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GACL;GACA,UAAU,IAAI;GACd;GACA,QAAQ,IAAI;GACZ,YAAY,IAAI;GAChB;GACD;EACD,wBAAwB;GACtB,gBAAgB;GAChB,eAAe;GACf,cAAc;GACf;EACD,OAAO,WACL;GACE;GACM,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,oBAAC,uBAAD;EACW;EACT,OAAO,IAAI;EACX,UAAU,IAAI;EACH;EACX"}
@@ -1,6 +1,6 @@
1
+ import { ArrowUp } from "../../internal/icons.mjs";
1
2
  import { PipeCatalogColumnFilter } from "./column-filter.mjs";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { ArrowUp } from "lucide-react";
4
4
 
5
5
  //#region src/components/compound/pipe-catalog/input-field-filter.tsx
6
6
  const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"input-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/input-field-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { ArrowUp } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogInputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowUp className=\"pz:size-4\" /> Input fields\n </span>\n);\n\nexport function PipeCatalogInputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogInputFieldFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"inputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,SAAD,EAAS,WAAU,aAAc,mBAC5B;;AAGT,SAAgB,4BAA4B,EAC1C,SACA,cAAc,qBACd,WACA,UACmC;AACnC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
1
+ {"version":3,"file":"input-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/input-field-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { ArrowUp } from \"../../internal/icons.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogInputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowUp className=\"pz:size-4\" /> Input fields\n </span>\n);\n\nexport function PipeCatalogInputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogInputFieldFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"inputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,SAAD,EAAS,WAAU,aAAc,mBAC5B;;AAGT,SAAgB,4BAA4B,EAC1C,SACA,cAAc,qBACd,WACA,UACmC;AACnC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
@@ -1,6 +1,6 @@
1
+ import { ArrowDown } from "../../internal/icons.mjs";
1
2
  import { PipeCatalogColumnFilter } from "./column-filter.mjs";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { ArrowDown } from "lucide-react";
4
4
 
5
5
  //#region src/components/compound/pipe-catalog/output-field-filter.tsx
6
6
  const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/output-field-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { ArrowDown } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogOutputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowDown className=\"pz:size-4\" /> Output fields\n </span>\n);\n\nexport function PipeCatalogOutputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogOutputFieldFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"outputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,oBAC9B;;AAGT,SAAgB,6BAA6B,EAC3C,SACA,cAAc,qBACd,WACA,UACoC;AACpC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
1
+ {"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/output-field-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { ArrowDown } from \"../../internal/icons.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogOutputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowDown className=\"pz:size-4\" /> Output fields\n </span>\n);\n\nexport function PipeCatalogOutputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogOutputFieldFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"outputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,oBAC9B;;AAGT,SAAgB,6BAA6B,EAC3C,SACA,cAAc,qBACd,WACA,UACoC;AACpC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
@@ -1,8 +1,8 @@
1
1
  import { usePipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
2
+ import { Building2 } from "../../internal/icons.mjs";
2
3
  import { PipeCatalogColumnFilter } from "./column-filter.mjs";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
5
  import { getProviderEntry } from "@pipe0/base";
5
- import { Building2 } from "lucide-react";
6
6
 
7
7
  //#region src/components/compound/pipe-catalog/provider-filter.tsx
8
8
  const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/provider-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport { Building2 } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogProviderFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Building2 className=\"pz:size-4\" /> Provider\n </span>\n);\n\nexport function PipeCatalogProviderFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogProviderFilterProps) {\n const ctx = usePipeCatalogContext();\n // Provider option labels carry the logo image so the default <Select> shows\n // the brand mark — matches what dash users expect from this filter.\n const resolvedOptions =\n options ??\n ctx.sortedProviderEntries.map(([name]) => ({\n label: name,\n value: name,\n imageSrc: getProviderEntry(name as ProviderName)?.logoUrl,\n }));\n\n return (\n <PipeCatalogColumnFilter\n id=\"providers\"\n placeholder={placeholder}\n options={resolvedOptions}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;;;AAeA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,eAC9B;;AAGT,SAAgB,0BAA0B,EACxC,SACA,cAAc,qBACd,WACA,UACiC;CACjC,MAAM,MAAM,uBAAuB;AAWnC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACb,SAXF,WACA,IAAI,sBAAsB,KAAK,CAAC,WAAW;GACzC,OAAO;GACP,OAAO;GACP,UAAU,iBAAiB,KAAqB,EAAE;GACnD,EAAE;EAOU;EACH;EACR"}
1
+ {"version":3,"file":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/provider-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport type { ReactNode } from \"react\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { Building2 } from \"../../internal/icons.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogProviderFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Building2 className=\"pz:size-4\" /> Provider\n </span>\n);\n\nexport function PipeCatalogProviderFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogProviderFilterProps) {\n const ctx = usePipeCatalogContext();\n // Provider option labels carry the logo image so the default <Select> shows\n // the brand mark — matches what dash users expect from this filter.\n const resolvedOptions =\n options ??\n ctx.sortedProviderEntries.map(([name]) => ({\n label: name,\n value: name,\n imageSrc: getProviderEntry(name as ProviderName)?.logoUrl,\n }));\n\n return (\n <PipeCatalogColumnFilter\n id=\"providers\"\n placeholder={placeholder}\n options={resolvedOptions}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;;;AAeA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,eAC9B;;AAGT,SAAgB,0BAA0B,EACxC,SACA,cAAc,qBACd,WACA,UACiC;CACjC,MAAM,MAAM,uBAAuB;AAWnC,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACb,SAXF,WACA,IAAI,sBAAsB,KAAK,CAAC,WAAW;GACzC,OAAO;GACP,OAAO;GACP,UAAU,iBAAiB,KAAqB,EAAE;GACnD,EAAE;EAOU;EACH;EACR"}
@@ -1,11 +1,11 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
2
  import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
3
3
  import { usePipeCatalogContext } from "../../../context/pipe-catalog-context.mjs";
4
+ import { Search } from "../../internal/icons.mjs";
4
5
  import { Input } from "../../ui/input.mjs";
5
6
  import { mergeProps } from "@base-ui/react/merge-props";
6
7
  import { useRender } from "@base-ui/react/use-render";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
- import { Search } from "lucide-react";
9
9
 
10
10
  //#region src/components/compound/pipe-catalog/search-filter.tsx
11
11
  function PipeCatalogSearchFilter({ placeholder = "Search pipes...", className, render, ...props }) {
@@ -1 +1 @@
1
- {"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/pipe-catalog/search-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { Search as SearchIcon } from \"lucide-react\";\nimport type { ChangeEvent } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface PipeCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface PipeCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", PipeCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function PipeCatalogSearchFilter({\n placeholder = \"Search pipes...\",\n className,\n render,\n ...props\n}: PipeCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = usePipeCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n const inputElement = useRender({\n defaultTagName: \"input\",\n render,\n state: { value: globalFilterInput, setValue: setGlobalFilterInput, isActive },\n stateAttributesMapping: {\n setValue: () => null,\n },\n props: mergeProps<\"input\">(\n {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n className: render ? cn(classNames?.searchInput, className) : undefined,\n },\n props,\n ),\n });\n\n if (render) return inputElement;\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,wBAAwB,EACtC,cAAc,mBACd,WACA,QACA,GAAG,SAC4B;CAC/B,MAAM,EAAE,mBAAmB,yBAAyB,uBAAuB;CAC3E,MAAM,EAAE,eAAe,kBAAkB;CAGzC,MAAM,eAAe,UAAU;EAC7B,gBAAgB;EAChB;EACA,OAAO;GAAE,OAAO;GAAmB,UAAU;GAAsB,UALpD,CAAC,CAAC;GAK4D;EAC7E,wBAAwB,EACtB,gBAAgB,MACjB;EACD,OAAO,WACL;GACE,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,WAAW,SAAS,GAAG,YAAY,aAAa,UAAU,GAAG;GAC9D,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
1
+ {"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/pipe-catalog/search-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ChangeEvent } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { usePipeCatalogContext } from \"../../../context/pipe-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Search as SearchIcon } from \"../../internal/icons.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface PipeCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface PipeCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", PipeCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function PipeCatalogSearchFilter({\n placeholder = \"Search pipes...\",\n className,\n render,\n ...props\n}: PipeCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = usePipeCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n const inputElement = useRender({\n defaultTagName: \"input\",\n render,\n state: { value: globalFilterInput, setValue: setGlobalFilterInput, isActive },\n stateAttributesMapping: {\n setValue: () => null,\n },\n props: mergeProps<\"input\">(\n {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n className: render ? cn(classNames?.searchInput, className) : undefined,\n },\n props,\n ),\n });\n\n if (render) return inputElement;\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,wBAAwB,EACtC,cAAc,mBACd,WACA,QACA,GAAG,SAC4B;CAC/B,MAAM,EAAE,mBAAmB,yBAAyB,uBAAuB;CAC3E,MAAM,EAAE,eAAe,kBAAkB;CAGzC,MAAM,eAAe,UAAU;EAC7B,gBAAgB;EAChB;EACA,OAAO;GAAE,OAAO;GAAmB,UAAU;GAAsB,UALpD,CAAC,CAAC;GAK4D;EAC7E,wBAAwB,EACtB,gBAAgB,MACjB;EACD,OAAO,WACL;GACE,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,WAAW,SAAS,GAAG,YAAY,aAAa,UAAU,GAAG;GAC9D,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
@@ -1,6 +1,6 @@
1
+ import { Tag } from "../../internal/icons.mjs";
1
2
  import { PipeCatalogColumnFilter } from "./column-filter.mjs";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Tag } from "lucide-react";
4
4
 
5
5
  //#region src/components/compound/pipe-catalog/tag-filter.tsx
6
6
  const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/tag-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { Tag } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogTagFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Tag className=\"pz:size-4\" /> Tag\n </span>\n);\n\nexport function PipeCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogTagFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"tags\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,KAAD,EAAK,WAAU,aAAc,UACxB;;AAGT,SAAgB,qBAAqB,EACnC,SACA,cAAc,qBACd,WACA,UAC4B;AAC5B,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
1
+ {"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/pipe-catalog/tag-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { Tag } from \"../../internal/icons.js\";\nimport { type ColumnFilterState, PipeCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface PipeCatalogTagFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Tag className=\"pz:size-4\" /> Tag\n </span>\n);\n\nexport function PipeCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: PipeCatalogTagFilterProps) {\n return (\n <PipeCatalogColumnFilter\n id=\"tags\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,KAAD,EAAK,WAAU,aAAc,UACxB;;AAGT,SAAgB,qBAAqB,EACnC,SACA,cAAc,qBACd,WACA,UAC4B;AAC5B,QACE,oBAAC,yBAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
@@ -1,10 +1,10 @@
1
1
  import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
2
2
  import { DefaultCategoryFilter } from "../../defaults/catalog/category-filter.mjs";
3
+ import { Building2, Database, Table, User, X } from "../../internal/icons.mjs";
3
4
  import { mergeProps } from "@base-ui/react/merge-props";
4
5
  import { useRender } from "@base-ui/react/use-render";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { getSearchCategoryEntries } from "@pipe0/base";
7
- import { Building2, Database, Table, User, X } from "lucide-react";
8
8
 
9
9
  //#region src/components/compound/search-catalog/category-filter.tsx
10
10
  const SEARCH_CATEGORY_ICONS = {
@@ -1 +1 @@
1
- {"version":3,"file":"category-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/category-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { getSearchCategoryEntries, type SearchCategory } from \"@pipe0/base\";\nimport { Building2, Database, Table, User, X } from \"lucide-react\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport {\n type CategoryOption,\n DefaultCategoryFilter,\n} from \"../../defaults/catalog/category-filter.js\";\n\nconst SEARCH_CATEGORY_ICONS: Record<SearchCategory, CategoryOption<SearchCategory>[\"icon\"]> = {\n people: User,\n companies: Building2,\n data: Table,\n deprecated: X,\n};\n\nconst DEFAULT_OPTIONS: ReadonlyArray<CategoryOption<SearchCategory>> = [\n { id: null, label: \"All\", icon: Database },\n ...[...getSearchCategoryEntries()]\n .sort((a, b) => a.order - b.order)\n .map(\n (entry): CategoryOption<SearchCategory> => ({\n id: entry.id,\n label: entry.label,\n icon: SEARCH_CATEGORY_ICONS[entry.id],\n }),\n ),\n];\n\nexport interface SearchCatalogCategoryFilterState {\n value: SearchCategory | null;\n setValue: (value: SearchCategory | null) => void;\n options: ReadonlyArray<CategoryOption<SearchCategory>>;\n counts: Partial<Record<SearchCategory, number>>;\n totalCount: number;\n isActive: boolean;\n}\n\nexport interface SearchCatalogCategoryFilterProps\n extends useRender.ComponentProps<\"div\", SearchCatalogCategoryFilterState> {\n /** Override the default category options. */\n options?: ReadonlyArray<CategoryOption<SearchCategory>>;\n}\n\nexport function SearchCatalogCategoryFilter({\n options = DEFAULT_OPTIONS,\n className,\n render,\n ...props\n}: SearchCatalogCategoryFilterProps) {\n const ctx = useSearchCatalogContext();\n const value = ctx.category;\n const isActive = value !== null;\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: {\n value,\n setValue: ctx.setCategory,\n options,\n counts: ctx.baselineCategoryCounts,\n totalCount: ctx.baselineCardCount,\n isActive,\n },\n stateAttributesMapping: {\n setValue: () => null,\n options: () => null,\n counts: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n ...({ \"data-p0\": \"catalog-category-filter\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (render) return element;\n\n return (\n <DefaultCategoryFilter\n options={options}\n value={ctx.category}\n onChange={ctx.setCategory}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAUA,MAAM,wBAAwF;CAC5F,QAAQ;CACR,WAAW;CACX,MAAM;CACN,YAAY;CACb;AAED,MAAM,kBAAiE,CACrE;CAAE,IAAI;CAAM,OAAO;CAAO,MAAM;CAAU,EAC1C,GAAG,CAAC,GAAG,0BAA0B,CAAC,CAC/B,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,CACjC,KACE,WAA2C;CAC1C,IAAI,MAAM;CACV,OAAO,MAAM;CACb,MAAM,sBAAsB,MAAM;CACnC,EACF,CACJ;AAiBD,SAAgB,4BAA4B,EAC1C,UAAU,iBACV,WACA,QACA,GAAG,SACgC;CACnC,MAAM,MAAM,yBAAyB;CACrC,MAAM,QAAQ,IAAI;CAClB,MAAM,WAAW,UAAU;CAE3B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GACL;GACA,UAAU,IAAI;GACd;GACA,QAAQ,IAAI;GACZ,YAAY,IAAI;GAChB;GACD;EACD,wBAAwB;GACtB,gBAAgB;GAChB,eAAe;GACf,cAAc;GACf;EACD,OAAO,WACL;GACE;GACM,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,oBAAC,uBAAD;EACW;EACT,OAAO,IAAI;EACX,UAAU,IAAI;EACH;EACX"}
1
+ {"version":3,"file":"category-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/category-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { getSearchCategoryEntries, type SearchCategory } from \"@pipe0/base\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport {\n type CategoryOption,\n DefaultCategoryFilter,\n} from \"../../defaults/catalog/category-filter.js\";\nimport { Building2, Database, Table, User, X } from \"../../internal/icons.js\";\n\nconst SEARCH_CATEGORY_ICONS: Record<SearchCategory, CategoryOption<SearchCategory>[\"icon\"]> = {\n people: User,\n companies: Building2,\n data: Table,\n deprecated: X,\n};\n\nconst DEFAULT_OPTIONS: ReadonlyArray<CategoryOption<SearchCategory>> = [\n { id: null, label: \"All\", icon: Database },\n ...[...getSearchCategoryEntries()]\n .sort((a, b) => a.order - b.order)\n .map(\n (entry): CategoryOption<SearchCategory> => ({\n id: entry.id,\n label: entry.label,\n icon: SEARCH_CATEGORY_ICONS[entry.id],\n }),\n ),\n];\n\nexport interface SearchCatalogCategoryFilterState {\n value: SearchCategory | null;\n setValue: (value: SearchCategory | null) => void;\n options: ReadonlyArray<CategoryOption<SearchCategory>>;\n counts: Partial<Record<SearchCategory, number>>;\n totalCount: number;\n isActive: boolean;\n}\n\nexport interface SearchCatalogCategoryFilterProps\n extends useRender.ComponentProps<\"div\", SearchCatalogCategoryFilterState> {\n /** Override the default category options. */\n options?: ReadonlyArray<CategoryOption<SearchCategory>>;\n}\n\nexport function SearchCatalogCategoryFilter({\n options = DEFAULT_OPTIONS,\n className,\n render,\n ...props\n}: SearchCatalogCategoryFilterProps) {\n const ctx = useSearchCatalogContext();\n const value = ctx.category;\n const isActive = value !== null;\n\n const element = useRender({\n defaultTagName: \"div\",\n render,\n state: {\n value,\n setValue: ctx.setCategory,\n options,\n counts: ctx.baselineCategoryCounts,\n totalCount: ctx.baselineCardCount,\n isActive,\n },\n stateAttributesMapping: {\n setValue: () => null,\n options: () => null,\n counts: () => null,\n },\n props: mergeProps<\"div\">(\n {\n className,\n ...({ \"data-p0\": \"catalog-category-filter\" } as Record<string, string>),\n },\n props,\n ),\n });\n\n if (render) return element;\n\n return (\n <DefaultCategoryFilter\n options={options}\n value={ctx.category}\n onChange={ctx.setCategory}\n className={className}\n />\n );\n}\n"],"mappings":";;;;;;;;;AAUA,MAAM,wBAAwF;CAC5F,QAAQ;CACR,WAAW;CACX,MAAM;CACN,YAAY;CACb;AAED,MAAM,kBAAiE,CACrE;CAAE,IAAI;CAAM,OAAO;CAAO,MAAM;CAAU,EAC1C,GAAG,CAAC,GAAG,0BAA0B,CAAC,CAC/B,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,CACjC,KACE,WAA2C;CAC1C,IAAI,MAAM;CACV,OAAO,MAAM;CACb,MAAM,sBAAsB,MAAM;CACnC,EACF,CACJ;AAiBD,SAAgB,4BAA4B,EAC1C,UAAU,iBACV,WACA,QACA,GAAG,SACgC;CACnC,MAAM,MAAM,yBAAyB;CACrC,MAAM,QAAQ,IAAI;CAClB,MAAM,WAAW,UAAU;CAE3B,MAAM,UAAU,UAAU;EACxB,gBAAgB;EAChB;EACA,OAAO;GACL;GACA,UAAU,IAAI;GACd;GACA,QAAQ,IAAI;GACZ,YAAY,IAAI;GAChB;GACD;EACD,wBAAwB;GACtB,gBAAgB;GAChB,eAAe;GACf,cAAc;GACf;EACD,OAAO,WACL;GACE;GACM,WAAW;GAClB,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,oBAAC,uBAAD;EACW;EACT,OAAO,IAAI;EACX,UAAU,IAAI;EACH;EACX"}
@@ -1,6 +1,6 @@
1
+ import { ArrowDown } from "../../internal/icons.mjs";
1
2
  import { SearchCatalogColumnFilter } from "./column-filter.mjs";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { ArrowDown } from "lucide-react";
4
4
 
5
5
  //#region src/components/compound/search-catalog/output-field-filter.tsx
6
6
  const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/output-field-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { ArrowDown } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogOutputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowDown className=\"pz:size-4\" /> Output fields\n </span>\n);\n\nexport function SearchCatalogOutputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogOutputFieldFilterProps) {\n return (\n <SearchCatalogColumnFilter\n id=\"outputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,oBAC9B;;AAGT,SAAgB,+BAA+B,EAC7C,SACA,cAAc,qBACd,WACA,UACsC;AACtC,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
1
+ {"version":3,"file":"output-field-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/output-field-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { ArrowDown } from \"../../internal/icons.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogOutputFieldFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <ArrowDown className=\"pz:size-4\" /> Output fields\n </span>\n);\n\nexport function SearchCatalogOutputFieldFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogOutputFieldFilterProps) {\n return (\n <SearchCatalogColumnFilter\n id=\"outputFields\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,oBAC9B;;AAGT,SAAgB,+BAA+B,EAC7C,SACA,cAAc,qBACd,WACA,UACsC;AACtC,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
@@ -1,8 +1,8 @@
1
1
  import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
2
+ import { Building2 } from "../../internal/icons.mjs";
2
3
  import { SearchCatalogColumnFilter } from "./column-filter.mjs";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
5
  import { getProviderEntry } from "@pipe0/base";
5
- import { Building2 } from "lucide-react";
6
6
 
7
7
  //#region src/components/compound/search-catalog/provider-filter.tsx
8
8
  const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/provider-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport { Building2 } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogProviderFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Building2 className=\"pz:size-4\" /> Provider\n </span>\n);\n\nexport function SearchCatalogProviderFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogProviderFilterProps) {\n const ctx = useSearchCatalogContext();\n const resolvedOptions =\n options ??\n ctx.sortedProviderEntries.map(([name]) => ({\n label: name,\n value: name,\n imageSrc: getProviderEntry(name as ProviderName)?.logoUrl,\n }));\n\n return (\n <SearchCatalogColumnFilter\n id=\"providers\"\n placeholder={placeholder}\n options={resolvedOptions}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;;;AAeA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,eAC9B;;AAGT,SAAgB,4BAA4B,EAC1C,SACA,cAAc,qBACd,WACA,UACmC;CACnC,MAAM,MAAM,yBAAyB;AASrC,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACb,SAXF,WACA,IAAI,sBAAsB,KAAK,CAAC,WAAW;GACzC,OAAO;GACP,OAAO;GACP,UAAU,iBAAiB,KAAqB,EAAE;GACnD,EAAE;EAOU;EACH;EACR"}
1
+ {"version":3,"file":"provider-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/provider-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport type { ReactNode } from \"react\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { Building2 } from \"../../internal/icons.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogProviderFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Building2 className=\"pz:size-4\" /> Provider\n </span>\n);\n\nexport function SearchCatalogProviderFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogProviderFilterProps) {\n const ctx = useSearchCatalogContext();\n const resolvedOptions =\n options ??\n ctx.sortedProviderEntries.map(([name]) => ({\n label: name,\n value: name,\n imageSrc: getProviderEntry(name as ProviderName)?.logoUrl,\n }));\n\n return (\n <SearchCatalogColumnFilter\n id=\"providers\"\n placeholder={placeholder}\n options={resolvedOptions}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;;;AAeA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,WAAD,EAAW,WAAU,aAAc,eAC9B;;AAGT,SAAgB,4BAA4B,EAC1C,SACA,cAAc,qBACd,WACA,UACmC;CACnC,MAAM,MAAM,yBAAyB;AASrC,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACb,SAXF,WACA,IAAI,sBAAsB,KAAK,CAAC,WAAW;GACzC,OAAO;GACP,OAAO;GACP,UAAU,iBAAiB,KAAqB,EAAE;GACnD,EAAE;EAOU;EACH;EACR"}
@@ -1,11 +1,11 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
2
  import { useCatalogConfig } from "../../../context/catalog-config-context.mjs";
3
3
  import { useSearchCatalogContext } from "../../../context/search-catalog-context.mjs";
4
+ import { Search } from "../../internal/icons.mjs";
4
5
  import { Input } from "../../ui/input.mjs";
5
6
  import { mergeProps } from "@base-ui/react/merge-props";
6
7
  import { useRender } from "@base-ui/react/use-render";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
- import { Search } from "lucide-react";
9
9
 
10
10
  //#region src/components/compound/search-catalog/search-filter.tsx
11
11
  function SearchCatalogSearchFilter({ placeholder = "Search searches...", className, render, ...props }) {
@@ -1 +1 @@
1
- {"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/search-catalog/search-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { Search as SearchIcon } from \"lucide-react\";\nimport type { ChangeEvent } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface SearchCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface SearchCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", SearchCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function SearchCatalogSearchFilter({\n placeholder = \"Search searches...\",\n className,\n render,\n ...props\n}: SearchCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = useSearchCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n const inputElement = useRender({\n defaultTagName: \"input\",\n render,\n state: { value: globalFilterInput, setValue: setGlobalFilterInput, isActive },\n stateAttributesMapping: {\n setValue: () => null,\n },\n props: mergeProps<\"input\">(\n {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n className: render ? cn(classNames?.searchInput, className) : undefined,\n },\n props,\n ),\n });\n\n if (render) return inputElement;\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,0BAA0B,EACxC,cAAc,sBACd,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,EAAE,mBAAmB,yBAAyB,yBAAyB;CAC7E,MAAM,EAAE,eAAe,kBAAkB;CAGzC,MAAM,eAAe,UAAU;EAC7B,gBAAgB;EAChB;EACA,OAAO;GAAE,OAAO;GAAmB,UAAU;GAAsB,UALpD,CAAC,CAAC;GAK4D;EAC7E,wBAAwB,EACtB,gBAAgB,MACjB;EACD,OAAO,WACL;GACE,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,WAAW,SAAS,GAAG,YAAY,aAAa,UAAU,GAAG;GAC9D,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
1
+ {"version":3,"file":"search-filter.mjs","names":["SearchIcon"],"sources":["../../../../src/components/compound/search-catalog/search-filter.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport type { ChangeEvent } from \"react\";\nimport { useCatalogConfig } from \"../../../context/catalog-config-context.js\";\nimport { useSearchCatalogContext } from \"../../../context/search-catalog-context.js\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { Search as SearchIcon } from \"../../internal/icons.js\";\nimport { Input } from \"../../ui/input.js\";\n\nexport interface SearchCatalogSearchFilterState {\n value: string;\n setValue: (value: string) => void;\n isActive: boolean;\n}\n\nexport interface SearchCatalogSearchFilterProps\n extends useRender.ComponentProps<\"input\", SearchCatalogSearchFilterState> {\n placeholder?: string;\n}\n\nexport function SearchCatalogSearchFilter({\n placeholder = \"Search searches...\",\n className,\n render,\n ...props\n}: SearchCatalogSearchFilterProps) {\n const { globalFilterInput, setGlobalFilterInput } = useSearchCatalogContext();\n const { classNames } = useCatalogConfig();\n const isActive = !!globalFilterInput;\n\n const inputElement = useRender({\n defaultTagName: \"input\",\n render,\n state: { value: globalFilterInput, setValue: setGlobalFilterInput, isActive },\n stateAttributesMapping: {\n setValue: () => null,\n },\n props: mergeProps<\"input\">(\n {\n type: \"search\",\n placeholder,\n value: globalFilterInput,\n onChange: (e: ChangeEvent<HTMLInputElement>) => setGlobalFilterInput(e.target.value),\n className: render ? cn(classNames?.searchInput, className) : undefined,\n },\n props,\n ),\n });\n\n if (render) return inputElement;\n\n return (\n <div data-p0=\"catalog-search\" className={cn(\"pz:relative\", classNames?.searchInputContainer)}>\n <SearchIcon className=\"pz:absolute pz:left-2.5 pz:top-1/2 pz:-translate-y-1/2 pz:size-4 pz:text-muted-foreground pz:pointer-events-none\" />\n <Input\n type=\"search\"\n placeholder={placeholder}\n value={globalFilterInput}\n onChange={(e) => setGlobalFilterInput(e.target.value)}\n className={cn(\"pz:pl-8\", classNames?.searchInput, className)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,0BAA0B,EACxC,cAAc,sBACd,WACA,QACA,GAAG,SAC8B;CACjC,MAAM,EAAE,mBAAmB,yBAAyB,yBAAyB;CAC7E,MAAM,EAAE,eAAe,kBAAkB;CAGzC,MAAM,eAAe,UAAU;EAC7B,gBAAgB;EAChB;EACA,OAAO;GAAE,OAAO;GAAmB,UAAU;GAAsB,UALpD,CAAC,CAAC;GAK4D;EAC7E,wBAAwB,EACtB,gBAAgB,MACjB;EACD,OAAO,WACL;GACE,MAAM;GACN;GACA,OAAO;GACP,WAAW,MAAqC,qBAAqB,EAAE,OAAO,MAAM;GACpF,WAAW,SAAS,GAAG,YAAY,aAAa,UAAU,GAAG;GAC9D,EACD,MACD;EACF,CAAC;AAEF,KAAI,OAAQ,QAAO;AAEnB,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAiB,WAAW,GAAG,eAAe,YAAY,qBAAqB;YAA5F,CACE,oBAACA,QAAD,EAAY,WAAU,oHAAqH,GAC3I,oBAAC,OAAD;GACE,MAAK;GACQ;GACb,OAAO;GACP,WAAW,MAAM,qBAAqB,EAAE,OAAO,MAAM;GACrD,WAAW,GAAG,WAAW,YAAY,aAAa,UAAU;GAC5D,EACE"}
@@ -1,6 +1,6 @@
1
+ import { Tag } from "../../internal/icons.mjs";
1
2
  import { SearchCatalogColumnFilter } from "./column-filter.mjs";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Tag } from "lucide-react";
4
4
 
5
5
  //#region src/components/compound/search-catalog/tag-filter.tsx
6
6
  const DEFAULT_PLACEHOLDER = /* @__PURE__ */ jsxs("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/tag-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport { Tag } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogTagFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Tag className=\"pz:size-4\" /> Tag\n </span>\n);\n\nexport function SearchCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogTagFilterProps) {\n return (\n <SearchCatalogColumnFilter\n id=\"tags\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,KAAD,EAAK,WAAU,aAAc,UACxB;;AAGT,SAAgB,uBAAuB,EACrC,SACA,cAAc,qBACd,WACA,UAC8B;AAC9B,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
1
+ {"version":3,"file":"tag-filter.mjs","names":[],"sources":["../../../../src/components/compound/search-catalog/tag-filter.tsx"],"sourcesContent":["import type { useRender } from \"@base-ui/react/use-render\";\nimport type { ReactNode } from \"react\";\nimport type { FilterSelectOption } from \"../../defaults/catalog/filter-select.js\";\nimport { Tag } from \"../../internal/icons.js\";\nimport { type ColumnFilterState, SearchCatalogColumnFilter } from \"./column-filter.js\";\n\nexport interface SearchCatalogTagFilterProps {\n options?: ReadonlyArray<FilterSelectOption>;\n placeholder?: ReactNode;\n className?: string;\n render?: useRender.ComponentProps<\"div\", ColumnFilterState>[\"render\"];\n}\n\nconst DEFAULT_PLACEHOLDER = (\n <span className=\"pz:inline-flex pz:items-center pz:gap-1.5\">\n <Tag className=\"pz:size-4\" /> Tag\n </span>\n);\n\nexport function SearchCatalogTagFilter({\n options,\n placeholder = DEFAULT_PLACEHOLDER,\n className,\n render,\n}: SearchCatalogTagFilterProps) {\n return (\n <SearchCatalogColumnFilter\n id=\"tags\"\n placeholder={placeholder}\n options={options}\n className={className}\n render={render}\n />\n );\n}\n"],"mappings":";;;;;AAaA,MAAM,sBACJ,qBAAC,QAAD;CAAM,WAAU;WAAhB,CACE,oBAAC,KAAD,EAAK,WAAU,aAAc,UACxB;;AAGT,SAAgB,uBAAuB,EACrC,SACA,cAAc,qBACd,WACA,UAC8B;AAC9B,QACE,oBAAC,2BAAD;EACE,IAAG;EACU;EACJ;EACE;EACH;EACR"}
@@ -1,8 +1,8 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
2
  import { Button } from "../../ui/button.mjs";
3
+ import { IconChevronDown, IconEye, IconEyeOff, IconPlus, IconRefresh, IconTrash } from "../../internal/icons.mjs";
3
4
  import { Input } from "../../ui/input.mjs";
4
5
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../ui/select.mjs";
5
- import { IconChevronDown, IconEye, IconEyeOff, IconPlus, IconRefresh, IconTrash } from "../../internal/icons.mjs";
6
6
  import { HoverInfo } from "../../hover-info.mjs";
7
7
  import { useFieldError } from "../../../hooks/use-field-error.mjs";
8
8
  import { Label } from "../../ui/label.mjs";
@@ -1,9 +1,9 @@
1
1
  import { Button } from "../../ui/button.mjs";
2
+ import { Plus, X } from "../../internal/icons.mjs";
2
3
  import { Input } from "../../ui/input.mjs";
3
4
  import { FieldLegend } from "../../internal/field-legend.mjs";
4
5
  import { LiquidEditor } from "../../internal/LiquidEditor/LiquidEditor.mjs";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { Plus, X } from "lucide-react";
7
7
 
8
8
  //#region src/components/defaults/adapters/loose-object-input.tsx
9
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"loose-object-input.mjs","names":[],"sources":["../../../../src/components/defaults/adapters/loose-object-input.tsx"],"sourcesContent":["import { Plus, X } from \"lucide-react\";\nimport type { FieldHandle } from \"../../../types/field-handle.js\";\nimport { FieldLegend } from \"../../internal/field-legend.js\";\nimport { LiquidEditor } from \"../../internal/LiquidEditor/LiquidEditor.js\";\nimport { Button } from \"../../ui/button.js\";\nimport { Input } from \"../../ui/input.js\";\n\n/**\n * Adapter for `pipesLooseObjectInput`. The form value is a plain\n * `Record<string, string>`; each entry renders as a row. The key is the\n * object key, so it's a literal text input (committed on blur, which is when\n * the row's React key — the object key — changes). The value cell uses\n * `LiquidEditor` so it supports `/` references (input fields + secrets +\n * constants). Empty and duplicate keys aren't meaningful for an object and\n * aren't supported; `maxKeys` bounds the number of entries.\n *\n * The per-cell legend would otherwise render once per value cell — too noisy.\n * The value editors run with `hideLegend`; a single legend renders below the\n * list.\n */\nexport function LooseObjectInputAdapter(field: FieldHandle<\"loose_object_input\">) {\n const { value, setObject, searchSecrets, searchConstants, meta } = field;\n const entries = Object.entries(value);\n const maxKeys = meta.maxKeys ?? 50;\n const canAdd = entries.length < maxKeys;\n\n // Rebuild the object, renaming `oldKey`→`newKey` in place (order preserved).\n const renameKey = (oldKey: string, newKey: string) => {\n if (newKey === oldKey) return;\n const next: Record<string, string> = {};\n for (const [k, v] of Object.entries(value)) next[k === oldKey ? newKey : k] = v;\n setObject(next);\n };\n const setEntryValue = (key: string, v: string) => setObject({ ...value, [key]: v });\n const removeKey = (key: string) => {\n const { [key]: _removed, ...rest } = value;\n setObject(rest);\n };\n // One blank slot at a time — fill its key before adding another.\n const addEntry = () => {\n if (Object.hasOwn(value, \"\")) return;\n setObject({ ...value, \"\": \"\" });\n };\n\n return (\n <div data-p0=\"input\" className=\"pz:flex pz:flex-col pz:gap-2\">\n {entries.length === 0 && (\n <p className=\"pz:text-xs pz:text-muted-foreground\">\n {meta.keyLabel ? `No ${meta.keyLabel.toLowerCase()}s yet.` : \"No entries yet.\"}\n </p>\n )}\n {entries.map(([key, val]) => (\n <div key={key} className=\"pz:flex pz:items-start pz:gap-2\">\n {/* shrink-0: a long value must wrap, not squeeze the key input. */}\n <div className=\"pz:basis-1/3 pz:shrink-0\">\n <Input\n defaultValue={key}\n onBlur={(e) => renameKey(key, e.target.value)}\n placeholder={meta.keyPlaceholder ?? meta.keyLabel ?? \"Key\"}\n />\n </div>\n <div className=\"pz:min-w-0 pz:flex-1 pz:wrap-anywhere pz:rounded-md pz:border pz:border-input pz:bg-transparent\">\n <LiquidEditor\n value={val}\n onChange={(v) => setEntryValue(key, v)}\n inputFields={meta.inputFields ?? []}\n searchSecrets={searchSecrets}\n searchConstants={searchConstants}\n placeholder={meta.valuePlaceholder ?? meta.valueLabel ?? \"Value\"}\n hideLegend\n />\n </div>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Remove row\"\n onClick={() => removeKey(key)}\n >\n <X className=\"pz:size-4\" />\n </Button>\n </div>\n ))}\n {entries.length > 0 && (\n <FieldLegend entries={[{ key: \"/\", label: \"to insert a reference\" }]} />\n )}\n <div>\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={addEntry} disabled={!canAdd}>\n <Plus className=\"pz:size-4 pz:mr-1\" />\n Add {meta.keyLabel ?? \"row\"}\n </Button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,wBAAwB,OAA0C;CAChF,MAAM,EAAE,OAAO,WAAW,eAAe,iBAAiB,SAAS;CACnE,MAAM,UAAU,OAAO,QAAQ,MAAM;CACrC,MAAM,UAAU,KAAK,WAAW;CAChC,MAAM,SAAS,QAAQ,SAAS;CAGhC,MAAM,aAAa,QAAgB,WAAmB;AACpD,MAAI,WAAW,OAAQ;EACvB,MAAM,OAA+B,EAAE;AACvC,OAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,MAAM,CAAE,MAAK,MAAM,SAAS,SAAS,KAAK;AAC9E,YAAU,KAAK;;CAEjB,MAAM,iBAAiB,KAAa,MAAc,UAAU;EAAE,GAAG;GAAQ,MAAM;EAAG,CAAC;CACnF,MAAM,aAAa,QAAgB;EACjC,MAAM,GAAG,MAAM,UAAU,GAAG,SAAS;AACrC,YAAU,KAAK;;CAGjB,MAAM,iBAAiB;AACrB,MAAI,OAAO,OAAO,OAAO,GAAG,CAAE;AAC9B,YAAU;GAAE,GAAG;GAAO,IAAI;GAAI,CAAC;;AAGjC,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAQ,WAAU;YAA/B;GACG,QAAQ,WAAW,KAClB,oBAAC,KAAD;IAAG,WAAU;cACV,KAAK,WAAW,MAAM,KAAK,SAAS,aAAa,CAAC,UAAU;IAC3D;GAEL,QAAQ,KAAK,CAAC,KAAK,SAClB,qBAAC,OAAD;IAAe,WAAU;cAAzB;KAEE,oBAAC,OAAD;MAAK,WAAU;gBACb,oBAAC,OAAD;OACE,cAAc;OACd,SAAS,MAAM,UAAU,KAAK,EAAE,OAAO,MAAM;OAC7C,aAAa,KAAK,kBAAkB,KAAK,YAAY;OACrD;MACE;KACN,oBAAC,OAAD;MAAK,WAAU;gBACb,oBAAC,cAAD;OACE,OAAO;OACP,WAAW,MAAM,cAAc,KAAK,EAAE;OACtC,aAAa,KAAK,eAAe,EAAE;OACpB;OACE;OACjB,aAAa,KAAK,oBAAoB,KAAK,cAAc;OACzD;OACA;MACE;KACN,oBAAC,QAAD;MACE,MAAK;MACL,SAAQ;MACR,MAAK;MACL,cAAW;MACX,eAAe,UAAU,IAAI;gBAE7B,oBAAC,GAAD,EAAG,WAAU,aAAc;MACpB;KACL;MA7BI,IA6BJ,CACN;GACD,QAAQ,SAAS,KAChB,oBAAC,aAAD,EAAa,SAAS,CAAC;IAAE,KAAK;IAAK,OAAO;IAAyB,CAAC,EAAI;GAE1E,oBAAC,OAAD,YACE,qBAAC,QAAD;IAAQ,MAAK;IAAS,SAAQ;IAAU,MAAK;IAAK,SAAS;IAAU,UAAU,CAAC;cAAhF;KACE,oBAAC,MAAD,EAAM,WAAU,qBAAsB;;KACjC,KAAK,YAAY;KACf;OACL;GACF"}
1
+ {"version":3,"file":"loose-object-input.mjs","names":[],"sources":["../../../../src/components/defaults/adapters/loose-object-input.tsx"],"sourcesContent":["import type { FieldHandle } from \"../../../types/field-handle.js\";\nimport { FieldLegend } from \"../../internal/field-legend.js\";\nimport { Plus, X } from \"../../internal/icons.js\";\nimport { LiquidEditor } from \"../../internal/LiquidEditor/LiquidEditor.js\";\nimport { Button } from \"../../ui/button.js\";\nimport { Input } from \"../../ui/input.js\";\n\n/**\n * Adapter for `pipesLooseObjectInput`. The form value is a plain\n * `Record<string, string>`; each entry renders as a row. The key is the\n * object key, so it's a literal text input (committed on blur, which is when\n * the row's React key — the object key — changes). The value cell uses\n * `LiquidEditor` so it supports `/` references (input fields + secrets +\n * constants). Empty and duplicate keys aren't meaningful for an object and\n * aren't supported; `maxKeys` bounds the number of entries.\n *\n * The per-cell legend would otherwise render once per value cell — too noisy.\n * The value editors run with `hideLegend`; a single legend renders below the\n * list.\n */\nexport function LooseObjectInputAdapter(field: FieldHandle<\"loose_object_input\">) {\n const { value, setObject, searchSecrets, searchConstants, meta } = field;\n const entries = Object.entries(value);\n const maxKeys = meta.maxKeys ?? 50;\n const canAdd = entries.length < maxKeys;\n\n // Rebuild the object, renaming `oldKey`→`newKey` in place (order preserved).\n const renameKey = (oldKey: string, newKey: string) => {\n if (newKey === oldKey) return;\n const next: Record<string, string> = {};\n for (const [k, v] of Object.entries(value)) next[k === oldKey ? newKey : k] = v;\n setObject(next);\n };\n const setEntryValue = (key: string, v: string) => setObject({ ...value, [key]: v });\n const removeKey = (key: string) => {\n const { [key]: _removed, ...rest } = value;\n setObject(rest);\n };\n // One blank slot at a time — fill its key before adding another.\n const addEntry = () => {\n if (Object.hasOwn(value, \"\")) return;\n setObject({ ...value, \"\": \"\" });\n };\n\n return (\n <div data-p0=\"input\" className=\"pz:flex pz:flex-col pz:gap-2\">\n {entries.length === 0 && (\n <p className=\"pz:text-xs pz:text-muted-foreground\">\n {meta.keyLabel ? `No ${meta.keyLabel.toLowerCase()}s yet.` : \"No entries yet.\"}\n </p>\n )}\n {entries.map(([key, val]) => (\n <div key={key} className=\"pz:flex pz:items-start pz:gap-2\">\n {/* shrink-0: a long value must wrap, not squeeze the key input. */}\n <div className=\"pz:basis-1/3 pz:shrink-0\">\n <Input\n defaultValue={key}\n onBlur={(e) => renameKey(key, e.target.value)}\n placeholder={meta.keyPlaceholder ?? meta.keyLabel ?? \"Key\"}\n />\n </div>\n <div className=\"pz:min-w-0 pz:flex-1 pz:wrap-anywhere pz:rounded-md pz:border pz:border-input pz:bg-transparent\">\n <LiquidEditor\n value={val}\n onChange={(v) => setEntryValue(key, v)}\n inputFields={meta.inputFields ?? []}\n searchSecrets={searchSecrets}\n searchConstants={searchConstants}\n placeholder={meta.valuePlaceholder ?? meta.valueLabel ?? \"Value\"}\n hideLegend\n />\n </div>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n aria-label=\"Remove row\"\n onClick={() => removeKey(key)}\n >\n <X className=\"pz:size-4\" />\n </Button>\n </div>\n ))}\n {entries.length > 0 && (\n <FieldLegend entries={[{ key: \"/\", label: \"to insert a reference\" }]} />\n )}\n <div>\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={addEntry} disabled={!canAdd}>\n <Plus className=\"pz:size-4 pz:mr-1\" />\n Add {meta.keyLabel ?? \"row\"}\n </Button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,wBAAwB,OAA0C;CAChF,MAAM,EAAE,OAAO,WAAW,eAAe,iBAAiB,SAAS;CACnE,MAAM,UAAU,OAAO,QAAQ,MAAM;CACrC,MAAM,UAAU,KAAK,WAAW;CAChC,MAAM,SAAS,QAAQ,SAAS;CAGhC,MAAM,aAAa,QAAgB,WAAmB;AACpD,MAAI,WAAW,OAAQ;EACvB,MAAM,OAA+B,EAAE;AACvC,OAAK,MAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,MAAM,CAAE,MAAK,MAAM,SAAS,SAAS,KAAK;AAC9E,YAAU,KAAK;;CAEjB,MAAM,iBAAiB,KAAa,MAAc,UAAU;EAAE,GAAG;GAAQ,MAAM;EAAG,CAAC;CACnF,MAAM,aAAa,QAAgB;EACjC,MAAM,GAAG,MAAM,UAAU,GAAG,SAAS;AACrC,YAAU,KAAK;;CAGjB,MAAM,iBAAiB;AACrB,MAAI,OAAO,OAAO,OAAO,GAAG,CAAE;AAC9B,YAAU;GAAE,GAAG;GAAO,IAAI;GAAI,CAAC;;AAGjC,QACE,qBAAC,OAAD;EAAK,WAAQ;EAAQ,WAAU;YAA/B;GACG,QAAQ,WAAW,KAClB,oBAAC,KAAD;IAAG,WAAU;cACV,KAAK,WAAW,MAAM,KAAK,SAAS,aAAa,CAAC,UAAU;IAC3D;GAEL,QAAQ,KAAK,CAAC,KAAK,SAClB,qBAAC,OAAD;IAAe,WAAU;cAAzB;KAEE,oBAAC,OAAD;MAAK,WAAU;gBACb,oBAAC,OAAD;OACE,cAAc;OACd,SAAS,MAAM,UAAU,KAAK,EAAE,OAAO,MAAM;OAC7C,aAAa,KAAK,kBAAkB,KAAK,YAAY;OACrD;MACE;KACN,oBAAC,OAAD;MAAK,WAAU;gBACb,oBAAC,cAAD;OACE,OAAO;OACP,WAAW,MAAM,cAAc,KAAK,EAAE;OACtC,aAAa,KAAK,eAAe,EAAE;OACpB;OACE;OACjB,aAAa,KAAK,oBAAoB,KAAK,cAAc;OACzD;OACA;MACE;KACN,oBAAC,QAAD;MACE,MAAK;MACL,SAAQ;MACR,MAAK;MACL,cAAW;MACX,eAAe,UAAU,IAAI;gBAE7B,oBAAC,GAAD,EAAG,WAAU,aAAc;MACpB;KACL;MA7BI,IA6BJ,CACN;GACD,QAAQ,SAAS,KAChB,oBAAC,aAAD,EAAa,SAAS,CAAC;IAAE,KAAK;IAAK,OAAO;IAAyB,CAAC,EAAI;GAE1E,oBAAC,OAAD,YACE,qBAAC,QAAD;IAAQ,MAAK;IAAS,SAAQ;IAAU,MAAK;IAAK,SAAS;IAAU,UAAU,CAAC;cAAhF;KACE,oBAAC,MAAD,EAAM,WAAU,qBAAsB;;KACjC,KAAK,YAAY;KACf;OACL;GACF"}
@@ -1,8 +1,8 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
2
  import { Button } from "../../ui/button.mjs";
3
+ import { IconPlus } from "../../internal/icons.mjs";
3
4
  import { Input } from "../../ui/input.mjs";
4
5
  import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "../../ui/select.mjs";
5
- import { IconPlus } from "../../internal/icons.mjs";
6
6
  import { HoverInfo } from "../../hover-info.mjs";
7
7
  import { Badge } from "../../ui/badge.mjs";
8
8
  import { useFieldError } from "../../../hooks/use-field-error.mjs";
@@ -1,7 +1,7 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
2
  import { Button } from "../../ui/button.mjs";
3
- import { Input } from "../../ui/input.mjs";
4
3
  import { IconCheck, IconPencil, IconPlus, IconTrash } from "../../internal/icons.mjs";
4
+ import { Input } from "../../ui/input.mjs";
5
5
  import { useFieldError } from "../../../hooks/use-field-error.mjs";
6
6
  import { generateRandomString } from "../../../utils/generate-random-string.mjs";
7
7
  import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.mjs";
@@ -1,5 +1,5 @@
1
1
  import { cn } from "../../../lib/utils.mjs";
2
- import { IconGripVertical, IconPlus } from "../../internal/icons.mjs";
2
+ import { IconGripVertical, IconPlus, Search, X } from "../../internal/icons.mjs";
3
3
  import { PricingBadge } from "../../../widgets/pricing-badge.mjs";
4
4
  import { WidgetStrip } from "../../../widgets/widget-strip.mjs";
5
5
  import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.mjs";
@@ -7,7 +7,6 @@ import { AvatarGroup } from "../../../widgets/avatar-group.mjs";
7
7
  import { useMemo, useState } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { providerCatalog } from "@pipe0/base";
10
- import { Search, X } from "lucide-react";
11
10
  import { DndContext, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
12
11
  import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
13
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"providers-input.mjs","names":["XIcon","SearchIcon"],"sources":["../../../../src/components/defaults/adapters/providers-input.tsx"],"sourcesContent":["import {\n closestCenter,\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport { SortableContext, useSortable, verticalListSortingStrategy } from \"@dnd-kit/sortable\";\nimport { type ProviderName, providerCatalog, type WidgetsByKind } from \"@pipe0/base\";\nimport { Search as SearchIcon, X as XIcon } from \"lucide-react\";\nimport { type CSSProperties, useMemo, useState } from \"react\";\nimport { cn } from \"../../../lib/utils.js\";\nimport type { FieldHandle } from \"../../../types/field-handle.js\";\nimport { AvatarGroup } from \"../../../widgets/avatar-group.js\";\nimport { PricingBadge } from \"../../../widgets/pricing-badge.js\";\nimport { WidgetStrip } from \"../../../widgets/widget-strip.js\";\nimport { IconGripVertical, IconPlus } from \"../../internal/icons.js\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../../ui/popover.js\";\n\ntype ProviderOption = {\n value: string;\n label: string;\n widgets?: WidgetsByKind;\n};\n\n// Stored payloads may reference providers that are no longer offered\n// (deprecated providers are excluded from the options but stay valid), so\n// resolve their display data from the provider catalog to keep the row\n// legible and removable.\nfunction resolveFallbackOption(value: string): ProviderOption {\n if (!(value in providerCatalog)) return { value, label: value };\n const provider = value as ProviderName;\n return {\n value,\n label: providerCatalog[provider].label,\n widgets: { provider_logo: { provider } },\n };\n}\n\nfunction splitWidgets(widgets: WidgetsByKind | undefined): {\n providerName: ProviderName | undefined;\n leading: WidgetsByKind | undefined;\n pricing: WidgetsByKind[\"pricing\"] | undefined;\n} {\n if (!widgets) return { providerName: undefined, leading: undefined, pricing: undefined };\n const { pricing, provider_logo, ...rest } = widgets;\n const hasLeading = Object.values(rest).some((v) => v != null);\n return {\n providerName: provider_logo?.provider,\n leading: hasLeading ? rest : undefined,\n pricing,\n };\n}\n\nfunction LeadingAvatar({\n providerName,\n leading,\n}: {\n providerName: ProviderName | undefined;\n leading: WidgetsByKind | undefined;\n}) {\n if (providerName) {\n return <AvatarGroup providers={[providerName]} size=\"sm\" className=\"pz:shrink-0\" />;\n }\n if (leading) {\n return (\n <span className=\"pz:flex pz:items-center pz:shrink-0\">\n <WidgetStrip widgets={leading} size={18} />\n </span>\n );\n }\n return null;\n}\n\n/**\n * Provider waterfall — vertical, ordered list of providers tried sequentially\n * until a valid result is returned. The list makes the running order legible\n * (numeric badge per row, drag-to-reorder), and the credit widget per\n * provider stays visible.\n */\nexport function ProvidersInputAdapter(field: FieldHandle<\"providers_input\">) {\n const selected: string[] = useMemo(\n () => (field.value ?? []).map((p: { provider: string }) => p.provider),\n [field.value],\n );\n\n const options = field.options ?? [];\n const optionByValue = useMemo(() => {\n const map = new Map<string, ProviderOption>();\n for (const o of options) map.set(o.value, o);\n return map;\n }, [options]);\n\n const maxItems = field.meta.maxItems;\n const atMax = maxItems !== undefined && selected.length >= maxItems;\n\n const setValue = (next: string[]) => field.setValue(next.map((provider) => ({ provider })));\n\n const handleRemove = (value: string) => setValue(selected.filter((v) => v !== value));\n const handleAdd = (value: string) => {\n if (selected.includes(value)) return;\n setValue([...selected, value]);\n };\n\n const sensors = useSensors(\n useSensor(PointerSensor, { activationConstraint: { distance: 4 } }),\n useSensor(KeyboardSensor),\n );\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event;\n if (!over || active.id === over.id) return;\n const from = selected.indexOf(String(active.id));\n const to = selected.indexOf(String(over.id));\n if (from === -1 || to === -1) return;\n const next = [...selected];\n const [moved] = next.splice(from, 1);\n next.splice(to, 0, moved);\n setValue(next);\n };\n\n return (\n <div data-p0=\"input\" className=\"pz:flex pz:flex-col pz:gap-1\">\n {selected.length > 0 && (\n <DndContext sensors={sensors} collisionDetection={closestCenter} onDragEnd={handleDragEnd}>\n <SortableContext items={selected} strategy={verticalListSortingStrategy}>\n <ul className=\"pz:flex pz:flex-col pz:gap-0.5 pz:list-none pz:m-0 pz:p-0\">\n {selected.map((value, index) => {\n const option = optionByValue.get(value) ?? resolveFallbackOption(value);\n return (\n <ProviderRow\n key={value}\n value={value}\n index={index}\n label={option.label}\n widgets={option.widgets}\n onRemove={() => handleRemove(value)}\n />\n );\n })}\n </ul>\n </SortableContext>\n </DndContext>\n )}\n {!atMax && (\n <AddProviderControl\n options={options}\n excluded={selected}\n onAdd={handleAdd}\n ariaInvalid={!!field.error}\n />\n )}\n </div>\n );\n}\n\nfunction ProviderRow({\n value,\n index,\n label,\n widgets,\n onRemove,\n}: {\n value: string;\n index: number;\n label: string;\n widgets?: WidgetsByKind;\n onRemove: () => void;\n}) {\n const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({\n id: value,\n });\n const style: CSSProperties = {\n transform: transform\n ? `translate3d(${Math.round(transform.x)}px, ${Math.round(transform.y)}px, 0)`\n : undefined,\n transition,\n opacity: isDragging ? 0.6 : 1,\n };\n\n const { providerName, leading, pricing } = splitWidgets(widgets);\n const orderLabel = String(index + 1);\n\n return (\n <li\n ref={setNodeRef}\n style={style}\n className={cn(\n \"pz:group/prov pz:flex pz:items-center pz:gap-2.5 pz:rounded-md pz:px-1.5 pz:py-1.5\",\n \"pz:hover:bg-muted/60 pz:transition-colors\",\n )}\n {...attributes}\n >\n <button\n type=\"button\"\n aria-label=\"Drag to reorder\"\n className={cn(\n \"pz:flex pz:items-center pz:justify-center pz:size-4 pz:cursor-grab pz:touch-none\",\n \"pz:text-muted-foreground/60 pz:hover:text-foreground pz:transition-colors\",\n )}\n {...listeners}\n >\n <IconGripVertical width={11} height={14} />\n </button>\n <LeadingAvatar providerName={providerName} leading={leading} />\n <span className=\"pz:text-sm pz:font-medium pz:text-foreground pz:flex-1 pz:truncate\">\n {label}\n </span>\n {pricing && <PricingBadge credits={pricing.credits} />}\n <span\n aria-hidden\n className={cn(\n \"pz:inline-flex pz:items-center pz:justify-center pz:min-w-7 pz:h-5 pz:px-1.5\",\n \"pz:rounded-full pz:bg-muted pz:text-muted-foreground pz:text-[10.5px]\",\n \"pz:font-medium pz:tabular-nums\",\n )}\n >\n {orderLabel}\n </span>\n <button\n type=\"button\"\n aria-label={`Remove ${label}`}\n onClick={(e) => {\n e.stopPropagation();\n onRemove();\n }}\n className={cn(\n \"pz:flex pz:items-center pz:justify-center pz:size-5 pz:rounded\",\n \"pz:text-muted-foreground/70\",\n \"pz:hover:bg-destructive/10 pz:hover:text-destructive pz:transition-colors\",\n )}\n >\n <XIcon className=\"pz:size-3\" />\n </button>\n </li>\n );\n}\n\nfunction AddProviderControl({\n options,\n excluded,\n onAdd,\n ariaInvalid,\n}: {\n options: ProviderOption[];\n excluded: string[];\n onAdd: (value: string) => void;\n ariaInvalid?: boolean;\n}) {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n\n const excludedSet = useMemo(() => new Set(excluded), [excluded]);\n const available = useMemo(\n () => options.filter((o) => !excludedSet.has(o.value)),\n [options, excludedSet],\n );\n\n const filtered = useMemo(() => {\n const q = query.trim().toLowerCase();\n if (!q) return available;\n return available.filter(\n (o) => o.label.toLowerCase().includes(q) || o.value.toLowerCase().includes(q),\n );\n }, [available, query]);\n\n if (available.length === 0 && excluded.length === 0) {\n return (\n <div className=\"pz:text-xs pz:text-muted-foreground pz:px-1.5 pz:py-2\">\n No providers available\n </div>\n );\n }\n\n if (available.length === 0) return null;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (!next) setQuery(\"\");\n }}\n >\n <PopoverTrigger\n aria-invalid={ariaInvalid || undefined}\n className={cn(\n \"pz:flex pz:items-center pz:justify-center pz:gap-1.5 pz:w-full\",\n \"pz:px-2.5 pz:py-1.5 pz:mt-1 pz:rounded-md\",\n \"pz:border pz:border-dashed pz:border-input pz:bg-transparent\",\n \"pz:text-xs pz:text-muted-foreground\",\n \"pz:hover:bg-muted/60 pz:hover:text-foreground pz:hover:border-muted-foreground/40\",\n \"pz:transition-colors pz:cursor-pointer\",\n )}\n >\n <IconPlus width={12} height={12} />\n Add provider\n </PopoverTrigger>\n <PopoverContent align=\"start\" className=\"pz:w-(--anchor-width) pz:p-0 pz:gap-0\">\n <div className=\"pz:flex pz:items-center pz:gap-1.5 pz:px-2.5 pz:py-2 pz:border-b pz:border-border\">\n <SearchIcon className=\"pz:size-3.5 pz:text-muted-foreground pz:shrink-0\" />\n <input\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder=\"Search providers…\"\n // biome-ignore lint/a11y/noAutofocus: popover-scoped picker\n autoFocus\n className=\"pz:flex-1 pz:bg-transparent pz:outline-none pz:text-sm pz:placeholder:text-muted-foreground/70\"\n />\n </div>\n <ul className=\"pz:flex pz:flex-col pz:p-1 pz:max-h-72 pz:overflow-auto pz:list-none pz:m-0\">\n {filtered.length === 0 && (\n <li className=\"pz:px-2 pz:py-3 pz:text-center pz:text-xs pz:text-muted-foreground\">\n No providers\n </li>\n )}\n {filtered.map((option) => {\n const { providerName, leading, pricing } = splitWidgets(option.widgets);\n return (\n <li key={option.value} className=\"pz:contents\">\n <button\n type=\"button\"\n onClick={() => {\n onAdd(option.value);\n setOpen(false);\n setQuery(\"\");\n }}\n className={cn(\n \"pz:flex pz:items-center pz:gap-2 pz:w-full pz:text-left\",\n \"pz:px-2 pz:py-1.5 pz:rounded-md pz:text-sm\",\n \"pz:hover:bg-accent pz:hover:text-accent-foreground\",\n \"pz:transition-colors pz:cursor-pointer\",\n )}\n >\n <LeadingAvatar providerName={providerName} leading={leading} />\n <span className=\"pz:flex-1 pz:truncate\">{option.label}</span>\n {pricing && <PricingBadge credits={pricing.credits} />}\n </button>\n </li>\n );\n })}\n </ul>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA+BA,SAAS,sBAAsB,OAA+B;AAC5D,KAAI,EAAE,SAAS,iBAAkB,QAAO;EAAE;EAAO,OAAO;EAAO;CAC/D,MAAM,WAAW;AACjB,QAAO;EACL;EACA,OAAO,gBAAgB,UAAU;EACjC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE;EACzC;;AAGH,SAAS,aAAa,SAIpB;AACA,KAAI,CAAC,QAAS,QAAO;EAAE,cAAc;EAAW,SAAS;EAAW,SAAS;EAAW;CACxF,MAA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WAAU;YAAwD;EAEjE;AAIV,KAAI,UAAU,WAAW,EAAG,QAAO;AAEnC,QACE,qBAAC,SAAD;EACQ;EACN,eAAe,SAAS;AACtB,WAAQ,KAAK;AACb,OAAI,CAAC,KAAM,UAAS,GAAG;;YAJ3B,CAOE,qBAAC,gBAAD;GACE,gBAAc,eAAe;GAC7B,WAAW,GACT,kEACA,6CACA,gEACA,uCACA,qFACA,yCACD;aATH,CAWE,oBAAC,UAAD;IAAU,OAAO;IAAI,QAAQ;IAAM,kBAEpB;MACjB,qBAAC,gBAAD;GAAgB,OAAM;GAAQ,WAAU;aAAxC,CACE,qBAAC,OAAD;IAAK,WAAU;cAAf,CACE,oBAACC,QAAD,EAAY,WAAU,oDAAqD,GAC3E,oBAAC,SAAD;KACE,OAAO;KACP,WAAW,MAAM,SAAS,EAAE,OAAO,MAAM;KACzC,aAAY;KAEZ;KACA,WAAU;KACV,EACE;OACN,qBAAC,MAAD;IAAI,WAAU;cAAd,CACG,SAAS,WAAW,KACnB,oBAAC,MAAD;KAAI,WAAU;eAAqE;KAE9E,GAEN,SAAS,KAAK,WAAW;KACxB,MAAM,EAAE,cAAc,SAAS,YAAY,aAAa,OAAO,QAAQ;AACvE,YACE,oBAAC,MAAD;MAAuB,WAAU;gBAC/B,qBAAC,UAAD;OACE,MAAK;OACL,eAAe;AACb,cAAM,OAAO,MAAM;AACnB,gBAAQ,MAAM;AACd,iBAAS,GAAG;;OAEd,WAAW,GACT,2DACA,8CACA,sDACA,yCACD;iBAZH;QAcE,oBAAC,eAAD;SAA6B;SAAuB;SAAW;QAC/D,oBAAC,QAAD;SAAM,WAAU;mBAAyB,OAAO;SAAa;QAC5D,WAAW,oBAAC,cAAD,EAAc,SAAS,QAAQ,SAAW;QAC/C;;MACN,EAnBI,OAAO,MAmBX;MAEP,CACC;MACU;KACT"}
1
+ {"version":3,"file":"providers-input.mjs","names":["XIcon","SearchIcon"],"sources":["../../../../src/components/defaults/adapters/providers-input.tsx"],"sourcesContent":["import {\n closestCenter,\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport { SortableContext, useSortable, verticalListSortingStrategy } from \"@dnd-kit/sortable\";\nimport { type ProviderName, providerCatalog, type WidgetsByKind } from \"@pipe0/base\";\nimport { type CSSProperties, useMemo, useState } from \"react\";\nimport { cn } from \"../../../lib/utils.js\";\nimport type { FieldHandle } from \"../../../types/field-handle.js\";\nimport { AvatarGroup } from \"../../../widgets/avatar-group.js\";\nimport { PricingBadge } from \"../../../widgets/pricing-badge.js\";\nimport { WidgetStrip } from \"../../../widgets/widget-strip.js\";\nimport {\n IconGripVertical,\n IconPlus,\n Search as SearchIcon,\n X as XIcon,\n} from \"../../internal/icons.js\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../../ui/popover.js\";\n\ntype ProviderOption = {\n value: string;\n label: string;\n widgets?: WidgetsByKind;\n};\n\n// Stored payloads may reference providers that are no longer offered\n// (deprecated providers are excluded from the options but stay valid), so\n// resolve their display data from the provider catalog to keep the row\n// legible and removable.\nfunction resolveFallbackOption(value: string): ProviderOption {\n if (!(value in providerCatalog)) return { value, label: value };\n const provider = value as ProviderName;\n return {\n value,\n label: providerCatalog[provider].label,\n widgets: { provider_logo: { provider } },\n };\n}\n\nfunction splitWidgets(widgets: WidgetsByKind | undefined): {\n providerName: ProviderName | undefined;\n leading: WidgetsByKind | undefined;\n pricing: WidgetsByKind[\"pricing\"] | undefined;\n} {\n if (!widgets) return { providerName: undefined, leading: undefined, pricing: undefined };\n const { pricing, provider_logo, ...rest } = widgets;\n const hasLeading = Object.values(rest).some((v) => v != null);\n return {\n providerName: provider_logo?.provider,\n leading: hasLeading ? rest : undefined,\n pricing,\n };\n}\n\nfunction LeadingAvatar({\n providerName,\n leading,\n}: {\n providerName: ProviderName | undefined;\n leading: WidgetsByKind | undefined;\n}) {\n if (providerName) {\n return <AvatarGroup providers={[providerName]} size=\"sm\" className=\"pz:shrink-0\" />;\n }\n if (leading) {\n return (\n <span className=\"pz:flex pz:items-center pz:shrink-0\">\n <WidgetStrip widgets={leading} size={18} />\n </span>\n );\n }\n return null;\n}\n\n/**\n * Provider waterfall — vertical, ordered list of providers tried sequentially\n * until a valid result is returned. The list makes the running order legible\n * (numeric badge per row, drag-to-reorder), and the credit widget per\n * provider stays visible.\n */\nexport function ProvidersInputAdapter(field: FieldHandle<\"providers_input\">) {\n const selected: string[] = useMemo(\n () => (field.value ?? []).map((p: { provider: string }) => p.provider),\n [field.value],\n );\n\n const options = field.options ?? [];\n const optionByValue = useMemo(() => {\n const map = new Map<string, ProviderOption>();\n for (const o of options) map.set(o.value, o);\n return map;\n }, [options]);\n\n const maxItems = field.meta.maxItems;\n const atMax = maxItems !== undefined && selected.length >= maxItems;\n\n const setValue = (next: string[]) => field.setValue(next.map((provider) => ({ provider })));\n\n const handleRemove = (value: string) => setValue(selected.filter((v) => v !== value));\n const handleAdd = (value: string) => {\n if (selected.includes(value)) return;\n setValue([...selected, value]);\n };\n\n const sensors = useSensors(\n useSensor(PointerSensor, { activationConstraint: { distance: 4 } }),\n useSensor(KeyboardSensor),\n );\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event;\n if (!over || active.id === over.id) return;\n const from = selected.indexOf(String(active.id));\n const to = selected.indexOf(String(over.id));\n if (from === -1 || to === -1) return;\n const next = [...selected];\n const [moved] = next.splice(from, 1);\n next.splice(to, 0, moved);\n setValue(next);\n };\n\n return (\n <div data-p0=\"input\" className=\"pz:flex pz:flex-col pz:gap-1\">\n {selected.length > 0 && (\n <DndContext sensors={sensors} collisionDetection={closestCenter} onDragEnd={handleDragEnd}>\n <SortableContext items={selected} strategy={verticalListSortingStrategy}>\n <ul className=\"pz:flex pz:flex-col pz:gap-0.5 pz:list-none pz:m-0 pz:p-0\">\n {selected.map((value, index) => {\n const option = optionByValue.get(value) ?? resolveFallbackOption(value);\n return (\n <ProviderRow\n key={value}\n value={value}\n index={index}\n label={option.label}\n widgets={option.widgets}\n onRemove={() => handleRemove(value)}\n />\n );\n })}\n </ul>\n </SortableContext>\n </DndContext>\n )}\n {!atMax && (\n <AddProviderControl\n options={options}\n excluded={selected}\n onAdd={handleAdd}\n ariaInvalid={!!field.error}\n />\n )}\n </div>\n );\n}\n\nfunction ProviderRow({\n value,\n index,\n label,\n widgets,\n onRemove,\n}: {\n value: string;\n index: number;\n label: string;\n widgets?: WidgetsByKind;\n onRemove: () => void;\n}) {\n const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({\n id: value,\n });\n const style: CSSProperties = {\n transform: transform\n ? `translate3d(${Math.round(transform.x)}px, ${Math.round(transform.y)}px, 0)`\n : undefined,\n transition,\n opacity: isDragging ? 0.6 : 1,\n };\n\n const { providerName, leading, pricing } = splitWidgets(widgets);\n const orderLabel = String(index + 1);\n\n return (\n <li\n ref={setNodeRef}\n style={style}\n className={cn(\n \"pz:group/prov pz:flex pz:items-center pz:gap-2.5 pz:rounded-md pz:px-1.5 pz:py-1.5\",\n \"pz:hover:bg-muted/60 pz:transition-colors\",\n )}\n {...attributes}\n >\n <button\n type=\"button\"\n aria-label=\"Drag to reorder\"\n className={cn(\n \"pz:flex pz:items-center pz:justify-center pz:size-4 pz:cursor-grab pz:touch-none\",\n \"pz:text-muted-foreground/60 pz:hover:text-foreground pz:transition-colors\",\n )}\n {...listeners}\n >\n <IconGripVertical width={11} height={14} />\n </button>\n <LeadingAvatar providerName={providerName} leading={leading} />\n <span className=\"pz:text-sm pz:font-medium pz:text-foreground pz:flex-1 pz:truncate\">\n {label}\n </span>\n {pricing && <PricingBadge credits={pricing.credits} />}\n <span\n aria-hidden\n className={cn(\n \"pz:inline-flex pz:items-center pz:justify-center pz:min-w-7 pz:h-5 pz:px-1.5\",\n \"pz:rounded-full pz:bg-muted pz:text-muted-foreground pz:text-[10.5px]\",\n \"pz:font-medium pz:tabular-nums\",\n )}\n >\n {orderLabel}\n </span>\n <button\n type=\"button\"\n aria-label={`Remove ${label}`}\n onClick={(e) => {\n e.stopPropagation();\n onRemove();\n }}\n className={cn(\n \"pz:flex pz:items-center pz:justify-center pz:size-5 pz:rounded\",\n \"pz:text-muted-foreground/70\",\n \"pz:hover:bg-destructive/10 pz:hover:text-destructive pz:transition-colors\",\n )}\n >\n <XIcon className=\"pz:size-3\" />\n </button>\n </li>\n );\n}\n\nfunction AddProviderControl({\n options,\n excluded,\n onAdd,\n ariaInvalid,\n}: {\n options: ProviderOption[];\n excluded: string[];\n onAdd: (value: string) => void;\n ariaInvalid?: boolean;\n}) {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n\n const excludedSet = useMemo(() => new Set(excluded), [excluded]);\n const available = useMemo(\n () => options.filter((o) => !excludedSet.has(o.value)),\n [options, excludedSet],\n );\n\n const filtered = useMemo(() => {\n const q = query.trim().toLowerCase();\n if (!q) return available;\n return available.filter(\n (o) => o.label.toLowerCase().includes(q) || o.value.toLowerCase().includes(q),\n );\n }, [available, query]);\n\n if (available.length === 0 && excluded.length === 0) {\n return (\n <div className=\"pz:text-xs pz:text-muted-foreground pz:px-1.5 pz:py-2\">\n No providers available\n </div>\n );\n }\n\n if (available.length === 0) return null;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (!next) setQuery(\"\");\n }}\n >\n <PopoverTrigger\n aria-invalid={ariaInvalid || undefined}\n className={cn(\n \"pz:flex pz:items-center pz:justify-center pz:gap-1.5 pz:w-full\",\n \"pz:px-2.5 pz:py-1.5 pz:mt-1 pz:rounded-md\",\n \"pz:border pz:border-dashed pz:border-input pz:bg-transparent\",\n \"pz:text-xs pz:text-muted-foreground\",\n \"pz:hover:bg-muted/60 pz:hover:text-foreground pz:hover:border-muted-foreground/40\",\n \"pz:transition-colors pz:cursor-pointer\",\n )}\n >\n <IconPlus width={12} height={12} />\n Add provider\n </PopoverTrigger>\n <PopoverContent align=\"start\" className=\"pz:w-(--anchor-width) pz:p-0 pz:gap-0\">\n <div className=\"pz:flex pz:items-center pz:gap-1.5 pz:px-2.5 pz:py-2 pz:border-b pz:border-border\">\n <SearchIcon className=\"pz:size-3.5 pz:text-muted-foreground pz:shrink-0\" />\n <input\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder=\"Search providers…\"\n // biome-ignore lint/a11y/noAutofocus: popover-scoped picker\n autoFocus\n className=\"pz:flex-1 pz:bg-transparent pz:outline-none pz:text-sm pz:placeholder:text-muted-foreground/70\"\n />\n </div>\n <ul className=\"pz:flex pz:flex-col pz:p-1 pz:max-h-72 pz:overflow-auto pz:list-none pz:m-0\">\n {filtered.length === 0 && (\n <li className=\"pz:px-2 pz:py-3 pz:text-center pz:text-xs pz:text-muted-foreground\">\n No providers\n </li>\n )}\n {filtered.map((option) => {\n const { providerName, leading, pricing } = splitWidgets(option.widgets);\n return (\n <li key={option.value} className=\"pz:contents\">\n <button\n type=\"button\"\n onClick={() => {\n onAdd(option.value);\n setOpen(false);\n setQuery(\"\");\n }}\n className={cn(\n \"pz:flex pz:items-center pz:gap-2 pz:w-full pz:text-left\",\n \"pz:px-2 pz:py-1.5 pz:rounded-md pz:text-sm\",\n \"pz:hover:bg-accent pz:hover:text-accent-foreground\",\n \"pz:transition-colors pz:cursor-pointer\",\n )}\n >\n <LeadingAvatar providerName={providerName} leading={leading} />\n <span className=\"pz:flex-1 pz:truncate\">{option.label}</span>\n {pricing && <PricingBadge credits={pricing.credits} />}\n </button>\n </li>\n );\n })}\n </ul>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAmCA,SAAS,sBAAsB,OAA+B;AAC5D,KAAI,EAAE,SAAS,iBAAkB,QAAO;EAAE;EAAO,OAAO;EAAO;CAC/D,MAAM,WAAW;AACjB,QAAO;EACL;EACA,OAAO,gBAAgB,UAAU;EACjC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE;EACzC;;AAGH,SAAS,aAAa,SAIpB;AACA,KAAI,CAAC,QAAS,QAAO;EAAE,cAAc;EAAW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ectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "../../ui/select.mjs";
2
3
  import { WidgetStrip } from "../../../widgets/widget-strip.mjs";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { X } from "lucide-react";
5
5
 
6
6
  //#region src/components/defaults/adapters/select-input.tsx
7
7
  function OptionContent({ label, widgets }) {