@langchain/macaw-components 1.0.0-beta.6 → 1.0.0-beta.8

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 (32) hide show
  1. package/dist/_chunks/{LoadingIndicator-CDcArsiM.js → LoadingIndicator-DujSAzqj.js} +2 -1
  2. package/dist/_chunks/LoadingIndicator-DujSAzqj.js.map +1 -0
  3. package/dist/catalog.json +499 -469
  4. package/dist/components/Attachment/Attachment.d.ts +2 -0
  5. package/dist/components/Attachment/Attachment.js +10 -5
  6. package/dist/components/Attachment/Attachment.js.map +1 -1
  7. package/dist/components/HeatmapChart/HeatmapBlock.d.ts +22 -0
  8. package/dist/components/HeatmapChart/HeatmapBlock.js +54 -0
  9. package/dist/components/HeatmapChart/HeatmapBlock.js.map +1 -0
  10. package/dist/components/HeatmapChart/HeatmapChart.d.ts +9 -0
  11. package/dist/components/HeatmapChart/HeatmapChart.js +79 -0
  12. package/dist/components/HeatmapChart/HeatmapChart.js.map +1 -0
  13. package/dist/components/HeatmapChart/index.d.ts +4 -0
  14. package/dist/components/HeatmapChart/index.js +3 -0
  15. package/dist/components/ThinkingState/LoadingIndicator.d.ts +2 -1
  16. package/dist/components/ThinkingState/LoadingIndicator.js +1 -1
  17. package/dist/components/ThinkingState/ThinkingState.js +4 -4
  18. package/dist/components/ThinkingState/ThinkingState.js.map +1 -1
  19. package/dist/components/ThinkingState/ThinkingStateTimer.d.ts +1 -1
  20. package/dist/components/ThinkingState/ThinkingStateTimer.js +1 -1
  21. package/dist/components/ThinkingState/ThinkingStateTimer.js.map +1 -1
  22. package/dist/components/ThinkingState/index.js +1 -1
  23. package/dist/components/index.d.ts +2 -0
  24. package/dist/components/index.js +3 -1
  25. package/dist/index.js +3 -1
  26. package/dist/utilities.css +1 -1
  27. package/dist/utils/spacing.d.ts +1 -1
  28. package/dist/utils/spacing.js +1 -1
  29. package/dist/utils/spacing.js.map +1 -1
  30. package/docs/DESIGN.md +4 -1
  31. package/package.json +10 -2
  32. package/dist/_chunks/LoadingIndicator-CDcArsiM.js.map +0 -1
@@ -16,6 +16,7 @@ var ThinkingState_module_default = {
16
16
  //#endregion
17
17
  //#region packages/components/src/components/ThinkingState/LoadingIndicator.tsx
18
18
  var SIZES = {
19
+ xs: VISUAL_ELEMENT_SIZES.xxs.className,
19
20
  sm: VISUAL_ELEMENT_SIZES.xs.className,
20
21
  md: VISUAL_ELEMENT_SIZES.sm.className,
21
22
  lg: VISUAL_ELEMENT_SIZES.md.className
@@ -78,4 +79,4 @@ var LoadingIndicator = forwardRef(function LoadingIndicator({ variant = "drive",
78
79
  //#endregion
79
80
  export { ThinkingState_module_default as n, LoadingIndicator as t };
80
81
 
81
- //# sourceMappingURL=LoadingIndicator-CDcArsiM.js.map
82
+ //# sourceMappingURL=LoadingIndicator-DujSAzqj.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingIndicator-DujSAzqj.js","names":[],"sources":["../../src/components/ThinkingState/ThinkingState.module.css","../../src/components/ThinkingState/LoadingIndicator.tsx"],"sourcesContent":["/* Adapted from TurboKach/ai-native-react-components (MIT). See NOTICE. */\n.grid {\n display: inline-grid;\n grid-template: repeat(3, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr));\n gap: 10%;\n}\n\n.pixel {\n border-radius: 1px;\n opacity: 0.15;\n animation: pixel-on var(--loading-cycle) ease-in-out infinite;\n}\n\n.dot {\n @apply rounded-full;\n}\n\n.inactive {\n opacity: 0.07;\n animation: none;\n}\n\n.grid[data-animated='false'] .pixel {\n animation: none;\n}\n\n.grid[data-animated='false'] .pixel:not(.inactive) {\n opacity: 0.5;\n}\n\n.shimmer {\n @apply bg-gradient-to-r from-text-tertiary from-35% via-text-primary via-50% to-text-tertiary to-65% bg-clip-text text-transparent;\n background-size: 200% 100%;\n animation: shimmer-text 1.4s linear infinite;\n}\n\n.slow {\n animation-duration: 2.8s;\n}\n\n.brandShimmer {\n @apply via-text-brand-primary to-text-tertiary;\n}\n\n@keyframes pixel-on {\n 0%,\n 100% {\n opacity: 0.15;\n }\n 18%,\n 42% {\n opacity: 1;\n }\n 62% {\n opacity: 0.15;\n }\n}\n\n@keyframes shimmer-text {\n from {\n background-position: 150% 50%;\n }\n to {\n background-position: -50% 50%;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .pixel,\n .shimmer {\n animation: none;\n }\n\n .pixel:not(.inactive) {\n opacity: 0.5;\n }\n .shimmer {\n @apply text-secondary;\n background: none;\n }\n}\n\n@media (forced-colors: active) {\n .shimmer {\n background: none;\n color: CanvasText;\n }\n .pixel {\n background: CanvasText;\n }\n}\n","// Adapted from TurboKach/ai-native-react-components (MIT). See NOTICE.\nimport { forwardRef } from 'react';\nimport type { ComponentPropsWithRef, CSSProperties } from 'react';\n\nimport { cn } from '../../utils/cn';\nimport { VISUAL_ELEMENT_SIZES } from '../../utils/componentSizes';\n\nimport styles from './ThinkingState.module.css';\n\ntype ThinkingStateVariant = 'drive' | 'dots' | 'orbit';\n\nconst SIZES = {\n xs: VISUAL_ELEMENT_SIZES.xxs.className,\n sm: VISUAL_ELEMENT_SIZES.xs.className,\n md: VISUAL_ELEMENT_SIZES.sm.className,\n lg: VISUAL_ELEMENT_SIZES.md.className,\n};\n\ninterface LoadingIndicatorProps extends Omit<\n ComponentPropsWithRef<'span'>,\n 'children'\n> {\n variant?: ThinkingStateVariant;\n /** Indicator outer size: xs=12px, sm=16px, md=20px, lg=24px. */\n size?: keyof typeof SIZES;\n tone?: 'neutral' | 'brand';\n /** Reduced-motion preferences always take precedence. */\n animated?: boolean;\n speed?: 'normal' | 'slow';\n}\n\nconst CHEVRON_DELAYS = [90, 180, 270, 0, 90, 180, 90, 180, 270];\nconst PATTERNS: Record<\n ThinkingStateVariant,\n { delays: (number | null)[]; duration: string }\n> = {\n drive: { delays: CHEVRON_DELAYS, duration: '650ms' },\n dots: { delays: CHEVRON_DELAYS, duration: '650ms' },\n orbit: {\n delays: [0, 110, 220, 770, null, 330, 660, 550, 440],\n duration: '950ms',\n },\n};\n\ninterface IndicatorStyle extends CSSProperties {\n '--loading-cycle': string;\n}\n\n/** Decorative indicator. Announce loading on the surrounding control or region. */\nconst LoadingIndicator = forwardRef<HTMLSpanElement, LoadingIndicatorProps>(\n function LoadingIndicator(\n {\n variant = 'drive',\n size = 'sm',\n tone = 'neutral',\n animated = true,\n speed = 'normal',\n className,\n style,\n ...props\n },\n ref\n ) {\n const pattern = PATTERNS[variant];\n const indicatorStyle: IndicatorStyle = {\n '--loading-cycle':\n speed === 'slow' ? `calc(${pattern.duration} * 2)` : pattern.duration,\n ...style,\n };\n\n return (\n <span\n {...props}\n ref={ref}\n aria-hidden=\"true\"\n data-animated={animated}\n className={cn(\n styles.grid,\n SIZES[size],\n 'shrink-0',\n tone === 'brand' ? 'text-icon-brand' : 'text-icon-primary',\n className\n )}\n style={indicatorStyle}\n >\n {pattern.delays.map((delay, index) => (\n <span\n key={index}\n className={cn(\n styles.pixel,\n 'bg-current',\n variant === 'dots' && styles.dot,\n delay === null && styles.inactive\n )}\n style={{\n animationDelay: `${(delay ?? 0) * (speed === 'slow' ? 2 : 1)}ms`,\n }}\n />\n ))}\n </span>\n );\n }\n);\n\nexport { LoadingIndicator };\nexport type { LoadingIndicatorProps, ThinkingStateVariant };\n"],"mappings":";;;;;;;;;;;;;;;;;ACWA,IAAM,QAAQ;CACZ,IAAI,qBAAqB,IAAI;CAC7B,IAAI,qBAAqB,GAAG;CAC5B,IAAI,qBAAqB,GAAG;CAC5B,IAAI,qBAAqB,GAAG;AAC9B;AAeA,IAAM,iBAAiB;CAAC;CAAI;CAAK;CAAK;CAAG;CAAI;CAAK;CAAI;CAAK;AAAG;AAC9D,IAAM,WAGF;CACF,OAAO;EAAE,QAAQ;EAAgB,UAAU;CAAQ;CACnD,MAAM;EAAE,QAAQ;EAAgB,UAAU;CAAQ;CAClD,OAAO;EACL,QAAQ;GAAC;GAAG;GAAK;GAAK;GAAK;GAAM;GAAK;GAAK;GAAK;EAAG;EACnD,UAAU;CACZ;AACF;;AAOA,IAAM,mBAAmB,WACvB,SAAS,iBACP,EACE,UAAU,SACV,OAAO,MACP,OAAO,WACP,WAAW,MACX,QAAQ,UACR,WACA,OACA,GAAG,SAEL,KACA;CACA,MAAM,UAAU,SAAS;CACzB,MAAM,iBAAiC;EACrC,mBACE,UAAU,SAAS,QAAQ,QAAQ,SAAS,SAAS,QAAQ;EAC/D,GAAG;CACL;CAEA,OACE,oBAAC,QAAD;EACE,GAAI;EACC;EACL,eAAY;EACZ,iBAAe;EACf,WAAW,GACT,6BAAO,MACP,MAAM,OACN,YACA,SAAS,UAAU,oBAAoB,qBACvC,SACF;EACA,OAAO;EAEN,UAAA,QAAQ,OAAO,KAAK,OAAO,UAC1B,oBAAC,QAAD;GAEE,WAAW,GACT,6BAAO,OACP,cACA,YAAY,UAAU,6BAAO,KAC7B,UAAU,QAAQ,6BAAO,QAC3B;GACA,OAAO,EACL,gBAAgB,IAAI,SAAS,MAAM,UAAU,SAAS,IAAI,GAAG,IAC/D;EACD,GAVM,KAUN,CACF;CACG,CAAA;AAEV,CACF"}