neba 1.17.1 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/a2ui/adapter-catalog.json +1 -1
  2. package/dist/a2ui/catalog.json +2 -2
  3. package/dist/a2ui/index.d.ts +2 -0
  4. package/dist/a2ui/schema.d.ts +11 -1
  5. package/dist/a2ui/schema.js +1 -1
  6. package/dist/components/alert/Alert.js +1 -1
  7. package/dist/components/animate-counter/AnimateCounter.d.ts +6 -0
  8. package/dist/components/animate-counter/AnimateCounter.js +1 -1
  9. package/dist/components/animate-headline/AnimateHeadline.js +1 -1
  10. package/dist/components/animate-scramble/AnimateScramble.d.ts +9 -3
  11. package/dist/components/animate-scramble/AnimateScramble.js +1 -1
  12. package/dist/components/animate-split/AnimateSplit.d.ts +7 -1
  13. package/dist/components/animate-split/AnimateSplit.js +1 -1
  14. package/dist/components/animate-typing/AnimateTyping.d.ts +6 -0
  15. package/dist/components/animate-typing/AnimateTyping.js +1 -1
  16. package/dist/components/app-logo/AppLogo.js +1 -1
  17. package/dist/components/approval/Approval.js +1 -1
  18. package/dist/components/breadcrumb/Breadcrumb.d.ts +16 -0
  19. package/dist/components/breadcrumb/Breadcrumb.js +1 -1
  20. package/dist/components/calendar/Calendar.js +1 -1
  21. package/dist/components/card/Card.js +1 -1
  22. package/dist/components/carousel/Carousel.d.ts +3 -2
  23. package/dist/components/carousel/Carousel.js +1 -1
  24. package/dist/components/chat-bubble/ChatBubble.d.ts +6 -0
  25. package/dist/components/chat-bubble/ChatBubble.js +1 -1
  26. package/dist/components/code-block/CodeBlock.d.ts +2 -2
  27. package/dist/components/code-block/CodeBlock.js +1 -1
  28. package/dist/components/code-block/index.d.ts +2 -1
  29. package/dist/components/code-block/index.js +1 -1
  30. package/dist/components/color-picker/ColorPicker.js +1 -1
  31. package/dist/components/combobox/Combobox.js +1 -1
  32. package/dist/components/context-window/ContextWindow.js +1 -1
  33. package/dist/components/data-table/DataTable.d.ts +13 -1
  34. package/dist/components/data-table/DataTable.js +1 -1
  35. package/dist/components/date-picker/DatePicker.js +1 -1
  36. package/dist/components/date-range-picker/DateRangePicker.js +1 -1
  37. package/dist/components/date-time-picker/DateTimePicker.js +1 -1
  38. package/dist/components/drawer/Drawer.d.ts +21 -0
  39. package/dist/components/drawer/Drawer.js +1 -1
  40. package/dist/components/empty/Empty.js +1 -1
  41. package/dist/components/file-picker/FilePicker.d.ts +0 -8
  42. package/dist/components/file-picker/FilePicker.js +1 -1
  43. package/dist/components/file-picker/formatFileSize.d.ts +8 -0
  44. package/dist/components/file-picker/formatFileSize.js +1 -0
  45. package/dist/components/file-picker/index.d.ts +2 -1
  46. package/dist/components/file-picker/index.js +1 -1
  47. package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
  48. package/dist/components/gallery/Gallery.d.ts +45 -3
  49. package/dist/components/gallery/Gallery.js +1 -1
  50. package/dist/components/gallery/GalleryViewer.js +1 -1
  51. package/dist/components/gauge-chart/GaugeChart.js +1 -1
  52. package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
  53. package/dist/components/how-to-steps/HowToSteps.d.ts +14 -0
  54. package/dist/components/how-to-steps/HowToSteps.js +1 -1
  55. package/dist/components/image/Image.d.ts +31 -6
  56. package/dist/components/image/Image.js +1 -1
  57. package/dist/components/menu/Menu.d.ts +17 -0
  58. package/dist/components/menu/Menu.js +1 -1
  59. package/dist/components/meter/Meter.js +1 -1
  60. package/dist/components/mockup/Mockup.js +1 -1
  61. package/dist/components/number-field/NumberField.js +1 -1
  62. package/dist/components/page-layout/PageLayout.js +1 -1
  63. package/dist/components/panes/Panes.js +1 -1
  64. package/dist/components/pie-chart/PieChart.js +1 -1
  65. package/dist/components/pill/Pill.js +1 -1
  66. package/dist/components/progress-box/ProgressBox.js +1 -1
  67. package/dist/components/progress-circular/ProgressCircular.js +1 -1
  68. package/dist/components/progress-linear/ProgressLinear.js +1 -1
  69. package/dist/components/prompt-input/PromptInput.js +1 -1
  70. package/dist/components/provider/NebaProvider.d.ts +0 -20
  71. package/dist/components/provider/NebaProvider.js +1 -1
  72. package/dist/components/provider/colorSchemeScript.d.ts +23 -0
  73. package/dist/components/provider/colorSchemeScript.js +1 -0
  74. package/dist/components/provider/index.d.ts +2 -1
  75. package/dist/components/provider/index.js +1 -1
  76. package/dist/components/reasoning/Reasoning.d.ts +21 -0
  77. package/dist/components/reasoning/Reasoning.js +1 -1
  78. package/dist/components/scatter-chart/ScatterChart.js +1 -1
  79. package/dist/components/scroll-zone/ScrollZone.js +1 -1
  80. package/dist/components/segmented-button/SegmentedButton.js +1 -1
  81. package/dist/components/select/Select.js +1 -1
  82. package/dist/components/sidebar/Sidebar.d.ts +13 -0
  83. package/dist/components/sidebar/Sidebar.js +1 -1
  84. package/dist/components/slider/Slider.js +1 -1
  85. package/dist/components/sources/Sources.d.ts +11 -0
  86. package/dist/components/sources/Sources.js +1 -1
  87. package/dist/components/spoiler/Spoiler.js +1 -1
  88. package/dist/components/statistic/Statistic.js +1 -1
  89. package/dist/components/streaming-text/StreamingText.d.ts +22 -11
  90. package/dist/components/streaming-text/StreamingText.js +1 -1
  91. package/dist/components/tabs/Tabs.d.ts +12 -1
  92. package/dist/components/tabs/Tabs.js +1 -1
  93. package/dist/components/text-link/TextLink.d.ts +7 -0
  94. package/dist/components/text-link/TextLink.js +1 -1
  95. package/dist/components/time-picker/TimePicker.js +1 -1
  96. package/dist/components/timeline-chart/TimelineChart.js +1 -1
  97. package/dist/components/toast/Toast.js +1 -1
  98. package/dist/components/tool-call/ToolCall.d.ts +11 -0
  99. package/dist/components/tool-call/ToolCall.js +1 -1
  100. package/dist/components/tour/Tour.js +1 -1
  101. package/dist/components/tree-view/TreeView.d.ts +13 -1
  102. package/dist/components/tree-view/TreeView.js +1 -1
  103. package/dist/components/typography/Typography.d.ts +7 -0
  104. package/dist/components/typography/Typography.js +1 -1
  105. package/dist/components/window-pane/WindowPane.js +1 -1
  106. package/dist/hooks/useElementSize.js +1 -1
  107. package/dist/internal/animate.js +1 -1
  108. package/dist/internal/calendar.d.ts +2 -2
  109. package/dist/internal/calendar.js +1 -1
  110. package/dist/internal/chart-frame.d.ts +59 -2
  111. package/dist/internal/chart-frame.js +1 -1
  112. package/dist/internal/chart-line.js +1 -1
  113. package/dist/internal/format.d.ts +7 -0
  114. package/dist/internal/format.js +1 -1
  115. package/dist/internal/highlight.d.ts +9 -0
  116. package/dist/internal/highlight.js +1 -1
  117. package/dist/internal/layout-effect.d.ts +17 -0
  118. package/dist/internal/layout-effect.js +1 -0
  119. package/dist/internal/media.d.ts +20 -0
  120. package/dist/internal/media.js +1 -1
  121. package/dist/internal/menu.d.ts +5 -0
  122. package/dist/internal/observe.d.ts +4 -1
  123. package/dist/internal/observe.js +1 -1
  124. package/dist/internal/overrides.d.ts +55 -0
  125. package/dist/internal/overrides.js +1 -0
  126. package/dist/internal/page-layout.d.ts +26 -1
  127. package/dist/internal/page-layout.js +1 -1
  128. package/dist/internal/run.d.ts +6 -1
  129. package/dist/internal/run.js +1 -1
  130. package/dist/internal/sizer.d.ts +10 -0
  131. package/dist/internal/sizer.js +1 -1
  132. package/dist/internal/styles.d.ts +28 -2
  133. package/dist/internal/styles.js +1 -1
  134. package/dist/internal/text.d.ts +25 -3
  135. package/dist/internal/text.js +1 -1
  136. package/dist/styles.css +1 -1
  137. package/dist/tailwind.css +91 -72
  138. package/package.json +2 -2
@@ -1 +1 @@
1
- {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://neba.cdget.com/a2ui/1.17/catalog.json","protocolVersion":"1.0","catalogId":"https://neba.cdget.com/a2ui/1.17/catalog.json","components":{"Flex":{"type":"object","properties":{"component":{"const":"Flex"},"children":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/ChildList"},"direction":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal"},"spacing":{"type":"number","default":0},"justifyContent":{"type":"string","enum":["start","center","end","space-between","space-around","space-evenly","stretch"],"default":"start"},"alignItems":{"type":"string","enum":["start","center","end","stretch","baseline"],"default":"stretch"},"wrap":{"type":"boolean","default":false}},"required":["component","children"]},"Card":{"type":"object","properties":{"component":{"const":"Card"},"child":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Child"},"title":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"subtitle":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"elevation":{"type":"integer","enum":[0,1,2,3],"default":0}},"required":["component"]},"Divider":{"type":"object","properties":{"component":{"const":"Divider"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"}},"required":["component"]},"Typography":{"type":"object","properties":{"component":{"const":"Typography"},"text":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"level":{"type":"string","enum":["h1","h2","h3","h4","h5","h6","body","lead","caption","overline"],"default":"body"},"weight":{"type":"string","enum":["regular","medium","semibold","bold"],"default":"regular"},"align":{"type":"string","enum":["start","center","end","justify"]},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"]},"lines":{"type":"integer","minimum":1}},"required":["component","text"]},"Image":{"type":"object","properties":{"component":{"const":"Image"},"src":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"alt":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"ratio":{"type":"number"},"fit":{"type":"string","enum":["cover","contain","fill","none","scale-down"],"default":"cover"},"rounded":{"type":"string","enum":["xs","sm","md","lg","xl"]}},"required":["component","src","alt"]},"Chip":{"type":"object","properties":{"component":{"const":"Chip"},"text":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"count":{"type":"number"},"selected":{"type":"boolean","default":false}},"required":["component","text"]},"Avatar":{"type":"object","properties":{"component":{"const":"Avatar"},"src":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"name":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"shape":{"type":"string","enum":["circle","square"],"default":"circle"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"}},"required":["component"]},"Statistic":{"type":"object","properties":{"component":{"const":"Statistic"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"unit":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"caption":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"previousValue":{"type":"number"},"delta":{"type":"string","enum":["percent","absolute","both","none"],"default":"percent"},"betterWhen":{"type":"string","enum":["up","down"],"default":"up"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"align":{"type":"string","enum":["start","center","end"],"default":"start"}},"required":["component","value"]},"DataList":{"type":"object","properties":{"component":{"const":"DataList"},"items":{"type":"array","items":{"type":"object","properties":{"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"}},"required":["label","value"],"additionalProperties":false}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal"},"dividers":{"type":"boolean","default":false},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"density":{"type":"string","enum":["default","compact"],"default":"default"}},"required":["component","items"]},"Alert":{"type":"object","properties":{"component":{"const":"Alert"},"child":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Child"},"title":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"info"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"density":{"type":"string","enum":["default","compact"],"default":"default"}},"required":["component"]},"Button":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"Button"},"text":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"action":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Action"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"solid"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"elevation":{"type":"integer","enum":[0,1,2,3],"default":0},"loading":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"fullWidth":{"type":"boolean","default":false}},"required":["component","text","action"]}]},"TextField":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"TextField"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"placeholder":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"multiline":{"type":"boolean","default":false},"rows":{"type":"integer","minimum":1,"default":3},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"fullWidth":{"type":"boolean","default":false}},"required":["component","label"]}]},"NumberField":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"NumberField"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","default":1},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false}},"required":["component","label"]}]},"Checkbox":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"Checkbox"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"checked":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false}},"required":["component","label"]}]},"Switch":{"type":"object","properties":{"component":{"const":"Switch"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"checked":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"disabled":{"type":"boolean","default":false}},"required":["component","label"]},"RadioGroup":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"RadioGroup"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"type":"string"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"disabled":{"type":"boolean","default":false}},"required":["label","value"],"additionalProperties":false}},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"vertical"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false}},"required":["component","label","options"]}]},"Select":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"Select"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"placeholder":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"type":"string"},"group":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"disabled":{"type":"boolean","default":false}},"required":["value"],"additionalProperties":false}},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"fullWidth":{"type":"boolean","default":false}},"required":["component","label","options"]}]},"Slider":{"type":"object","properties":{"component":{"const":"Slider"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"min":{"type":"number","default":0},"max":{"type":"number","default":100},"step":{"type":"number","default":1},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"disabled":{"type":"boolean","default":false}},"required":["component","label"]}},"functions":{"required":{"type":"object","properties":{"call":{"const":"required"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"length":{"type":"object","properties":{"call":{"const":"length"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"min":{"type":"number"},"max":{"type":"number"}},"required":["value"],"unevaluatedProperties":false,"anyOf":[{"required":["min"]},{"required":["max"]}]}},"required":["call","args"],"returnType":"boolean"},"regex":{"type":"object","properties":{"call":{"const":"regex"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"pattern":{"type":"string"}},"required":["value","pattern"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"numeric":{"type":"object","properties":{"call":{"const":"numeric"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"min":{"type":"number"},"max":{"type":"number"}},"required":["value"],"unevaluatedProperties":false,"anyOf":[{"required":["min"]},{"required":["max"]}]}},"required":["call","args"],"returnType":"boolean"},"email":{"type":"object","properties":{"call":{"const":"email"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"formatString":{"type":"object","properties":{"call":{"const":"formatString"},"args":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"formatNumber":{"type":"object","properties":{"call":{"const":"formatNumber"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"decimals":{"type":"number"},"grouping":{"type":"boolean","default":true}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"formatCurrency":{"type":"object","properties":{"call":{"const":"formatCurrency"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"currency":{"type":"string"},"decimals":{"type":"number"},"grouping":{"type":"boolean","default":true}},"required":["value","currency"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"formatDate":{"type":"object","properties":{"call":{"const":"formatDate"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"format":{"type":"string"}},"required":["value","format"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"pluralize":{"type":"object","properties":{"call":{"const":"pluralize"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"zero":{"type":"string"},"one":{"type":"string"},"two":{"type":"string"},"few":{"type":"string"},"many":{"type":"string"},"other":{"type":"string"}},"required":["value","other"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"openUrl":{"type":"object","properties":{"call":{"const":"openUrl"},"args":{"type":"object","properties":{"url":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"}},"required":["url"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"void","allowedCallers":"rendererOnly","requiresUserActivation":true},"and":{"type":"object","properties":{"call":{"const":"and"},"args":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"},"minItems":2}},"required":["values"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"or":{"type":"object","properties":{"call":{"const":"or"},"args":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"},"minItems":2}},"required":["values"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"not":{"type":"object","properties":{"call":{"const":"not"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"}},"$defs":{"anyComponent":{"oneOf":[{"$ref":"#/components/Flex"},{"$ref":"#/components/Card"},{"$ref":"#/components/Divider"},{"$ref":"#/components/Typography"},{"$ref":"#/components/Image"},{"$ref":"#/components/Chip"},{"$ref":"#/components/Avatar"},{"$ref":"#/components/Statistic"},{"$ref":"#/components/DataList"},{"$ref":"#/components/Alert"},{"$ref":"#/components/Button"},{"$ref":"#/components/TextField"},{"$ref":"#/components/NumberField"},{"$ref":"#/components/Checkbox"},{"$ref":"#/components/Switch"},{"$ref":"#/components/RadioGroup"},{"$ref":"#/components/Select"},{"$ref":"#/components/Slider"}],"discriminator":{"propertyName":"component"}},"anyFunction":{"oneOf":[{"$ref":"#/functions/required"},{"$ref":"#/functions/length"},{"$ref":"#/functions/regex"},{"$ref":"#/functions/numeric"},{"$ref":"#/functions/email"},{"$ref":"#/functions/formatString"},{"$ref":"#/functions/formatNumber"},{"$ref":"#/functions/formatCurrency"},{"$ref":"#/functions/formatDate"},{"$ref":"#/functions/pluralize"},{"$ref":"#/functions/openUrl"},{"$ref":"#/functions/and"},{"$ref":"#/functions/or"},{"$ref":"#/functions/not"}]}}}
1
+ {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://neba.cdget.com/a2ui/1.18/catalog.json","protocolVersion":"1.0","catalogId":"https://neba.cdget.com/a2ui/1.18/catalog.json","components":{"Flex":{"type":"object","properties":{"component":{"const":"Flex"},"children":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/ChildList"},"direction":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal"},"spacing":{"type":"number","default":0},"justifyContent":{"type":"string","enum":["start","center","end","space-between","space-around","space-evenly","stretch"],"default":"start"},"alignItems":{"type":"string","enum":["start","center","end","stretch","baseline"],"default":"stretch"},"wrap":{"type":"boolean","default":false}},"required":["component","children"]},"Card":{"type":"object","properties":{"component":{"const":"Card"},"child":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Child"},"title":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"subtitle":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"elevation":{"type":"integer","enum":[0,1,2,3],"default":0}},"required":["component"]},"Divider":{"type":"object","properties":{"component":{"const":"Divider"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"}},"required":["component"]},"Typography":{"type":"object","properties":{"component":{"const":"Typography"},"text":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"level":{"type":"string","enum":["h1","h2","h3","h4","h5","h6","body","lead","caption","overline"],"default":"body"},"weight":{"type":"string","enum":["regular","medium","semibold","bold"],"default":"regular"},"align":{"type":"string","enum":["start","center","end","justify"]},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"]},"lines":{"type":"integer","minimum":1}},"required":["component","text"]},"Image":{"type":"object","properties":{"component":{"const":"Image"},"src":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"alt":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"ratio":{"type":"number"},"fit":{"type":"string","enum":["cover","contain","fill","none","scale-down"],"default":"cover"},"rounded":{"type":"string","enum":["xs","sm","md","lg","xl"]}},"required":["component","src","alt"]},"Chip":{"type":"object","properties":{"component":{"const":"Chip"},"text":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"count":{"type":"number"},"selected":{"type":"boolean","default":false}},"required":["component","text"]},"Avatar":{"type":"object","properties":{"component":{"const":"Avatar"},"src":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"name":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"shape":{"type":"string","enum":["circle","square"],"default":"circle"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"}},"required":["component"]},"Statistic":{"type":"object","properties":{"component":{"const":"Statistic"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"unit":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"caption":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"previousValue":{"type":"number"},"delta":{"type":"string","enum":["percent","absolute","both","none"],"default":"percent"},"betterWhen":{"type":"string","enum":["up","down"],"default":"up"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"align":{"type":"string","enum":["start","center","end"],"default":"start"}},"required":["component","value"]},"DataList":{"type":"object","properties":{"component":{"const":"DataList"},"items":{"type":"array","items":{"type":"object","properties":{"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"}},"required":["label","value"],"additionalProperties":false}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal"},"dividers":{"type":"boolean","default":false},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"density":{"type":"string","enum":["default","compact"],"default":"default"}},"required":["component","items"]},"Alert":{"type":"object","properties":{"component":{"const":"Alert"},"child":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Child"},"title":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"info"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"density":{"type":"string","enum":["default","compact"],"default":"default"}},"required":["component"]},"Button":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"Button"},"text":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"action":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Action"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"solid"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"elevation":{"type":"integer","enum":[0,1,2,3],"default":0},"loading":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"fullWidth":{"type":"boolean","default":false}},"required":["component","text","action"]}]},"TextField":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"TextField"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"placeholder":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"multiline":{"type":"boolean","default":false},"rows":{"type":"integer","minimum":1,"default":3},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"fullWidth":{"type":"boolean","default":false}},"required":["component","label"]}]},"NumberField":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"NumberField"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","default":1},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false}},"required":["component","label"]}]},"Checkbox":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"Checkbox"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"checked":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false}},"required":["component","label"]}]},"Switch":{"type":"object","properties":{"component":{"const":"Switch"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"checked":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"disabled":{"type":"boolean","default":false}},"required":["component","label"]},"RadioGroup":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"RadioGroup"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"type":"string"},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"disabled":{"type":"boolean","default":false}},"required":["label","value"],"additionalProperties":false}},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"vertical"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false}},"required":["component","label","options"]}]},"Select":{"type":"object","allOf":[{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/Checkable"},{"type":"object","properties":{"component":{"const":"Select"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"placeholder":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"options":{"type":"array","items":{"type":"object","properties":{"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"type":"string"},"group":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"disabled":{"type":"boolean","default":false}},"required":["value"],"additionalProperties":false}},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"variant":{"type":"string","enum":["solid","outline","text"],"default":"outline"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"density":{"type":"string","enum":["default","compact"],"default":"default"},"required":{"type":"boolean","default":false},"disabled":{"type":"boolean","default":false},"fullWidth":{"type":"boolean","default":false}},"required":["component","label","options"]}]},"Slider":{"type":"object","properties":{"component":{"const":"Slider"},"label":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"min":{"type":"number","default":0},"max":{"type":"number","default":100},"step":{"type":"number","default":1},"description":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"size":{"type":"string","enum":["xs","sm","md","lg","xl"],"default":"md"},"color":{"type":"string","enum":["primary","secondary","success","warning","danger","info"],"default":"primary"},"disabled":{"type":"boolean","default":false}},"required":["component","label"]}},"functions":{"required":{"type":"object","properties":{"call":{"const":"required"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"length":{"type":"object","properties":{"call":{"const":"length"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"min":{"type":"number"},"max":{"type":"number"}},"required":["value"],"unevaluatedProperties":false,"anyOf":[{"required":["min"]},{"required":["max"]}]}},"required":["call","args"],"returnType":"boolean"},"regex":{"type":"object","properties":{"call":{"const":"regex"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"pattern":{"type":"string"}},"required":["value","pattern"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"numeric":{"type":"object","properties":{"call":{"const":"numeric"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"min":{"type":"number"},"max":{"type":"number"}},"required":["value"],"unevaluatedProperties":false,"anyOf":[{"required":["min"]},{"required":["max"]}]}},"required":["call","args"],"returnType":"boolean"},"email":{"type":"object","properties":{"call":{"const":"email"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"formatString":{"type":"object","properties":{"call":{"const":"formatString"},"args":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"formatNumber":{"type":"object","properties":{"call":{"const":"formatNumber"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"decimals":{"type":"number"},"grouping":{"type":"boolean","default":true}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"formatCurrency":{"type":"object","properties":{"call":{"const":"formatCurrency"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"currency":{"type":"string"},"decimals":{"type":"number"},"grouping":{"type":"boolean","default":true}},"required":["value","currency"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"formatDate":{"type":"object","properties":{"call":{"const":"formatDate"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"},"format":{"type":"string"}},"required":["value","format"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"pluralize":{"type":"object","properties":{"call":{"const":"pluralize"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber"},"zero":{"type":"string"},"one":{"type":"string"},"two":{"type":"string"},"few":{"type":"string"},"many":{"type":"string"},"other":{"type":"string"}},"required":["value","other"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"string"},"openUrl":{"type":"object","properties":{"call":{"const":"openUrl"},"args":{"type":"object","properties":{"url":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString"}},"required":["url"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"void","allowedCallers":"rendererOnly","requiresUserActivation":true},"and":{"type":"object","properties":{"call":{"const":"and"},"args":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"},"minItems":2}},"required":["values"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"or":{"type":"object","properties":{"call":{"const":"or"},"args":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"},"minItems":2}},"required":["values"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"},"not":{"type":"object","properties":{"call":{"const":"not"},"args":{"type":"object","properties":{"value":{"$ref":"https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicBoolean"}},"required":["value"],"unevaluatedProperties":false}},"required":["call","args"],"returnType":"boolean"}},"$defs":{"anyComponent":{"oneOf":[{"$ref":"#/components/Flex"},{"$ref":"#/components/Card"},{"$ref":"#/components/Divider"},{"$ref":"#/components/Typography"},{"$ref":"#/components/Image"},{"$ref":"#/components/Chip"},{"$ref":"#/components/Avatar"},{"$ref":"#/components/Statistic"},{"$ref":"#/components/DataList"},{"$ref":"#/components/Alert"},{"$ref":"#/components/Button"},{"$ref":"#/components/TextField"},{"$ref":"#/components/NumberField"},{"$ref":"#/components/Checkbox"},{"$ref":"#/components/Switch"},{"$ref":"#/components/RadioGroup"},{"$ref":"#/components/Select"},{"$ref":"#/components/Slider"}],"discriminator":{"propertyName":"component"}},"anyFunction":{"oneOf":[{"$ref":"#/functions/required"},{"$ref":"#/functions/length"},{"$ref":"#/functions/regex"},{"$ref":"#/functions/numeric"},{"$ref":"#/functions/email"},{"$ref":"#/functions/formatString"},{"$ref":"#/functions/formatNumber"},{"$ref":"#/functions/formatCurrency"},{"$ref":"#/functions/formatDate"},{"$ref":"#/functions/pluralize"},{"$ref":"#/functions/openUrl"},{"$ref":"#/functions/and"},{"$ref":"#/functions/or"},{"$ref":"#/functions/not"}]}}}
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://neba.cdget.com/a2ui/1.17/catalog.json",
3
+ "$id": "https://neba.cdget.com/a2ui/1.18/catalog.json",
4
4
  "protocolVersion": "1.0",
5
5
  "title": "Neba",
6
6
  "description": "The subset of the Neba component library an agent can describe: eighteen components whose every prop is a literal, an enumerated value or a reference to another component by ID.",
7
- "catalogId": "https://neba.cdget.com/a2ui/1.17/catalog.json",
7
+ "catalogId": "https://neba.cdget.com/a2ui/1.18/catalog.json",
8
8
  "instructions": "Neba is a React component library. Every component below is a real one, and what you write here is turned into that component rather than into markup.\n\n## Laying a surface out\n\nNothing has a margin of its own. Two components sit beside each other only inside a `Flex`, and the gutter between them is that `Flex`'s `spacing`. Nest a vertical `Flex` inside a horizontal one to build a grid.\n\nA component that takes a child takes an **ID**, never an inline definition, and a `Card` and an `Alert` take exactly one — wrap several in a `Flex` and pass that.\n\n## Colour means something here\n\n`color` is one of six semantic families and never a decorative choice. `success`, `warning` and `danger` say how something went; `info` is a note; `primary` is the product's own accent and `secondary` is the quiet one. Do not reach for a family because a screen needs variety, and do not use `danger` for anything but something that failed or something that destroys.\n\nThere is **one** `solid` control in a view — the action the view exists for. Everything else is `outline` or `text`.\n\n## One ladder\n\n`size` is the same five steps on every component, so an `md` Button, an `md` TextField and an `md` Select are the same height and line up in a row. Pick one size for a screen and stay on it; `density` is the prop for making something tighter, and it changes padding only.\n\n## Fields carry their own words\n\nA `TextField`, a `Select`, a `Checkbox` and the rest each draw their own label, helper line and error message. Never add a `Typography` above a field to label it, and never add one below it to show an error — put the message in the field's own `checks`. Give every check a `message` that says what to fix: one without a message shows \"Validation failed\", which tells the reader nothing.\n\n## Text\n\nEvery string a reader sees is a `Typography`. Its `level` says what the text *is* rather than how big it should be: use `h1`…`h6` in order for real headings, and do not pick a heading level because you want larger text.\n\n## Building a sentence out of a value\n\nThere are no operators. `formatString(\"Hello ${/user/name}\")` is how a value is put into a sentence, and `formatNumber`, `formatCurrency`, `formatDate` and `pluralize` are how a number or a date is written in the reader's own language. Never assemble a date out of its parts.",
9
9
  "components": {
10
10
  "Flex": {
@@ -19,6 +19,8 @@
19
19
  * npm install @a2ui/react @a2ui/web_core zod
20
20
  * ```
21
21
  *
22
+ * `zod` may be 3.25 or 4; `schema.ts` says why both work.
23
+ *
22
24
  * ## Versions
23
25
  *
24
26
  * The catalog is written against **A2UI v1.0** and `@a2ui/react` 0.11's newest
@@ -20,8 +20,18 @@
20
20
  * not decoration over `z.string()`: the node layer reads a marker off those
21
21
  * schemas to work out which props are child references, so a `Card.child` built
22
22
  * from a bare string is a card that never resolves its child.
23
+ *
24
+ * The import is `zod/v3` rather than `zod` because `web_core` builds its
25
+ * schemas with Zod 3, and the ones built here sit in the same objects as
26
+ * those. Zod 3.25 and every Zod 4 serve the v3 API at that path, so the peer
27
+ * range takes both: under Zod 3 it is the package root by another name, and
28
+ * under Zod 4 it is the copy of v3 that ships inside it, while `web_core`
29
+ * installs a Zod 3 of its own. Two copies of v3 are two sets of classes, so
30
+ * nothing here may let an object built by one reach the other's `instanceof` —
31
+ * see `componentSchema`. `web_core` reads the result by `_def.typeName` and
32
+ * never by class, so the renderer does not care which copy built it.
23
33
  */
24
- import { z } from 'zod';
34
+ import { z } from 'zod/v3';
25
35
  /** As much of JSON Schema as the catalog is written in. */
26
36
  export interface CatalogSchema {
27
37
  $ref?: string;
@@ -1 +1 @@
1
- import{z as e}from"zod";import{childList as t,CommonSchemas as r,componentId as i}from"@a2ui/web_core/v0_9";const n="https://a2ui.org/specification/v1_0/common_types.json#/$defs/",o=new Set(["$ref","type","enum","default","description","properties","required","items","minimum","additionalProperties"]),a=new Set(["type","description","properties","required","additionalProperties"]);function s(e,t,r){for(const i of Object.keys(e))if(!r.has(i))throw new Error(`a2ui: ${t} uses \`${i}\`, which this adapter does not know`)}const c={Action:()=>r.Action,Child:()=>i(),ChildList:()=>t(),DynamicBoolean:()=>r.DynamicBoolean,DynamicNumber:()=>r.DynamicNumber,DynamicString:()=>r.DynamicString};function u(t,r){if(s(t,r,o),t.$ref){const e=t.$ref.startsWith(n)?t.$ref.slice(61):"",i=c[e];if(!i)throw new Error(`a2ui: ${r} refers to ${t.$ref}, which this adapter does not know`);return i()}if(t.enum){const r=t.enum;if(r.every(e=>"string"==typeof e))return e.enum(r);const i=r.map(t=>e.literal(t));return 1===i.length?i[0]:e.union(i)}if(void 0!==t.minimum&&"number"!==t.type&&"integer"!==t.type)throw new Error(`a2ui: ${r} has a minimum but is not a number`);switch(t.type){case"string":return e.string();case"number":case"integer":{const r="integer"===t.type?e.number().int():e.number();return void 0===t.minimum?r:r.min(t.minimum)}case"boolean":return e.boolean();case"array":if(!t.items)throw new Error(`a2ui: ${r} is an array with no items`);return e.array(u(t.items,`${r}[]`));case"object":return m(t,r);default:throw new Error(`a2ui: ${r} has a type this adapter does not know`)}}function m(t,r){if(!0===t.additionalProperties)throw new Error(`a2ui: ${r} allows any property, which this adapter cannot check`);const i=new Set(t.required??[]),n={};for(const[e,o]of Object.entries(t.properties??{})){if("component"===e)continue;const t=u(o,`${r}.${e}`);n[e]=void 0===o.default?i.has(e)?t:t.optional():t.default(o.default).optional()}return e.object(n)}const p=(()=>{const t=r.Checkable,i=r.CheckRule.extend({message:e.string().optional()}),n=t.shape.checks;return t.extend({checks:e.array(i).optional().describe(n.description??"")})})();export function componentSchema(t,i){const o=i.allOf??[i];let c=e.object({accessibility:r.AccessibilityAttributes.optional()});for(const e of o)if(e.$ref!==`${n}Checkable`){if(e.$ref)throw new Error(`a2ui: ${t} is composed with ${e.$ref}, which this adapter cannot merge`);s(e,t,a),c=c.merge(m(e,t))}else c=c.merge(p);return c}
1
+ import{z as e}from"zod/v3";import{childList as t,CommonSchemas as r,componentId as i}from"@a2ui/web_core/v0_9";const n="https://a2ui.org/specification/v1_0/common_types.json#/$defs/",o=new Set(["$ref","type","enum","default","description","properties","required","items","minimum","additionalProperties"]),a=new Set(["type","description","properties","required","additionalProperties"]);function s(e,t,r){for(const i of Object.keys(e))if(!r.has(i))throw new Error(`a2ui: ${t} uses \`${i}\`, which this adapter does not know`)}const c={Action:()=>r.Action,Child:()=>i(),ChildList:()=>t(),DynamicBoolean:()=>r.DynamicBoolean,DynamicNumber:()=>r.DynamicNumber,DynamicString:()=>r.DynamicString};function u(t,r){if(s(t,r,o),t.$ref){const e=t.$ref.startsWith(n)?t.$ref.slice(61):"",i=c[e];if(!i)throw new Error(`a2ui: ${r} refers to ${t.$ref}, which this adapter does not know`);return i()}if(t.enum){const r=t.enum;if(r.every(e=>"string"==typeof e))return e.enum(r);const i=r.map(t=>e.literal(t));return 1===i.length?i[0]:e.union(i)}if(void 0!==t.minimum&&"number"!==t.type&&"integer"!==t.type)throw new Error(`a2ui: ${r} has a minimum but is not a number`);switch(t.type){case"string":return e.string();case"number":case"integer":{const r="integer"===t.type?e.number().int():e.number();return void 0===t.minimum?r:r.min(t.minimum)}case"boolean":return e.boolean();case"array":if(!t.items)throw new Error(`a2ui: ${r} is an array with no items`);return e.array(u(t.items,`${r}[]`));case"object":return m(t,r);default:throw new Error(`a2ui: ${r} has a type this adapter does not know`)}}function m(t,r){if(!0===t.additionalProperties)throw new Error(`a2ui: ${r} allows any property, which this adapter cannot check`);const i=new Set(t.required??[]),n={};for(const[e,o]of Object.entries(t.properties??{})){if("component"===e)continue;const t=u(o,`${r}.${e}`);n[e]=void 0===o.default?i.has(e)?t:t.optional():t.default(o.default).optional()}return e.object(n)}const p=(()=>{const t=r.Checkable,i=r.CheckRule.extend({message:e.string().optional()}),n=t.shape.checks;return t.extend({checks:e.array(i).optional().describe(n.description??"")})})();export function componentSchema(t,i){const o=i.allOf??[i];let c=e.object({accessibility:r.AccessibilityAttributes.optional()});for(const e of o)if(e.$ref!==`${n}Checkable`){if(e.$ref)throw new Error(`a2ui: ${t} is composed with ${e.$ref}, which this adapter cannot merge`);s(e,t,a),c=c.extend(m(e,t).shape)}else c=c.extend(p.shape);return c}
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{boxPaddingClasses as l}from"../box/Box.js";import{actionMessages as i,useMessages as s}from"../../internal/i18n.js";import{CloseIcon as a,severityIcon as o}from"../../internal/icons.js";import{transitionProps as r}from"../../internal/animate.js";import{controlSlots as c,cx as d,hasContent as m,hitAreaClasses as f,iconClasses as u,radiusClasses as x,sheetBodyClasses as b,sheetHeaderGapClasses as v,sheetSectionGapClasses as p,sheetTitleClasses as h,surfaceClasses as y,transitionClasses as j}from"../../internal/styles.js";import{useStyleDefaults as g}from"../../internal/defaults.js";const N={solid:[y,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[y,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft)"},w={solid:"",outline:"text-(--n-accent)",text:"text-(--n-accent)"},k={solid:"",outline:"text-(--neba-muted-fg)",text:"text-(--neba-muted-fg)"},$={primary:"status",secondary:"status",info:"status",success:"status",warning:"alert",danger:"alert"};export const Alert=/*@__PURE__*/n.forwardRef(function Alert(n,y){const{variant:_="outline",size:z="md",color:A="info",density:C="default",elevation:B=0,title:L,icon:R,action:q,onClose:D,locale:E,closeLabel:F,transition:G,role:H,className:I,style:J,children:K,...M}=g(n,["size","density","variant","locale"]),O=s(i,E),P=void 0===R?o(A):R,Q=w[_],S=m(L),T=r(G);return t("div",{ref:y,className:d("flex w-full items-start",l[C][z],x[z],p[z],b[z],j,N[_],u,T.className,I??""),style:{...c(A,B,_),...T.style,...J},...M,children:[m(P)?e("span",{className:`flex h-[1lh] shrink-0 items-center ${Q}`,children:P}):null,t("div",{role:H??$[A],className:`flex min-w-0 flex-1 flex-col ${v[z]}`,children:[S?e("div",{className:`neba-title font-semibold ${h[z]} ${Q}`,children:L}):null,m(K)?e("div",{className:S?k[_]:void 0,children:K}):null]}),m(q)?e("div",{className:"flex h-[1lh] shrink-0 items-center",children:q}):null,D?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e("button",{type:"button","aria-label":F??O.dismiss,onClick:D,className:["relative inline-flex size-[1.15em] cursor-pointer items-center justify-center rounded-full",f,"opacity-70 [transition:opacity_var(--neba-duration)_var(--neba-ease)]","hover:opacity-100 focus-visible:opacity-100","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),children:e(a,{})})}):null]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{boxPaddingClasses as l}from"../box/Box.js";import{actionMessages as i,useMessages as s}from"../../internal/i18n.js";import{CloseIcon as a,severityIcon as o}from"../../internal/icons.js";import{transitionProps as r}from"../../internal/animate.js";import{controlSlots as c,cx as d,hasContent as m,hitAreaClasses as f,iconClasses as u,radiusClasses as x,sheetBodyClasses as v,sheetHeaderGapClasses as b,sheetSectionGapClasses as p,sheetTitleClasses as h,sheetTitleHeadingClasses as y,surfaceClasses as j,transitionClasses as g}from"../../internal/styles.js";import{useStyleDefaults as N}from"../../internal/defaults.js";const w={solid:[j,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[j,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft)"},$={solid:"",outline:"text-(--n-accent)",text:"text-(--n-accent)"},k={solid:"",outline:"text-(--neba-muted-fg)",text:"text-(--neba-muted-fg)"},_={primary:"status",secondary:"status",info:"status",success:"status",warning:"alert",danger:"alert"};export const Alert=/*@__PURE__*/n.forwardRef(function Alert(n,j){const{variant:z="outline",size:A="md",color:C="info",density:B="default",elevation:L=0,title:R,icon:q,action:D,onClose:E,locale:F,closeLabel:G,transition:H,role:I,className:J,style:K,children:M,...O}=N(n,["size","density","variant","locale"]),P=s(i,F),Q=void 0===q?o(C):q,S=$[z],T=m(R),U=r(H);return t("div",{ref:j,className:d("flex w-full items-start",l[B][A],x[A],p[A],v[A],g,w[z],u,U.className,J??""),style:{...c(C,L,z),...U.style,...K},...O,children:[m(Q)?e("span",{className:`flex h-[1lh] shrink-0 items-center ${S}`,children:Q}):null,t("div",{role:I??_[C],className:`flex min-w-0 flex-1 flex-col ${b[A]}`,children:[T?e("div",{className:`${y} font-semibold ${h[A]} ${S}`,children:R}):null,m(M)?e("div",{className:T?k[z]:void 0,children:M}):null]}),m(D)?e("div",{className:"flex h-[1lh] shrink-0 items-center",children:D}):null,E?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e("button",{type:"button","aria-label":G??P.dismiss,onClick:E,className:["relative inline-flex size-[1.15em] cursor-pointer items-center justify-center rounded-full",f,"opacity-70 [transition:opacity_var(--neba-duration)_var(--neba-ease)]","hover:opacity-100 focus-visible:opacity-100","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),children:e(a,{})})}):null]})});
@@ -50,5 +50,11 @@ export interface AnimateCounterProps extends Omit<NebaAnimateProps, 'easing' | '
50
50
  * A reader who cannot see the count is told the answer rather than a hundred
51
51
  * intermediate ones, and a reader who has asked for less motion is shown the
52
52
  * answer too.
53
+ *
54
+ * The clipped number is also the only text the element holds. The count is
55
+ * drawn as generated content off a data attribute, the way the width sizer
56
+ * draws its samples, so a copy, a crawler and `textContent` read `12,000` once
57
+ * rather than the answer followed by wherever the count had got to — which, on
58
+ * a server-rendered page or after the count, was `12,0000` and `12,00012,000`.
53
59
  */
54
60
  export declare const AnimateCounter: React.ForwardRefExoticComponent<AnimateCounterProps & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- "use client";import{jsx as r,Fragment as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{useRender as a}from"@base-ui/react/use-render";import{useAnimationRun as i,usePrefersReducedMotion as s}from"../../internal/animate.js";import{numberFormatter as o}from"../../internal/format.js";import{cx as u,srOnlyClasses as m}from"../../internal/styles.js";import{useStyleDefaults as c}from"../../internal/defaults.js";function l(r){if(!Number.isFinite(r))return 0;const[e,t="0"]=String(Math.abs(r)).split("e"),n=(e.split(".")[1]?.length??0)-Number(t);return Math.min(20,Math.max(0,n))}export const AnimateCounter=/*@__PURE__*/n.forwardRef(function AnimateCounter(f,d){const{value:h,from:p=0,duration:g=1200,delay:j=0,trigger:y="mount",play:M,once:b=!0,threshold:x=.2,format:A,locale:F,render:N,className:v,style:R,...q}=c(f,["locale"]),S=i({caller:q,trigger:y,play:M,once:b,threshold:x,infinite:!1}),C=s(),[w,E]=n.useState(p),J=void 0===A?"":JSON.stringify(A),O=n.useMemo(()=>o(F,A),[F,J]),k=n.useRef(p),z=n.useRef(!1),B=n.useRef(S.run);n.useEffect(()=>{if(!S.started&&!C)return z.current=!1,k.current=p,void E(p);if(C||g<=0)return k.current=h,void E(h);B.current!==S.run&&(B.current=S.run,z.current=!1);const r=z.current?k.current:p,e=z.current?0:j;z.current=!0;let t=0,n=null;const a=i=>{null===n&&(n=i);const s=i-n-e;if(s<0)return void(t=requestAnimationFrame(a));const o=Math.min(1,s/g),u=r+(h-r)*function(r){return 1-(1-r)**3}(o);k.current=u,E(u),o<1&&(t=requestAnimationFrame(a))};return k.current=r,E(r),t=requestAnimationFrame(a),()=>cancelAnimationFrame(t)},[S.started,S.run,C,h,p,g,j]);const D=Math.max(l(h),l(p)),G=Math.round(w*10**D)/10**D;return a({render:N??r("span",{}),ref:[d,S.ref],props:{...q,className:u("tabular-nums",v),style:R,"data-neba-animation":"counter","data-state":S.state,...S.handlers,children:t(e,{children:[r("span",{className:m,children:O.format(h)}),r("span",{"aria-hidden":"true",children:O.format(C?h:G)})]})}})});
1
+ "use client";import{jsx as r,jsxs as e,Fragment as t}from"react/jsx-runtime";import*as n from"react";import{useRender as a}from"@base-ui/react/use-render";import{useAnimationRun as s,usePrefersReducedMotion as i}from"../../internal/animate.js";import{numberFormatter as o}from"../../internal/format.js";import{cx as m,srOnlyClasses as u}from"../../internal/styles.js";import{useStyleDefaults as c}from"../../internal/defaults.js";import{useIntlLocale as l}from"../../internal/media.js";function f(r){if(!Number.isFinite(r))return 0;const[e,t="0"]=String(Math.abs(r)).split("e"),n=(e.split(".")[1]?.length??0)-Number(t);return Math.min(20,Math.max(0,n))}export const AnimateCounter=/*@__PURE__*/n.forwardRef(function AnimateCounter(d,p){const{value:h,from:g=0,duration:b=1200,delay:N=0,trigger:j="mount",play:x,once:y=!0,threshold:M=.2,format:v,locale:A,render:F,className:R,style:q,...S}=c(d,["locale"]),C=l(A),w=s({caller:S,trigger:j,play:x,once:y,threshold:M,infinite:!1}),E=i(),[J,O]=n.useState(g),k=void 0===v?"":JSON.stringify(v),z=n.useMemo(()=>o(C,v),[C,k]),B=n.useRef(g),D=n.useRef(!1),G=n.useRef(w.run);n.useEffect(()=>{if(!w.started&&!E)return D.current=!1,B.current=g,void O(g);if(E||b<=0)return B.current=h,void O(h);G.current!==w.run&&(G.current=w.run,D.current=!1);const r=D.current?B.current:g,e=D.current?0:N;D.current=!0;let t=0,n=null;const a=s=>{null===n&&(n=s);const i=s-n-e;if(i<0)return void(t=requestAnimationFrame(a));const o=Math.min(1,i/b),m=r+(h-r)*function(r){return 1-(1-r)**3}(o);B.current=m,O(m),o<1&&(t=requestAnimationFrame(a))};return B.current=r,O(r),t=requestAnimationFrame(a),()=>cancelAnimationFrame(t)},[w.started,w.run,E,h,g,b,N]);const H=Math.max(f(h),f(g)),I=Math.round(J*10**H)/10**H,K=z.format(h),L=z.format(g),P=E?K:z.format(I),Q=P===K||L===K?[K]:[K,L];return a({render:F??r("span",{}),ref:[p,w.ref],props:{...S,className:m("tabular-nums",R),style:q,"data-neba-animation":"counter","data-state":w.state,...w.handlers,children:e(t,{children:[r("span",{className:u,children:K}),e("span",{"aria-hidden":"true",className:"inline-grid",children:[r("span",{"data-text":P,className:"[grid-area:1/1] before:content-[attr(data-text)]"}),Q.map((e,t)=>r("span",{"data-sample":e,className:"invisible [grid-area:1/1] before:content-[attr(data-sample)]"},t))]})]})}})});
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{useRender as n}from"@base-ui/react/use-render";import{isInfinite as a,lengthValue as r,useAnimationRun as i,usePrefersReducedMotion as s}from"../../internal/animate.js";import{cx as l}from"../../internal/styles.js";export const AnimateHeadline=/*@__PURE__*/t.forwardRef(function AnimateHeadline({duration:o=480,delay:u=0,easing:c,repeat:m="infinite",paused:d,trigger:f="mount",play:p,once:h=!0,threshold:g=.2,interval:y=2600,index:v,defaultIndex:b=0,onIndexChange:x,loop:N=!0,rise:j="100%",render:C,className:E,style:T,children:k,...A},S){const H=i({caller:A,trigger:f,play:p,once:h,threshold:g,paused:d,infinite:a(m)}),I=s(),M=t.Children.toArray(k),R=M.length,[w,V]=t.useState(b),$=Math.min(v??w,Math.max(R-1,0)),[q,z]=t.useState(null),[B,D]=t.useState($);B!==$&&(D($),z(B)),t.useEffect(()=>{if(null===q)return;const e=setTimeout(()=>z(null),o);return()=>clearTimeout(e)},[q,o]);const F=t.useCallback(()=>{const e=$+1;if(e>=R){if(!N)return;return void 0===v&&V(0),void x?.(0)}void 0===v&&V(e),x?.(e)},[$,R,N,v,x]),G=t.useRef(!1);t.useEffect(()=>{if(void 0!==v||R<2||"running"!==H.state||I)return;if(!N&&$===R-1)return;const e=setTimeout(()=>{G.current=!0,F()},o+y+(G.current?0:u));return()=>clearTimeout(e)},[v,R,H.state,o,y,u,F,N,$,I]);const J=H.ref,K=t.useCallback(e=>{J(e),"function"==typeof S?S(e):S&&(S.current=e)},[S,J]);return n({render:C??e("span",{}),ref:K,props:{className:l("neba-headline",E),style:{"--n-anim-duration":`${o}ms`,"--n-anim-rise":r(j),...c?{"--n-anim-ease":c}:{},"--n-anim-state":H.state,...T},"data-neba-animation":"headline","data-state":H.state,...A,...H.handlers,children:M.map((n,a)=>{const r=a===$?"active":a!==q||I?void 0:"leaving";if(!t.isValidElement(n))return e("span",{className:"neba-headline-item","data-state":r,children:n},a);const i=n.props;return t.cloneElement(n,{key:a,className:l("neba-headline-item",i.className),"data-state":r})})}})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{useRender as n}from"@base-ui/react/use-render";import{isInfinite as a,lengthValue as r,useAnimationRun as i,usePrefersReducedMotion as s}from"../../internal/animate.js";import{cx as l}from"../../internal/styles.js";export const AnimateHeadline=/*@__PURE__*/t.forwardRef(function AnimateHeadline({duration:o=480,delay:u=0,easing:c,repeat:m="infinite",paused:d,trigger:f="mount",play:p,once:h=!0,threshold:g=.2,interval:y=2600,index:v,defaultIndex:b=0,onIndexChange:x,loop:N=!0,rise:j="100%",render:C,className:E,style:T,children:k,...A},M){const S=i({caller:A,trigger:f,play:p,once:h,threshold:g,paused:d,infinite:a(m)}),H=s(),I=t.Children.toArray(k),R=I.length,[w,V]=t.useState(b),$=Math.min(v??w,Math.max(R-1,0)),[q,z]=t.useState(null),[B,D]=t.useState($);B!==$&&(D($),z(B)),t.useEffect(()=>{if(null===q)return;const e=setTimeout(()=>z(null),o);return()=>clearTimeout(e)},[q,o]);const F=t.useCallback(()=>{const e=$+1;if(e>=R){if(!N)return;return void 0===v&&V(0),void x?.(0)}void 0===v&&V(e),x?.(e)},[$,R,N,v,x]),G=t.useRef(!1);t.useEffect(()=>{if(void 0!==v||R<2||"running"!==S.state||H)return;if(!N&&$===R-1)return;const e=setTimeout(()=>{G.current=!0,F()},o+y+(G.current?0:u));return()=>clearTimeout(e)},[v,R,S.state,o,y,u,F,N,$,H]);const J=S.ref,K=t.useCallback(e=>{J(e),"function"==typeof M?M(e):M&&(M.current=e)},[M,J]);return n({render:C??e("span",{}),ref:K,props:{className:l("neba-headline",E),style:{"--n-anim-duration":`${o}ms`,"--n-anim-rise":r(j),...c?{"--n-anim-ease":c}:{},"--n-anim-state":S.state,...T},"data-neba-animation":"headline","data-state":S.state,...A,...S.handlers,children:I.map((n,a)=>{const r=a===$?"active":a!==q||H?void 0:"leaving";if(!t.isValidElement(n))return e("span",{className:"neba-headline-item","data-state":r,children:n},a);const i=n.props;return t.cloneElement(n,{key:a,className:l("neba-headline-item",i.className),"data-state":r})}).flatMap((e,t)=>0===t?[e]:[" ",e])}})});
@@ -38,9 +38,10 @@ export interface AnimateScrambleProps extends Omit<NebaAnimateProps, 'easing' |
38
38
  * `AnimateTyping`'s sibling: a typewriter reveals a string from an empty line,
39
39
  * this one resolves it out of a line that was already the right length. The box
40
40
  * is laid out from the final text, so nothing around it reflows and a heading
41
- * does not push the page down as it lands. In a proportional font the noise can
42
- * be wider than the text for a moment, and spills past the box without moving
43
- * anything.
41
+ * does not push the page down as it lands. Each word's noise is drawn over the
42
+ * word it settles into, so the line breaks where the final text breaks. In a
43
+ * proportional font a word's noise can be wider than the word for a moment, and
44
+ * is cut off at the word's end rather than moving anything.
44
45
  *
45
46
  * Whitespace is never scrambled. A space that flickers into a letter and back
46
47
  * reads as the words having moved, which is the one thing this effect is for
@@ -49,5 +50,10 @@ export interface AnimateScrambleProps extends Omit<NebaAnimateProps, 'easing' |
49
50
  * The finished string is in the document from the first frame, in a clipped box
50
51
  * for a screen reader; the noise is a visible copy that is `aria-hidden`. A
51
52
  * reader who has asked for less motion is shown the text.
53
+ *
54
+ * That clipped string is the only text the element holds. The noise is drawn
55
+ * as generated content off a data attribute, as the final string underneath it
56
+ * already was, so a copy, a crawler and `textContent` read the text once rather
57
+ * than the text followed by a line of noise.
52
58
  */
53
59
  export declare const AnimateScramble: React.ForwardRefExoticComponent<AnimateScrambleProps & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{useRender as n}from"@base-ui/react/use-render";import{isInfinite as s,useAnimationRun as i,usePrefersReducedMotion as l}from"../../internal/animate.js";import{graphemesOf as c,textOf as o}from"../../internal/text.js";import{cx as u,srOnlyClasses as m}from"../../internal/styles.js";import{useStyleDefaults as d}from"../../internal/defaults.js";const p="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&$@*";export const AnimateScramble=/*@__PURE__*/a.forwardRef(function AnimateScramble(f,h){const{text:g,speed:M=18,tick:j=45,characters:v=p,duration:x,delay:b=0,repeat:y=1,paused:N,trigger:w="mount",play:R,once:I=!0,threshold:S=.2,locale:T,render:A,className:E,style:F,children:k,...B}=d(f,["locale"]),C=i({caller:B,trigger:w,play:R,once:I,threshold:S,paused:N,infinite:s(y)}),D=l(),G=g??o(k),H=a.useMemo(()=>c(G,T),[G,T]),J=H.length,[K,L]=a.useState(0),[O,P]=a.useReducer(e=>e+1,0),Q=a.useMemo(()=>void 0!==x&&J>0?Math.max(1,x/J):1e3/Math.max(1,M),[x,M,J]),U=a.useRef(0),V=a.useRef(C.run);a.useEffect(()=>{U.current=0},[J]),a.useEffect(()=>{if(!C.started)return void(U.current=0);if(V.current!==C.run&&(V.current=C.run,U.current=0),N)return;if(D||0===J)return void L(J);let e,r=Math.min(U.current,J);if(r>=J)return void L(J);const t=()=>{r+=1,U.current=r,L(r),r<J?e=setTimeout(t,Q):clearInterval(a)};L(r);const a=setInterval(P,j);return e=setTimeout(t,0===r?b+Q:Q),()=>{clearTimeout(e),clearInterval(a)}},[C.started,C.run,N,D,J,Q,j,b]);const W=v.length>0?v:p,X=H.map((e,r)=>D||r<K||""===e.trim()?e:W[function(e,r,t){let a=Math.imul(e+1,2246822507)^Math.imul(r+1,3266489909);return a^=a>>>15,a=Math.imul(a,625341585),a^=a>>>13,(a>>>0)%t}(O,r,W.length)]).join("");return n({render:A??e("span",{}),ref:[h,C.ref],props:{...B,className:u("inline-grid",E),style:F,"data-neba-animation":"scramble","data-state":C.state,...C.handlers,children:t(r,{children:[e("span",{className:m,children:G}),e("span",{"aria-hidden":"true",className:"whitespace-pre-wrap [grid-area:1/1]",children:X}),e("span",{"aria-hidden":"true","data-sample":G,className:"invisible whitespace-pre-wrap [grid-area:1/1] before:content-[attr(data-sample)]"})]})}})});
1
+ "use client";import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as a from"react";import{useRender as n}from"@base-ui/react/use-render";import{isInfinite as s,useAnimationRun as i,usePrefersReducedMotion as l}from"../../internal/animate.js";import{graphemesOf as o,portableGraphemesOf as c,standsAlone as m,textOf as u}from"../../internal/text.js";import{cx as d,srOnlyClasses as f}from"../../internal/styles.js";import{useStyleDefaults as p}from"../../internal/defaults.js";import{useHydrated as h}from"../../internal/media.js";const g="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&$@*";export const AnimateScramble=/*@__PURE__*/a.forwardRef(function AnimateScramble(x,v){const{text:b,speed:M=18,tick:j=45,characters:w=g,duration:N,delay:y=0,repeat:R=1,paused:E,trigger:I="mount",play:S,once:T=!0,threshold:A=.2,locale:F,render:k,className:B,style:C,children:D,...G}=p(x,["locale"]),H=i({caller:G,trigger:I,play:S,once:T,threshold:A,paused:E,infinite:s(R)}),J=l(),K=b??u(D),L=h(),O=a.useMemo(()=>L?o(K,F):c(K),[L,K,F]),P=O.length,[Q,U]=a.useState(0),[V,W]=a.useReducer(e=>e+1,0),X=a.useMemo(()=>void 0!==N&&P>0?Math.max(1,N/P):1e3/Math.max(1,M),[N,M,P]),Y=a.useRef(0),Z=a.useRef(H.run);a.useEffect(()=>{Y.current=0},[P]),a.useEffect(()=>{if(!H.started)return void(Y.current=0);if(Z.current!==H.run&&(Z.current=H.run,Y.current=0),E)return;if(J||0===P)return void U(P);let e,t=Math.min(Y.current,P);if(t>=P)return void U(P);const r=()=>{t+=1,Y.current=t,U(t),t<P?e=setTimeout(r,X):clearInterval(a)};U(t);const a=setInterval(W,j);return e=setTimeout(r,0===t?y+X:X),()=>{clearTimeout(e),clearInterval(a)}},[H.started,H.run,E,J,P,X,j,y]);const $=w.length>0?w:g,q=[];return O.forEach((e,t)=>{const r=""===e.trim(),a=!r&&m(e);let n=q[q.length-1];if((!n||!r&&(n.gap||a||m(O[t-1]??"")))&&(n={text:"",shown:"",gap:"",settled:!0},q.push(n)),r)return void(n.gap+=e);const s=J||t<Q;n.text+=e,n.shown+=s?e:$[function(e,t,r){let a=Math.imul(e+1,2246822507)^Math.imul(t+1,3266489909);return a^=a>>>15,a=Math.imul(a,625341585),a^=a>>>13,(a>>>0)%r}(V,t,$.length)],n.settled&&=s}),n({render:k??e("span",{}),ref:[v,H.ref],props:{...G,className:d("inline-grid",B),style:C,"data-neba-animation":"scramble","data-state":H.state,...H.handlers,children:t(r,{children:[e("span",{className:f,children:K}),e("span",{"aria-hidden":"true",className:"invisible whitespace-pre-wrap [grid-area:1/1]",children:q.map((r,n)=>t(a.Fragment,{children:[r.text?e("span",{"data-sample":r.text,"data-text":r.settled?void 0:r.shown,className:r.settled?"visible before:content-[attr(data-sample)]":"relative before:content-[attr(data-sample)] after:visible after:absolute after:inset-0 after:flex after:items-center after:overflow-x-clip after:whitespace-pre after:content-[attr(data-text)]"}):null,r.gap?e("span",{"data-sample":r.gap,className:"before:content-[attr(data-sample)]"}):null]},n))})]})}})});
@@ -61,6 +61,12 @@ export interface AnimateSplitProps extends NebaAnimateProps, NebaStaggerProps, N
61
61
  * inline box cannot be translated up. Each keeps the space that followed it, so
62
62
  * a line still breaks between words and never inside the gap. Split by
63
63
  * character, the pieces of a word are held in a span that does not wrap, and
64
- * the space after it is left as text, which is where the line breaks.
64
+ * the space after it is left outside, which is where the line breaks.
65
+ *
66
+ * The clipped string is the only text the element holds. Every piece, and every
67
+ * space between the words of a line split by character, is drawn as generated
68
+ * content off a data attribute — as the width sizer draws its samples — so a
69
+ * copy, a crawler and `textContent` read the sentence once, with its spaces,
70
+ * rather than the sentence followed by its pieces run together.
65
71
  */
66
72
  export declare const AnimateSplit: React.ForwardRefExoticComponent<AnimateSplitProps & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import*as r from"react";import{useRender as n}from"@base-ui/react/use-render";import{animBaseClass as s,animationClasses as i,isInfinite as l,staggerChildren as o,transitionParts as m,useAnimationRun as p}from"../../internal/animate.js";import{graphemesOf as c,textOf as d,wordsOf as g}from"../../internal/text.js";import{cx as u,srOnlyClasses as h}from"../../internal/styles.js";import{useStyleDefaults as f}from"../../internal/defaults.js";export const AnimateSplit=/*@__PURE__*/r.forwardRef(function AnimateSplit(y,b){const{text:j,by:w="word",effect:x="slide",duration:N=520,delay:M=0,easing:S,repeat:v,alternate:$,paused:k,trigger:A="mount",play:F,once:R=!0,threshold:q=.2,stagger:z=45,durationStep:B=0,reverse:C=!1,timeline:D,range:E,from:G="bottom",distance:H="0.4em",scale:I,angle:J,side:K,locale:L,render:O,className:P,style:Q,children:T,...U}=f(y,["locale"]),V=v??("blink"===x?"infinite":1),W=p({caller:U,parts:":scope > [aria-hidden] .neba-anim",trigger:A,play:F,once:R,threshold:q,paused:k,infinite:l(V)}),X="view"===D?"running":W.state,Y=j??d(T),Z=r.useMemo(()=>g(Y,L),[Y,L]),_=r.useMemo(()=>{if("word"===w)return null;let e=0;return Z.map(t=>{const a=/\s*$/.exec(t)?.[0]??"",r=c(t.slice(0,t.length-a.length),L),n={start:e,letters:r,gap:a};return e+=r.length,n})},[w,Z,L]),ee=r.useMemo(()=>_?_.flatMap(e=>e.letters):Z,[_,Z]),te=m({type:x,duration:N,delay:M,easing:S,repeat:V,alternate:$,from:G,distance:H,scale:I,angle:J,side:K,timeline:D,range:E}),ae=o(ee.map((t,a)=>e("span",{className:"inline-block whitespace-pre",children:t},a)),`${s} ${i[x]}`,te.slots,{stagger:z,durationStep:B,reverse:C}),re=_?_.map((a,n)=>t(r.Fragment,{children:[a.letters.length>0?e("span",{className:"whitespace-nowrap",children:ae.slice(a.start,a.start+a.letters.length)}):null,a.gap]},n)):ae;return n({render:O??e("span",{}),ref:[b,W.ref],props:{...U,className:P,style:{"--n-anim-state":X,...Q},...W.handlers,"data-neba-animation":"split","data-state":X,children:t(a,{children:[e("span",{className:u(h),children:Y}),e("span",{"aria-hidden":"true",children:re})]})}})});
1
+ "use client";import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import*as r from"react";import{useRender as n}from"@base-ui/react/use-render";import{animBaseClass as s,animationClasses as i,isInfinite as l,staggerChildren as o,transitionParts as m,useAnimationRun as p}from"../../internal/animate.js";import{graphemesOf as d,portableGraphemesOf as c,portableWordsOf as g,textOf as u,wordsOf as f}from"../../internal/text.js";import{cx as h,srOnlyClasses as x}from"../../internal/styles.js";import{useStyleDefaults as b}from"../../internal/defaults.js";import{useHydrated as y}from"../../internal/media.js";export const AnimateSplit=/*@__PURE__*/r.forwardRef(function AnimateSplit(j,w){const{text:N,by:M="word",effect:S="slide",duration:v=520,delay:$=0,easing:k,repeat:A,alternate:F,paused:R,trigger:q="mount",play:z,once:B=!0,threshold:C=.2,stagger:D=45,durationStep:E=0,reverse:G=!1,timeline:H,range:I,from:J="bottom",distance:K="0.4em",scale:L,angle:O,side:P,locale:Q,render:T,className:U,style:V,children:W,...X}=b(j,["locale"]),Y=A??("blink"===S?"infinite":1),Z=p({caller:X,parts:":scope > [aria-hidden] .neba-anim",trigger:q,play:z,once:B,threshold:C,paused:R,infinite:l(Y)}),_="view"===H?"running":Z.state,ee=N??u(W),te=y(),ae=r.useMemo(()=>te?f(ee,Q):g(ee),[te,ee,Q]),re=r.useMemo(()=>{if("word"===M)return null;let e=0;return ae.map(t=>{const a=/\s*$/.exec(t)?.[0]??"",r=t.slice(0,t.length-a.length),n=te?d(r,Q):c(r),s={start:e,letters:n,gap:a};return e+=n.length,s})},[M,ae,Q,te]),ne=r.useMemo(()=>re?re.flatMap(e=>e.letters):ae,[re,ae]),se=m({type:S,duration:v,delay:$,easing:k,repeat:Y,alternate:F,from:J,distance:K,scale:L,angle:O,side:P,timeline:H,range:I}),ie=o(ne.map((t,a)=>e("span",{"data-text":t,className:"inline-block whitespace-pre before:content-[attr(data-text)]"},a)),`${s} ${i[S]}`,se.slots,{stagger:D,durationStep:E,reverse:G}),le=re?re.map((a,n)=>t(r.Fragment,{children:[a.letters.length>0?e("span",{className:"whitespace-nowrap",children:ie.slice(a.start,a.start+a.letters.length)}):null,a.gap?e("span",{"data-text":a.gap,className:"before:content-[attr(data-text)]"}):null]},n)):ie;return n({render:T??e("span",{}),ref:[w,Z.ref],props:{...X,className:U,style:{"--n-anim-state":_,...V},...Z.handlers,"data-neba-animation":"split","data-state":_,children:t(a,{children:[e("span",{className:h(x),children:ee}),e("span",{"aria-hidden":"true",children:le})]})}})});
@@ -62,5 +62,11 @@ export interface AnimateTypingProps extends Omit<NebaAnimateProps, 'alternate' |
62
62
  * Only text is typed. Pass a string, or strings; an element among the children
63
63
  * contributes its text and nothing about its markup, because there is no honest
64
64
  * way to reveal half of a link.
65
+ *
66
+ * The clipped string is the only text the element holds. What has been typed,
67
+ * and a caret given as a string, are drawn as generated content off a data
68
+ * attribute, as the box's sample already was, so a copy, a crawler and
69
+ * `textContent` read the line once — not the line and then its typed copy
70
+ * again, nor with a `|` on the end.
65
71
  */
66
72
  export declare const AnimateTyping: React.ForwardRefExoticComponent<AnimateTypingProps & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{useRender as a}from"@base-ui/react/use-render";import{isInfinite as s,useAnimationRun as i,usePrefersReducedMotion as o}from"../../internal/animate.js";import{cx as c,srOnlyClasses as u}from"../../internal/styles.js";import{graphemesOf as l,textOf as d}from"../../internal/text.js";export const AnimateTyping=/*@__PURE__*/n.forwardRef(function AnimateTyping({text:p,speed:m=24,hold:f=1400,erase:g=!1,eraseSpeed:h,caret:y=!0,caretChar:x="|",duration:T,delay:j=0,repeat:b=1,paused:v,trigger:N="mount",play:w,once:M=!0,threshold:R=.2,render:A,className:C,style:E,children:S,...k},F){const q=i({caller:k,trigger:N,play:w,once:M,threshold:R,paused:v,infinite:s(b)}),z=o(),B=p??d(S),D=n.useMemo(()=>l(B),[B]),G=D.length,[H,I]=n.useState(0),J=n.useRef({count:0,pass:1,deleting:!1}),K=n.useRef(q.run),L=T&&G>0?T/G:1e3/Math.max(m,1),O=1e3/Math.max(h??2*m,1);n.useEffect(()=>{J.current={count:0,pass:1,deleting:!1}},[B]),n.useEffect(()=>{if(z||0===G)return void I(G);if(!q.started)return J.current={count:0,pass:1,deleting:!1},void I(0);if(K.current!==q.run&&(K.current=q.run,J.current={count:0,pass:1,deleting:!1}),v||q.offscreen)return;let e,t=!1;const r=J.current,n="infinite"===b?1/0:Math.max(1,b);if(r.count>=G&&r.pass>=n&&!r.deleting)return;const a=()=>{if(!t){if(r.deleting)return r.count-=1,I(r.count),r.count<=0&&(r.deleting=!1,r.pass+=1),void(e=setTimeout(a,r.deleting?O:L));if(r.count<G&&(r.count+=1,I(r.count)),r.count<G)e=setTimeout(a,L);else if(!(r.pass>=n))return g?(r.deleting=!0,void(e=setTimeout(a,f))):void(e=setTimeout(()=>{t||(r.count=0,r.pass+=1,I(0),e=setTimeout(a,L))},f))}};return I(r.count),e=setTimeout(a,0===r.count&&1===r.pass?j:r.deleting?O:L),()=>{t=!0,clearTimeout(e)}},[q.started,q.run,q.offscreen,v,z,B,G,L,O,j,f,g,b]);const P=q.ref,Q=n.useCallback(e=>{P(e),"function"==typeof F?F(e):F&&(F.current=e)},[F,P]);return a({render:A??e("span",{}),ref:Q,props:{className:c("grid",C),style:E,"data-neba-animation":"typing","data-state":q.state,...k,...q.handlers,children:t(r,{children:[e("span",{className:u,children:B}),t("span",{"aria-hidden":"true",className:"whitespace-pre-wrap [grid-area:1/1]",children:[D.slice(0,H).join(""),y?e("span",{className:c("neba-typing-caret"),children:x}):null]}),e("span",{"aria-hidden":"true","data-sample":B,className:"invisible whitespace-pre-wrap [grid-area:1/1] before:content-[attr(data-sample)]"})]})}})});
1
+ "use client";import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as n from"react";import{useRender as a}from"@base-ui/react/use-render";import{isInfinite as s,useAnimationRun as i,usePrefersReducedMotion as o}from"../../internal/animate.js";import{cx as c,srOnlyClasses as u}from"../../internal/styles.js";import{graphemesOf as d,textOf as l}from"../../internal/text.js";export const AnimateTyping=/*@__PURE__*/n.forwardRef(function AnimateTyping({text:p,speed:m=24,hold:f=1400,erase:g=!1,eraseSpeed:h,caret:y=!0,caretChar:x="|",duration:b,delay:T=0,repeat:j=1,paused:N,trigger:v="mount",play:w,once:M=!0,threshold:R=.2,render:A,className:C,style:E,children:S,...k},F){const q=i({caller:k,trigger:v,play:w,once:M,threshold:R,paused:N,infinite:s(j)}),z=o(),B=p??l(S),D=n.useMemo(()=>d(B),[B]),G=D.length,[H,I]=n.useState(0),J=n.useRef({count:0,pass:1,deleting:!1}),K=n.useRef(q.run),L=b&&G>0?b/G:1e3/Math.max(m,1),O=1e3/Math.max(h??2*m,1);n.useEffect(()=>{J.current={count:0,pass:1,deleting:!1}},[B]),n.useEffect(()=>{if(z||0===G)return void I(G);if(!q.started)return J.current={count:0,pass:1,deleting:!1},void I(0);if(K.current!==q.run&&(K.current=q.run,J.current={count:0,pass:1,deleting:!1}),N||q.offscreen)return;let e,t=!1;const r=J.current,n="infinite"===j?1/0:Math.max(1,j);if(r.count>=G&&r.pass>=n&&!r.deleting)return;const a=()=>{if(!t){if(r.deleting)return r.count-=1,I(r.count),r.count<=0&&(r.deleting=!1,r.pass+=1),void(e=setTimeout(a,r.deleting?O:L));if(r.count<G&&(r.count+=1,I(r.count)),r.count<G)e=setTimeout(a,L);else if(!(r.pass>=n))return g?(r.deleting=!0,void(e=setTimeout(a,f))):void(e=setTimeout(()=>{t||(r.count=0,r.pass+=1,I(0),e=setTimeout(a,L))},f))}};return I(r.count),e=setTimeout(a,0===r.count&&1===r.pass?T:r.deleting?O:L),()=>{t=!0,clearTimeout(e)}},[q.started,q.run,q.offscreen,N,z,B,G,L,O,T,f,g,j]);const P=q.ref,Q=n.useCallback(e=>{P(e),"function"==typeof F?F(e):F&&(F.current=e)},[F,P]),U=e("span","string"==typeof x||"number"==typeof x?{"data-text":x,className:"neba-typing-caret before:content-[attr(data-text)]"}:{className:"neba-typing-caret",children:x});return a({render:A??e("span",{}),ref:Q,props:{className:c("grid",C),style:E,"data-neba-animation":"typing","data-state":q.state,...k,...q.handlers,children:r(t,{children:[e("span",{className:u,children:B}),e("span",{"aria-hidden":"true","data-text":D.slice(0,H).join(""),className:"whitespace-pre-wrap [grid-area:1/1] before:content-[attr(data-text)]",children:y?U:null}),e("span",{"aria-hidden":"true","data-sample":B,className:"invisible whitespace-pre-wrap [grid-area:1/1] before:content-[attr(data-sample)]"})]})}})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import*as t from"react";import{useRender as a}from"@base-ui/react/use-render";import{initialsOf as l}from"../../internal/initials.js";import{safeHref as s,safeRel as i}from"../../internal/link.js";import{NewTabNote as o}from"../../internal/new-tab.js";import{controlHeightClasses as m,controlSlots as d,controlSquareClasses as c,cx as u,gapClasses as x,hasContent as f,srOnlyClasses as g,surfaceClasses as p,tintPlateClasses as h,toLength as v,transitionClasses as b}from"../../internal/styles.js";import{useStyleDefaults as w}from"../../internal/defaults.js";const j={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.375rem]",xl:"text-[1.625rem]"},N={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.3125rem]",xl:"text-[1.5625rem]"},_={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},y={solid:[p,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[p,"border text-(--n-on-tint) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:`text-(--n-on-tint) ${h} [box-shadow:var(--n-elev)]`};export const AppLogo=/*@__PURE__*/t.forwardRef(function AppLogo(t,p){const{src:h,srcSet:k,alt:z,name:A,initials:L,showName:S=!1,shape:$="bare",variant:F="solid",size:P="md",color:R="primary",elevation:q=0,padded:B=!0,height:C,href:D,target:E,rel:G,imageProps:H,render:I,className:J,style:K,children:M,...O}=w(t,["size","variant"]),Q="bare"!==$,T=f(M)?M:h?"image":null,U=Q&&B,V=null===T&&!Q,W=S&&!V&&f(A),X=z??A,Y=L??(A?l(A):""),Z="image"===T&&!W&&f(X),ee=V||Z,re=!ee&&!W&&f(X),ne=v(C),te=ne?{height:ne,width:Q?ne:void 0}:null,ae=e("span",{"aria-hidden":!ee||void 0,className:u("flex shrink-0 items-center justify-center overflow-hidden","font-semibold tracking-tight whitespace-nowrap",ne?"":m[P],Q?u(ne?"":c[P],"circle"===$?"rounded-full":_[P],N[P],y[F]):u("w-auto text-(--neba-fg)",j[P]),"[&_svg]:w-auto [&_svg]:shrink-0",U?"[&_svg]:h-[72%] [&_svg]:max-w-[72%]":"[&_svg]:h-full [&_svg]:max-w-full",b),style:{...Q?d(R,q,F):null,...te},children:"image"===T?e("img",{src:h,srcSet:k,alt:Z?X??"":"",decoding:"async",...H,className:u("w-auto object-contain",U?"h-[72%] max-w-[72%]":"h-full max-w-full",H?.className)}):T??(V?A:Y)}),le=s(D);return a({render:I??e(le?"a":"span",{}),ref:p,props:{href:le,target:E,rel:i(E,G),className:u("inline-flex max-w-full min-w-0 items-center align-middle","text-(--neba-fg) no-underline select-none",x[P],le?"cursor-pointer rounded-(--neba-radius-sm)":"",le?"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2":"",J),style:{"--n-ring":`var(--neba-${R}-ring)`,...K},children:n(r,{children:[ae,W?e("span",{className:u("min-w-0 truncate font-semibold",j[P]),children:A}):null,re?e("span",{className:g,children:X}):null,le?e(o,{target:E}):null]}),...O}})});
1
+ "use client";import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import*as t from"react";import{useRender as a}from"@base-ui/react/use-render";import{initialsOf as l}from"../../internal/initials.js";import{safeHref as s,safeRel as i}from"../../internal/link.js";import{NewTabNote as o}from"../../internal/new-tab.js";import{controlHeightClasses as m,controlSlots as d,controlSquareClasses as c,cx as u,gapClasses as x,hasContent as f,srOnlyClasses as g,surfaceClasses as p,tintPlateClasses as h,toLength as v,transitionClasses as b}from"../../internal/styles.js";import{useStyleDefaults as w}from"../../internal/defaults.js";const j={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.375rem]",xl:"text-[1.625rem]"},N={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.3125rem]",xl:"text-[1.5625rem]"},_={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},y={solid:[p,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[p,"border text-(--n-on-tint) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:`text-(--n-on-tint) ${h} [box-shadow:var(--n-elev)]`};export const AppLogo=/*@__PURE__*/t.forwardRef(function AppLogo(t,p){const{src:h,srcSet:k,alt:z,name:A,initials:L,showName:S=!1,shape:$="bare",variant:F="solid",size:P="md",color:R="primary",elevation:q=0,padded:B=!0,height:C,href:D,target:E,rel:G,imageProps:H,render:I,className:J,style:K,children:M,...O}=w(t,["size","variant"]),Q="bare"!==$,T=f(M)?M:h?"image":null,U=Q&&B,V=null===T&&!Q,W=S&&!V&&f(A),X=z??A,Y=L??(A?l(A):""),Z="image"===T&&!W&&f(X),ee=V||Z,re=!ee&&!W&&f(X),ne=v(C),te=ne?{height:ne,width:Q?ne:void 0}:null,ae=e("span",{"aria-hidden":!ee||void 0,className:u("flex shrink-0 items-center justify-center overflow-hidden","font-semibold tracking-tight whitespace-nowrap",ne?"":m[P],Q?u(ne?"":c[P],"circle"===$?"rounded-full":_[P],N[P],y[F]):u("w-auto text-(--neba-fg)",j[P]),"[&_svg]:w-auto [&_svg]:shrink-0",U?"[&_svg]:h-[72%] [&_svg]:max-w-[72%]":"[&_svg]:h-full [&_svg]:max-w-full",b),style:{...Q?d(R,q,F):null,...te},children:"image"===T?e("img",{alt:Z?X??"":"",decoding:"async",...H,className:u("w-auto object-contain",U?"h-[72%] max-w-[72%]":"h-full max-w-full",H?.className),srcSet:k,src:h}):T??(V?A:Y)}),le=s(D);return a({render:I??e(le?"a":"span",{}),ref:p,props:{href:le,target:E,rel:i(E,G),className:u("inline-flex max-w-full min-w-0 items-center align-middle","text-(--neba-fg) no-underline select-none",x[P],le?"cursor-pointer rounded-(--neba-radius-sm)":"",le?"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2":"",J),style:{"--n-ring":`var(--neba-${R}-ring)`,...K},children:n(r,{children:[ae,W?e("span",{className:u("min-w-0 truncate font-semibold",j[P]),children:A}):null,re?e("span",{className:g,children:X}):null,le?e(o,{target:E}):null]}),...O}})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as l,Fragment as n}from"react/jsx-runtime";import*as a from"react";import{Button as t}from"../button/Button.js";import{boxPaddingClasses as i}from"../box/Box.js";import{CheckIcon as s,severityIcon as r}from"../../internal/icons.js";import{approvalMessages as o,useMessages as c}from"../../internal/i18n.js";import{cx as d,focusRingClasses as m,hasContent as f,iconClasses as u,metaTextClasses as p,preformattedClasses as x,radiusClasses as v,sheetBodyClasses as h,sheetHeaderGapClasses as b,sheetSectionGapClasses as g,sheetTitleClasses as N,surfaceClasses as w,surfaceSlots as j,transitionClasses as y}from"../../internal/styles.js";import{useStyleDefaults as k}from"../../internal/defaults.js";const z={low:"info",medium:"warning",high:"danger"},I={solid:[w,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[w,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft)"};export const Approval=/*@__PURE__*/a.forwardRef(function Approval(w,R){const{variant:A="outline",size:B="md",color:E="warning",density:q="default",elevation:C=0,options:D,title:F,description:L,details:S,risk:G,decision:H,onDecide:J,icon:K,disabled:M=!1,locale:O,labels:P,classNames:Q,className:T,style:U,children:V,...W}=k(w,["size","density","variant","locale"]),X={...c(o,O),...P},[Y,Z]=a.useState(null),$=void 0!==H,_=$?H:Y,ee=G?z[G]:E,le=void 0===K?r(ee):K,ne=f(F)?F:X.request,ae=a.useId(),te=null===_?void 0:D.find(e=>e.value===_),ie=void 0!==te,se=a.useRef(!1),re=a.useRef(null);return a.useLayoutEffect(()=>{if(!ie||!se.current)return;se.current=!1;const e=document.activeElement;null!==e&&e!==document.body||re.current?.focus()},[ie]),l("div",{ref:R,role:"group","aria-labelledby":ae,"data-decided":_??void 0,className:d("flex w-full flex-col",i[q][B],v[B],g[B],h[B],I[A],y,u,T??""),style:{...j(ee,C),...U},...W,children:[l("div",{className:"flex items-start gap-3",children:[f(le)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--n-accent)",children:le}):null,l("div",{className:d("flex min-w-0 flex-1 flex-col",b[B]),children:[e("div",{id:ae,className:d("font-semibold text-(--n-accent)",N[B],Q?.title??""),children:ne}),f(L)?e("div",{className:d("text-(--neba-muted-fg)",Q?.description??""),children:L}):null]}),G?e("span",{className:d("shrink-0 rounded-full bg-(--n-soft) px-2 py-0.5 font-medium text-(--n-on-tint)",p[B]),children:X[G]}):null]}),f(S)?e("div",{className:d("min-w-0",Q?.details??""),children:"string"==typeof S?e("pre",{className:d(x,"max-h-56"),children:S}):S}):null,V,e("div",{className:d("flex min-w-0 flex-col gap-1.5",Q?.actions??""),children:te?l("div",{ref:re,tabIndex:-1,className:d("flex items-center gap-2 rounded-(--neba-radius-xs) text-(--neba-muted-fg)",m),children:[e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--n-accent)",children:e(s,{})}),e("span",{className:p[B],children:X.answered}),e("span",{className:"min-w-0 font-medium text-(--neba-fg)",children:te.label})]}):l(n,{children:[e("div",{className:"flex flex-wrap gap-2",children:D.map(l=>e(t,{size:B,variant:l.variant??"outline",color:l.color??ee,startIcon:l.icon,disabled:M||l.disabled,onClick:()=>{se.current=!0,$||Z(l.value),J?.(l.value)},children:l.label},l.value))}),D.some(e=>f(e.description))?e("ul",{className:d("m-0 flex list-none flex-col gap-0.5 p-0 text-(--neba-muted-fg)",p[B]),children:D.filter(e=>f(e.description)).map(n=>l("li",{children:[e("span",{className:"font-medium text-(--neba-fg)",children:n.label})," — ",n.description]},n.value))}):null]})})]})});
1
+ "use client";import{jsx as e,jsxs as l,Fragment as n}from"react/jsx-runtime";import*as a from"react";import{useLayoutEffectOnClient as t}from"../../internal/layout-effect.js";import{Button as i}from"../button/Button.js";import{boxPaddingClasses as s}from"../box/Box.js";import{CheckIcon as r,severityIcon as o}from"../../internal/icons.js";import{approvalMessages as c,useMessages as d}from"../../internal/i18n.js";import{cx as m,focusRingClasses as f,hasContent as u,iconClasses as p,metaTextClasses as x,preformattedClasses as v,radiusClasses as h,sheetBodyClasses as b,sheetHeaderGapClasses as g,sheetSectionGapClasses as N,sheetTitleClasses as w,surfaceClasses as j,surfaceSlots as y,transitionClasses as k}from"../../internal/styles.js";import{useStyleDefaults as z}from"../../internal/defaults.js";const I={low:"info",medium:"warning",high:"danger"},R={solid:[j,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[j,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft)"};export const Approval=/*@__PURE__*/a.forwardRef(function Approval(j,A){const{variant:B="outline",size:q="md",color:C="warning",density:D="default",elevation:E=0,options:F,title:S,description:G,details:H,risk:J,decision:K,onDecide:L,icon:M,disabled:O=!1,locale:P,labels:Q,classNames:T,className:U,style:V,children:W,...X}=z(j,["size","density","variant","locale"]),Y={...d(c,P),...Q},[Z,$]=a.useState(null),_=void 0!==K,ee=_?K:Z,le=J?I[J]:C,ne=void 0===M?o(le):M,ae=u(S)?S:Y.request,te=a.useId(),ie=null===ee?void 0:F.find(e=>e.value===ee),se=void 0!==ie,re=a.useRef(!1),oe=a.useRef(null);return t(()=>{if(!se||!re.current)return;re.current=!1;const e=document.activeElement;null!==e&&e!==document.body||oe.current?.focus()},[se]),l("div",{ref:A,role:"group","aria-labelledby":te,"data-decided":ee??void 0,className:m("flex w-full flex-col",s[D][q],h[q],N[q],b[q],R[B],k,p,U??""),style:{...y(le,E),...V},...X,children:[l("div",{className:"flex items-start gap-3",children:[u(ne)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--n-accent)",children:ne}):null,l("div",{className:m("flex min-w-0 flex-1 flex-col",g[q]),children:[e("div",{id:te,className:m("font-semibold text-(--n-accent)",w[q],T?.title??""),children:ae}),u(G)?e("div",{className:m("text-(--neba-muted-fg)",T?.description??""),children:G}):null]}),J?e("span",{className:m("shrink-0 rounded-full bg-(--n-soft) px-2 py-0.5 font-medium text-(--n-on-tint)",x[q]),children:Y[J]}):null]}),u(H)?e("div",{className:m("min-w-0",T?.details??""),children:"string"==typeof H?e("pre",{className:m(v,"max-h-56"),children:H}):H}):null,W,e("div",{className:m("flex min-w-0 flex-col gap-1.5",T?.actions??""),children:ie?l("div",{ref:oe,tabIndex:-1,className:m("flex items-center gap-2 rounded-(--neba-radius-xs) text-(--neba-muted-fg)",f),children:[e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--n-accent)",children:e(r,{})}),e("span",{className:x[q],children:Y.answered}),e("span",{className:"min-w-0 font-medium text-(--neba-fg)",children:ie.label})]}):l(n,{children:[e("div",{className:"flex flex-wrap gap-2",children:F.map(l=>e(i,{size:q,variant:l.variant??"outline",color:l.color??le,startIcon:l.icon,disabled:O||l.disabled,onClick:()=>{re.current=!0,_||$(l.value),L?.(l.value)},children:l.label},l.value))}),F.some(e=>u(e.description))?e("ul",{className:m("m-0 flex list-none flex-col gap-0.5 p-0 text-(--neba-muted-fg)",x[q]),children:F.filter(e=>u(e.description)).map(n=>l("li",{children:[e("span",{className:"font-medium text-(--neba-fg)",children:n.label})," — ",n.description]},n.value))}):null]})})]})});
@@ -38,6 +38,17 @@ export interface BreadcrumbProps extends Omit<React.ComponentPropsWithoutRef<'na
38
38
  * @default true
39
39
  */
40
40
  expandable?: boolean;
41
+ /**
42
+ * Keeps the steps a `maxItems` fold hides in the DOM, hidden, rather than
43
+ * leaving them out until the `…` is pressed. Unfolding then shows them where
44
+ * they already are.
45
+ *
46
+ * A step that is not in the markup is not in a server render either, and a
47
+ * crawler reads the server render without pressing anything. `structuredData`
48
+ * already describes the whole path; this puts the links themselves there.
49
+ * @default false
50
+ */
51
+ keepMounted?: boolean;
41
52
  /**
42
53
  * Which language the trail names itself in — a BCP 47 tag such as `ko`,
43
54
  * `pt-BR` or `zh-Hant`. Unsupported tags fall back to English.
@@ -92,6 +103,11 @@ export interface BreadcrumbItemProps extends Omit<React.ComponentPropsWithoutRef
92
103
  render?: useRender.RenderProp;
93
104
  /** Where the link opens. Anything but this tab also gets `rel="noopener noreferrer"`. */
94
105
  target?: string;
106
+ /**
107
+ * The link's `rel` — `nofollow`, `sponsored`. The two tokens a new tab needs
108
+ * are merged into it rather than written over it.
109
+ */
110
+ rel?: string;
95
111
  /** Content before the label — a home glyph, a repository avatar. */
96
112
  startIcon?: React.ReactNode;
97
113
  /** Content after the label. */
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{useRender as a}from"@base-ui/react/use-render";import{safeHref as s,safeRel as l}from"../../internal/link.js";import{NewTabNote as i}from"../../internal/new-tab.js";import{breadcrumbMessages as o,useMessages as c}from"../../internal/i18n.js";import{ArrowRightIcon as m,ChevronIcon as u,EllipsisIcon as d}from"../../internal/icons.js";import{controlTextClasses as p,cx as f,gapClasses as h,hasContent as x,iconClasses as g,radiusClasses as b,transitionClasses as y}from"../../internal/styles.js";import{useStyleDefaults as v}from"../../internal/defaults.js";const N=/*@__PURE__*/n.createContext({size:"md",last:!1}),j={default:{xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},compact:{xs:"gap-0.5",sm:"gap-1",md:"gap-1",lg:"gap-1.5",xl:"gap-2"}},k={xs:b.xs,sm:b.xs,md:b.xs,lg:b.sm,xl:b.sm};const w=["chevron","arrow","slash","dot"];function C(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(C).join(""):n.isValidElement(e)?C(e.props.children):""}function B(e,t){if(!t)return e;try{return new URL(e,t).href}catch{return e}}function I(e,t){const r=e.map((e,r)=>{const{children:n}=e.props,a=s(e.props.href);return{"@type":"ListItem",position:r+1,name:C(n),...a?{item:B(a,t)}:null}});return JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:r}).replace(/</g,"\\u003c")}export const Breadcrumb=/*@__PURE__*/n.forwardRef(function Breadcrumb(r,a){const{size:s="md",color:l="primary",density:i="default",separator:h="chevron",maxItems:x,itemsBeforeCollapse:b=1,itemsAfterCollapse:k=1,expandable:B=!0,locale:L,label:$,expandLabel:S,structuredData:_=!1,baseUrl:z,className:A,style:E,children:M,...R}=v(r,["size","density","locale"]),q=c(o,L),F=n.Children.toArray(M).filter(n.isValidElement),T=F.length,U=F.map(e=>`${e.key??""}\0${e.props.href??""}\0${C(e.props.children)}`).join(""),[V,D]=n.useState(null),H=V===U,J=n.useRef(null),O=n.useRef(!1);n.useLayoutEffect(()=>{if(!H||!O.current)return;O.current=!1;const e=J.current?.querySelectorAll(":scope > li:not([aria-hidden])")[Math.max(0,b)];e?.querySelector("a, button")?.focus()},[H,b]);const P=F.some(e=>!0===e.props.current),G=!H&&void 0!==x&&T>Math.max(x,1)&&T-b-k>1?[...F.slice(0,Math.max(0,b)),null,...F.slice(T-Math.max(0,k))]:F,K="string"==typeof(Q=h)&&w.includes(Q)?function(t){switch(t){case"chevron":return e("span",{className:"flex -rotate-90 items-center rtl:rotate-90",children:e(u,{})});case"arrow":return e("span",{className:"flex items-center rtl:rotate-180",children:e(m,{})});case"slash":return e("span",{className:"opacity-70",children:"/"});case"dot":return e("span",{className:"opacity-70",children:"·"});default:return null}}(h):h;var Q;const W=f("inline-flex items-center rounded-(--neba-radius-xs) px-0.5","text-(--neba-muted-fg)",y,g,B?f("cursor-pointer hover:bg-(--n-soft) hover:text-(--n-on-tint)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"");return t("nav",{ref:a,"aria-label":$??q.label,className:f("flex",p[s],g,A),style:{"--n-accent":`var(--neba-${l}-accent)`,"--n-on-tint":`var(--neba-${l}-on-tint)`,"--n-soft":`var(--neba-${l}-soft)`,"--n-ring":`var(--neba-${l}-ring)`,...E},...R,children:[_&&T>0?e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:I(F,z)}}):null,e("ol",{ref:J,role:"list",className:f("flex list-none flex-wrap items-center p-0",j[i][s]),children:G.map((r,a)=>t(n.Fragment,{children:[a>0?e("li",{"aria-hidden":"true",className:"flex shrink-0 items-center text-(--neba-muted-fg) select-none",children:K}):null,r?e(N.Provider,{value:{size:s,locale:L,last:!P&&a===G.length-1},children:r}):e("li",{className:"flex shrink-0 items-center",children:B?e("button",{type:"button",className:W,"aria-label":S??q.expand,onClick:e=>{O.current=e.currentTarget===document.activeElement,D(U)},children:e(d,{})}):e("span",{className:W,"aria-hidden":"true",children:e(d,{})})})]},r?r.key??a:"fold"))})]})});export const BreadcrumbItem=/*@__PURE__*/n.forwardRef(function BreadcrumbItem({href:o,onClick:c,render:m,target:u,startIcon:d,endIcon:p,current:g,disabled:b=!1,className:v,children:j,...w},C){const{size:B,locale:I,last:L}=n.useContext(N),$=s(o),S=g??L,_=Boolean($||c||m)&&!S&&!b,z=_&&Boolean($||m),A=f("inline-flex min-w-0 items-center px-1",h[B],k[B],y,b?"cursor-not-allowed text-(--neba-disabled-fg)":S?"font-medium text-(--neba-fg)":_?f("cursor-pointer text-(--neba-muted-fg)","hover:bg-(--n-soft) hover:text-(--n-on-tint)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"text-(--neba-muted-fg)"),E=t(r,{children:[x(d)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:d}):null,e("span",{className:"truncate",children:j}),x(p)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:p}):null]}),M=a({render:m??e("a",{}),props:{href:$,target:u,rel:l(u,void 0),className:A,onClick:c,children:t(r,{children:[E,e(i,{target:u,locale:I})]})}});return e("li",{ref:C,className:f("flex min-w-0 items-center",v),...w,children:z?M:_?e("button",{type:"button",className:A,onClick:c,children:E}):e("span",{className:A,"aria-current":S?"page":void 0,"aria-disabled":b||void 0,children:E})})});
1
+ "use client";import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{useLayoutEffectOnClient as a}from"../../internal/layout-effect.js";import{useRender as s}from"@base-ui/react/use-render";import{safeHref as l,safeRel as i}from"../../internal/link.js";import{NewTabNote as o}from"../../internal/new-tab.js";import{breadcrumbMessages as c,useMessages as d}from"../../internal/i18n.js";import{ArrowRightIcon as m,ChevronIcon as u,EllipsisIcon as p}from"../../internal/icons.js";import{controlTextClasses as f,cx as h,gapClasses as x,hasContent as b,iconClasses as g,radiusClasses as y,transitionClasses as v}from"../../internal/styles.js";import{useStyleDefaults as N}from"../../internal/defaults.js";const j=/*@__PURE__*/n.createContext({size:"md",last:!1}),k={default:{xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},compact:{xs:"gap-0.5",sm:"gap-1",md:"gap-1",lg:"gap-1.5",xl:"gap-2"}},w={xs:y.xs,sm:y.xs,md:y.xs,lg:y.sm,xl:y.sm};const C=["chevron","arrow","slash","dot"];function B(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(B).join(""):n.isValidElement(e)?B(e.props.children):""}function I(e,t){if(!t)return e;try{return new URL(e,t).href}catch{return e}}function $(e,t){const r=e.map((e,r)=>{const{children:n}=e.props,a=l(e.props.href);return{"@type":"ListItem",position:r+1,name:B(n),...a?{item:I(a,t)}:null}});return JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:r}).replace(/</g,"\\u003c")}export const Breadcrumb=/*@__PURE__*/n.forwardRef(function Breadcrumb(r,s){const{size:l="md",color:i="primary",density:o="default",separator:x="chevron",maxItems:b,itemsBeforeCollapse:y=1,itemsAfterCollapse:w=1,expandable:I=!0,keepMounted:E=!1,locale:L,label:M,expandLabel:S,structuredData:_=!1,baseUrl:z,className:A,style:R,children:q,...F}=N(r,["size","density","locale"]),T=d(c,L),U=n.Children.toArray(q).filter(n.isValidElement),V=U.length,D=U.map(e=>`${e.key??""}\0${e.props.href??""}\0${B(e.props.children)}`).join(""),[H,J]=n.useState(null),O=H===D,P=n.useRef(null),G=n.useRef(!1);a(()=>{if(!O||!G.current)return;G.current=!1;const e=P.current?.querySelectorAll(":scope > li:not([aria-hidden])")[Math.max(0,y)];e?.querySelector("a, button")?.focus()},[O,y]);const K=U.some(e=>!0===e.props.current),Q=!O&&void 0!==b&&V>Math.max(b,1)&&V-y-w>1,W=Math.max(0,y),X=V-Math.max(0,w),Y=[];U.forEach((e,t)=>{const r=Q&&t>=W&&t<X;Q&&t===W&&Y.push({step:null,at:-1,folded:!1}),r?E&&Y.push({step:n.cloneElement(e,{hidden:!0}),at:t,folded:r}):Y.push({step:e,at:t,folded:r})});const Z=Y.reduce((e,t)=>t.folded?e:t.step?t.at:-1,-1),ee="string"==typeof(te=x)&&C.includes(te)?function(t){switch(t){case"chevron":return e("span",{className:"flex -rotate-90 items-center rtl:rotate-90",children:e(u,{})});case"arrow":return e("span",{className:"flex items-center rtl:rotate-180",children:e(m,{})});case"slash":return e("span",{className:"opacity-70",children:"/"});case"dot":return e("span",{className:"opacity-70",children:"·"});default:return null}}(x):x;var te;const re=h("inline-flex items-center rounded-(--neba-radius-xs) px-0.5","text-(--neba-muted-fg)",v,g,I?h("cursor-pointer hover:bg-(--n-soft) hover:text-(--n-on-tint)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"");return t("nav",{ref:s,"aria-label":M??T.label,className:h("flex",f[l],g,A),style:{"--n-accent":`var(--neba-${i}-accent)`,"--n-on-tint":`var(--neba-${i}-on-tint)`,"--n-soft":`var(--neba-${i}-soft)`,"--n-ring":`var(--neba-${i}-ring)`,...R},...F,children:[_&&V>0?e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:$(U,z)}}):null,e("ol",{ref:P,role:"list",className:h("flex list-none flex-wrap items-center p-0",k[o][l]),children:Y.map(({step:r,at:a,folded:s},i)=>t(n.Fragment,{children:[i>0?e("li",{"aria-hidden":"true",hidden:s||void 0,className:"flex shrink-0 items-center text-(--neba-muted-fg) select-none [&[hidden]]:hidden",children:ee}):null,r?e(j.Provider,{value:{size:l,locale:L,last:!K&&a===Z},children:r}):e("li",{className:"flex shrink-0 items-center",children:I?e("button",{type:"button",className:re,"aria-label":S??T.expand,onClick:e=>{G.current=e.currentTarget===document.activeElement,J(D)},children:e(p,{})}):e("span",{className:re,"aria-hidden":"true",children:e(p,{})})})]},r?r.key??a:"fold"))})]})});export const BreadcrumbItem=/*@__PURE__*/n.forwardRef(function BreadcrumbItem({href:a,onClick:c,render:d,target:m,rel:u,startIcon:p,endIcon:f,current:g,disabled:y=!1,className:N,children:k,...C},B){const{size:I,locale:$,last:E}=n.useContext(j),L=l(a),M=g??E,S=Boolean(L||c||d)&&!M&&!y,_=S&&Boolean(L||d),z=h("inline-flex min-w-0 items-center px-1",x[I],w[I],v,y?"cursor-not-allowed text-(--neba-disabled-fg)":M?"font-medium text-(--neba-fg)":S?h("cursor-pointer text-(--neba-muted-fg)","hover:bg-(--n-soft) hover:text-(--n-on-tint)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"text-(--neba-muted-fg)"),A=t(r,{children:[b(p)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:p}):null,e("span",{className:"truncate",children:k}),b(f)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:f}):null]}),R=s({render:d??e("a",{}),props:{href:L,target:m,rel:i(m,u),className:z,onClick:c,children:t(r,{children:[A,e(o,{target:m,locale:$})]})}});return e("li",{ref:B,className:h("flex min-w-0 items-center [&[hidden]]:hidden",N),...C,children:_?R:S?e("button",{type:"button",className:z,onClick:c,children:A}):e("span",{className:z,"aria-current":M?"page":void 0,"aria-disabled":y||void 0,children:A})})});
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import*as a from"react";import{Calendar as t,usePickerLabels as n}from"../../internal/calendar.js";import{compareDay as r,isSameDay as l,isValidDate as s,localeWeekStart as o,startOfMonth as i,startOfUnit as d,today as u}from"../../internal/date.js";import{popupPaddingClasses as m}from"../../internal/picker.js";import{cx as c,radiusClasses as g,surfaceClasses as f,surfaceSlots as h}from"../../internal/styles.js";import{useStyleDefaults as p}from"../../internal/defaults.js";const v={single:null,multiple:[],range:{start:null,end:null}};function b(e,a){if("multiple"===e)return a??[];if("range"===e){const e=a??v.range;return[e.start,e.end]}return[a]}export const Calendar=/*@__PURE__*/a.forwardRef(function Calendar(D,y){const{mode:j="single",value:w,defaultValue:x,onValueChange:C,size:S="md",color:k="primary",elevation:O=0,bordered:z=!0,month:M,defaultMonth:N,onMonthChange:V,granularity:E="day",minDate:R,maxDate:q,shouldDisableDate:A,locale:B,weekStartsOn:F,showOutsideDays:G=!0,renderDay:H,labels:I,className:J,style:K,...L}=p(D,["size","locale"]),P=n(I,B),Q=F??o(B),[T,U]=a.useState(()=>x??v[j]),W=void 0!==w?w:T,X=b(j,W).find(s),[Y,Z]=a.useState(()=>i(X??N??u())),$=M??Y,_=e=>{void 0===w&&U(e),C?.(e)},ee="range"===j?W??v.range:v.range;return e("div",{ref:y,className:c("inline-block",z?c(f,"border bg-(--n-panel-press) [border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]",g[S],m[S]):"[box-shadow:var(--n-elev)]",J),style:{...h(k,O),...K},...L,children:e(t,{size:S,color:k,locale:B,weekStartsOn:Q,month:$,onMonthChange:e=>{void 0===M&&Z(e),V?.(e)},selected:b(j,W),rangeStart:ee.start,rangeEnd:ee.end,onSelect:e=>{const a=d(e,E);if("multiple"===j){const e=W??[],t=e.filter(e=>!l(e,a));return void _(t.length===e.length?[...e,a]:t)}if("range"===j){const e=W??v.range;return!s(e.start)||s(e.end)?void _({start:a,end:null}):void _(r(a,e.start)<0?{start:a,end:null}:{start:e.start,end:a})}_(a)},granularity:E,minDate:R,maxDate:q,shouldDisableDate:A,showOutsideDays:G,renderDay:H,multiselectable:"single"!==j,labels:P})})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as a from"react";import{Calendar as t,usePickerLabels as n}from"../../internal/calendar.js";import{compareDay as r,isSameDay as l,isValidDate as s,localeWeekStart as o,startOfMonth as i,startOfUnit as d,today as m}from"../../internal/date.js";import{popupPaddingClasses as u}from"../../internal/picker.js";import{cx as c,radiusClasses as f,surfaceClasses as g,surfaceSlots as h}from"../../internal/styles.js";import{useStyleDefaults as p}from"../../internal/defaults.js";import{useIntlLocale as v}from"../../internal/media.js";const b={single:null,multiple:[],range:{start:null,end:null}};function D(e,a){if("multiple"===e)return a??[];if("range"===e){const e=a??b.range;return[e.start,e.end]}return[a]}export const Calendar=/*@__PURE__*/a.forwardRef(function Calendar(y,j){const{mode:w="single",value:x,defaultValue:C,onValueChange:S,size:k="md",color:O="primary",elevation:z=0,bordered:M=!0,month:N,defaultMonth:V,onMonthChange:E,granularity:R="day",minDate:q,maxDate:A,shouldDisableDate:B,locale:F,weekStartsOn:G,showOutsideDays:H=!0,renderDay:I,labels:J,className:K,style:L,...P}=p(y,["size","locale"]),Q=n(J,F),T=v(F),U=G??o(T),[W,X]=a.useState(()=>C??b[w]),Y=void 0!==x?x:W,Z=D(w,Y).find(s),[$,_]=a.useState(()=>i(Z??V??m())),ee=N??$,ae=e=>{void 0===x&&X(e),S?.(e)},te="range"===w?Y??b.range:b.range;return e("div",{ref:j,className:c("inline-block",M?c(g,"border bg-(--n-panel-press) [border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]",f[k],u[k]):"[box-shadow:var(--n-elev)]",K),style:{...h(O,z),...L},...P,children:e(t,{size:k,color:O,locale:F,weekStartsOn:U,month:ee,onMonthChange:e=>{void 0===N&&_(e),E?.(e)},selected:D(w,Y),rangeStart:te.start,rangeEnd:te.end,onSelect:e=>{const a=d(e,R);if("multiple"===w){const e=Y??[],t=e.filter(e=>!l(e,a));return void ae(t.length===e.length?[...e,a]:t)}if("range"===w){const e=Y??b.range;return!s(e.start)||s(e.end)?void ae({start:a,end:null}):void ae(r(a,e.start)<0?{start:a,end:null}:{start:e.start,end:a})}ae(a)},granularity:R,minDate:q,maxDate:A,shouldDisableDate:B,showOutsideDays:H,renderDay:I,multiselectable:"single"!==w,labels:Q})})});