@k2b/ui 0.60.0 → 0.62.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 (109) hide show
  1. package/dist/browser/actions/FilterChip.js +3 -0
  2. package/dist/browser/actions/FilterChip.js.map +1 -1
  3. package/dist/browser/chat/ChatPrimitives.js +435 -420
  4. package/dist/browser/chat/ChatPrimitives.js.map +1 -1
  5. package/dist/browser/chat/ChatTasks.js +78 -73
  6. package/dist/browser/chat/ChatTasks.js.map +1 -1
  7. package/dist/browser/chat/ChatTimeline.js +3 -0
  8. package/dist/browser/chat/ChatTimeline.js.map +1 -1
  9. package/dist/browser/content/ActivityList.js +379 -290
  10. package/dist/browser/content/ActivityList.js.map +1 -1
  11. package/dist/browser/content/FileView.js +0 -12
  12. package/dist/browser/content/FileView.js.map +1 -1
  13. package/dist/browser/content/Lightbox.js +31 -11
  14. package/dist/browser/content/Lightbox.js.map +1 -1
  15. package/dist/browser/content/PdfPages.js +26 -1
  16. package/dist/browser/content/PdfPages.js.map +1 -1
  17. package/dist/browser/content/RunLog.js +719 -0
  18. package/dist/browser/content/RunLog.js.map +1 -0
  19. package/dist/browser/content/activity-messages.js +2 -2
  20. package/dist/browser/content/activity-messages.js.map +1 -1
  21. package/dist/browser/content/file-view-preview.js +13 -0
  22. package/dist/browser/content/file-view-preview.js.map +1 -1
  23. package/dist/browser/content/index.js +5 -4
  24. package/dist/browser/content/index.js.map +1 -1
  25. package/dist/browser/content/run-log-messages.js +134 -0
  26. package/dist/browser/content/run-log-messages.js.map +1 -0
  27. package/dist/browser/feedback/dialog-core.js +24 -27
  28. package/dist/browser/feedback/dialog-core.js.map +1 -1
  29. package/dist/browser/feedback/dialog-frame-motion.js +506 -15
  30. package/dist/browser/feedback/dialog-frame-motion.js.map +1 -1
  31. package/dist/browser/feedback/prompt-sheet.js +1 -0
  32. package/dist/browser/feedback/prompt-sheet.js.map +1 -1
  33. package/dist/browser/feedback/prompts.js +5 -1
  34. package/dist/browser/feedback/prompts.js.map +1 -1
  35. package/dist/browser/feedback/toast.js +11 -1
  36. package/dist/browser/feedback/toast.js.map +1 -1
  37. package/dist/browser/internal/step-row.js +78 -0
  38. package/dist/browser/internal/step-row.js.map +1 -0
  39. package/dist/browser/layout/PullToRefresh.js +76 -23
  40. package/dist/browser/layout/PullToRefresh.js.map +1 -1
  41. package/dist/browser/layout/refresh-messages.js +4 -2
  42. package/dist/browser/layout/refresh-messages.js.map +1 -1
  43. package/dist/browser/layout/sheet-motion.js +3 -3
  44. package/dist/browser/layout/sheet-motion.js.map +1 -1
  45. package/dist/ssr/actions/FilterChip.js +3 -0
  46. package/dist/ssr/actions/FilterChip.js.map +1 -1
  47. package/dist/ssr/chat/ChatPrimitives.js +109 -71
  48. package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
  49. package/dist/ssr/chat/ChatTasks.js +31 -16
  50. package/dist/ssr/chat/ChatTasks.js.map +1 -1
  51. package/dist/ssr/chat/ChatTimeline.js +3 -0
  52. package/dist/ssr/chat/ChatTimeline.js.map +1 -1
  53. package/dist/ssr/content/ActivityList.js +199 -114
  54. package/dist/ssr/content/ActivityList.js.map +1 -1
  55. package/dist/ssr/content/FileView.js +0 -12
  56. package/dist/ssr/content/FileView.js.map +1 -1
  57. package/dist/ssr/content/Lightbox.js +31 -11
  58. package/dist/ssr/content/Lightbox.js.map +1 -1
  59. package/dist/ssr/content/PdfPages.js +26 -1
  60. package/dist/ssr/content/PdfPages.js.map +1 -1
  61. package/dist/ssr/content/RunLog.js +471 -0
  62. package/dist/ssr/content/RunLog.js.map +1 -0
  63. package/dist/ssr/content/activity-messages.js +2 -2
  64. package/dist/ssr/content/activity-messages.js.map +1 -1
  65. package/dist/ssr/content/file-view-preview.js +13 -0
  66. package/dist/ssr/content/file-view-preview.js.map +1 -1
  67. package/dist/ssr/content/index.js +5 -4
  68. package/dist/ssr/content/index.js.map +1 -1
  69. package/dist/ssr/content/run-log-messages.js +134 -0
  70. package/dist/ssr/content/run-log-messages.js.map +1 -0
  71. package/dist/ssr/feedback/dialog-core.js +24 -27
  72. package/dist/ssr/feedback/dialog-core.js.map +1 -1
  73. package/dist/ssr/feedback/dialog-frame-motion.js +506 -15
  74. package/dist/ssr/feedback/dialog-frame-motion.js.map +1 -1
  75. package/dist/ssr/feedback/prompt-sheet.js +1 -0
  76. package/dist/ssr/feedback/prompt-sheet.js.map +1 -1
  77. package/dist/ssr/feedback/prompts.js +5 -1
  78. package/dist/ssr/feedback/prompts.js.map +1 -1
  79. package/dist/ssr/feedback/toast.js +11 -1
  80. package/dist/ssr/feedback/toast.js.map +1 -1
  81. package/dist/ssr/internal/step-row.js +35 -0
  82. package/dist/ssr/internal/step-row.js.map +1 -0
  83. package/dist/ssr/layout/PullToRefresh.js +67 -16
  84. package/dist/ssr/layout/PullToRefresh.js.map +1 -1
  85. package/dist/ssr/layout/refresh-messages.js +4 -2
  86. package/dist/ssr/layout/refresh-messages.js.map +1 -1
  87. package/dist/ssr/layout/sheet-motion.js +3 -3
  88. package/dist/ssr/layout/sheet-motion.js.map +1 -1
  89. package/dist/styles.css +1 -1
  90. package/dist/types/actions/FilterChip.d.ts +9 -0
  91. package/dist/types/chat/ChatPrimitives.d.ts +6 -0
  92. package/dist/types/chat/ChatTimeline.d.ts +2 -0
  93. package/dist/types/content/ActivityList.d.ts +24 -6
  94. package/dist/types/content/FileView.d.ts +0 -5
  95. package/dist/types/content/Lightbox.d.ts +7 -5
  96. package/dist/types/content/RunLog.d.ts +53 -0
  97. package/dist/types/content/file-view-preview.d.ts +5 -0
  98. package/dist/types/content/index.d.ts +4 -3
  99. package/dist/types/content/run-log-messages.d.ts +61 -0
  100. package/dist/types/feedback/dialog-core.d.ts +3 -1
  101. package/dist/types/feedback/dialog-frame-motion.d.ts +26 -1
  102. package/dist/types/feedback/prompt-sheet.d.ts +1 -0
  103. package/dist/types/feedback/prompts.d.ts +4 -0
  104. package/dist/types/feedback/toast.d.ts +9 -1
  105. package/dist/types/internal/step-row.d.ts +19 -0
  106. package/dist/types/layout/PullToRefresh.d.ts +2 -2
  107. package/dist/types/layout/refresh-messages.d.ts +1 -0
  108. package/dist/types/layout/sheet-motion.d.ts +2 -2
  109. package/package.json +9 -7
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["content/file-view-preview.ts"],"sourcesContent":["export type FileViewFile = {\n path: string;\n mediaType?: string;\n size?: number;\n};\n\nexport type FileViewPreviewKind = \"markdown\" | \"image\" | \"pdf\" | \"json\" | \"delimited-text\" | \"audio\" | \"video\" | \"text\";\n\nconst MEBIBYTE = 1024 * 1024;\n\nconst maxPreviewBytes: Record<FileViewPreviewKind, number> = {\n markdown: 2 * MEBIBYTE,\n image: 25 * MEBIBYTE,\n pdf: 50 * MEBIBYTE,\n json: 2 * MEBIBYTE,\n \"delimited-text\": 2 * MEBIBYTE,\n audio: 50 * MEBIBYTE,\n video: 50 * MEBIBYTE,\n text: 2 * MEBIBYTE,\n};\n\n// SVG remains inert because FileView renders every image through <img>; never inject its markup into the DOM.\nconst imageMediaTypes = new Set([\n \"image/avif\",\n \"image/bmp\",\n \"image/gif\",\n \"image/jpeg\",\n \"image/png\",\n \"image/svg+xml\",\n \"image/webp\",\n \"image/x-icon\",\n]);\nconst audioMediaTypes = new Set([\n \"audio/aac\",\n \"audio/flac\",\n \"audio/mp4\",\n \"audio/mpeg\",\n \"audio/ogg\",\n \"audio/wav\",\n \"audio/webm\",\n \"audio/x-wav\",\n]);\nconst videoMediaTypes = new Set([\"video/mp4\", \"video/ogg\", \"video/quicktime\", \"video/webm\", \"video/x-m4v\"]);\n\nconst markdownExtensions = new Set([\"md\", \"markdown\"]);\nconst imageExtensions = new Set([\"avif\", \"bmp\", \"gif\", \"ico\", \"jpeg\", \"jpg\", \"png\", \"svg\", \"webp\"]);\nconst audioExtensions = new Set([\"aac\", \"flac\", \"m4a\", \"mp3\", \"oga\", \"ogg\", \"wav\", \"weba\"]);\nconst videoExtensions = new Set([\"m4v\", \"mov\", \"mp4\", \"ogv\", \"webm\"]);\nconst textExtensions = new Set([\n \"c\",\n \"conf\",\n \"cpp\",\n \"css\",\n \"env\",\n \"go\",\n \"h\",\n \"html\",\n \"ini\",\n \"java\",\n \"js\",\n \"jsx\",\n \"log\",\n \"mjs\",\n \"php\",\n \"py\",\n \"rb\",\n \"rs\",\n \"sh\",\n \"sql\",\n \"toml\",\n \"ts\",\n \"tsx\",\n \"txt\",\n \"xml\",\n \"yaml\",\n \"yml\",\n]);\n\nexport const fileViewExtension = (path: string): string => {\n const cleanPath = path.split(/[?#]/, 1)[0] ?? path;\n const name = cleanPath.slice(cleanPath.lastIndexOf(\"/\") + 1);\n const dot = name.lastIndexOf(\".\");\n return dot > 0 ? name.slice(dot + 1).toLowerCase() : \"\";\n};\n\nconst normalizedMediaType = (mediaType?: string): string => mediaType?.split(\";\", 1)[0]?.trim().toLowerCase() ?? \"\";\n\nconst previewKindByType = (file: FileViewFile): FileViewPreviewKind | null => {\n const extension = fileViewExtension(file.path);\n const mediaType = normalizedMediaType(file.mediaType);\n\n if (mediaType === \"text/markdown\" || markdownExtensions.has(extension)) return \"markdown\";\n if (mediaType === \"application/json\" || mediaType.endsWith(\"+json\") || extension === \"json\") return \"json\";\n if (mediaType === \"text/csv\" || mediaType === \"text/tab-separated-values\" || extension === \"csv\" || extension === \"tsv\") {\n return \"delimited-text\";\n }\n if (mediaType === \"application/pdf\" || extension === \"pdf\") return \"pdf\";\n if (imageMediaTypes.has(mediaType) || imageExtensions.has(extension)) return \"image\";\n if (audioMediaTypes.has(mediaType) || audioExtensions.has(extension)) return \"audio\";\n if (videoMediaTypes.has(mediaType) || videoExtensions.has(extension)) return \"video\";\n if (\n mediaType.startsWith(\"text/\") ||\n mediaType === \"application/javascript\" ||\n mediaType === \"application/sql\" ||\n mediaType === \"application/xml\" ||\n textExtensions.has(extension)\n ) {\n return \"text\";\n }\n return null;\n};\n\n/**\n * Returns the built-in preview kind when FileView can render the file within\n * its bounded client-side limits. Custom renderers remain registry-driven.\n */\nexport const getFileViewPreviewKind = (file: FileViewFile): FileViewPreviewKind | null => {\n const kind = previewKindByType(file);\n if (!kind) return null;\n if (file.size !== undefined && (!Number.isFinite(file.size) || file.size < 0 || file.size > maxPreviewBytes[kind])) {\n return null;\n }\n return kind;\n};\n\n/** Use this to expose preview actions only for files FileView can render. */\nexport const canPreviewFile = (file: FileViewFile): boolean => getFileViewPreviewKind(file) !== null;\n\nexport type DelimitedTextPreview = {\n rows: string[][];\n truncated: boolean;\n totalRows: number;\n columnsTruncated: boolean;\n};\n\nexport const parseDelimitedText = (\n input: string,\n delimiter: string,\n limits: { rows?: number; columns?: number; offset?: number } = {},\n): DelimitedTextPreview => {\n const maxRows = Math.max(1, limits.rows ?? 201);\n const maxColumns = Math.max(1, limits.columns ?? 50);\n const rows: string[][] = [];\n let row: string[] = [];\n let field = \"\";\n let quoted = false;\n let truncated = false;\n let totalRows = 0;\n let columnsTruncated = false;\n\n const pushField = () => {\n if (row.length < maxColumns) row.push(field);\n else {\n truncated = true;\n columnsTruncated = true;\n }\n field = \"\";\n };\n const pushRow = () => {\n if (rows.length < maxRows && (totalRows === 0 || totalRows > (limits.offset ?? 0))) rows.push(row);\n else truncated = true;\n totalRows++;\n row = [];\n };\n\n for (let index = 0; index < input.length; index += 1) {\n const character = input[index]!;\n if (quoted) {\n if (character === '\"' && input[index + 1] === '\"') {\n field += '\"';\n index += 1;\n } else if (character === '\"') {\n quoted = false;\n } else {\n field += character;\n }\n continue;\n }\n\n if (character === '\"' && field.length === 0) quoted = true;\n else if (character === delimiter) pushField();\n else if (character === \"\\n\" || character === \"\\r\") {\n pushField();\n pushRow();\n if (character === \"\\r\" && input[index + 1] === \"\\n\") index += 1;\n } else {\n field += character;\n }\n }\n\n if (field.length > 0 || row.length > 0) {\n pushField();\n pushRow();\n }\n\n return { rows, truncated, totalRows, columnsTruncated };\n};\n"],"mappings":"AAQA,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI;AAE5B,MAAM,eAA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AAK,IAAI,CAAC,EAAE;IACpD,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAE;IAC/B,IAAI,MAAM,EAAE;MACV,IAAI,SAAS,KAAK,GAAG,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QACjD,KAAK,IAAI,GAAG;QACZ,KAAK,IAAI,CAAC;MACZ,CAAC,MAAM,IAAI,SAAS,KAAK,GAAG,EAAE;QAC5B,MAAM,GAAG,KAAK;MAChB,CAAC,MAAM;QACL,KAAK,IAAI,SAAS;MACpB;MACA;IACF;IAEA,IAAI,SAAS,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,KACtD,IAAI,SAAS,KAAK,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,KACzC,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,IAAI,EAAE;MACjD,SAAS,CAAC,CAAC;MACX,OAAO,CAAC,CAAC;MACT,IAAI,SAAS,KAAK,IAAI,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,KAAK,IAAI,CAAC;IACjE,CAAC,MAAM;MACL,KAAK,IAAI,SAAS;IACpB;EACF;EAEA,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;IACtC,SAAS,CAAC,CAAC;IACX,OAAO,CAAC,CAAC;EACX;EAEA,OAAO;IAAE,IAAI;IAAE,SAAS;IAAE,SAAS;IAAE;EAAiB,CAAC;AACzD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["content/file-view-preview.ts"],"sourcesContent":["export type FileViewFile = {\n path: string;\n mediaType?: string;\n size?: number;\n};\n\nexport type FileViewPreviewKind = \"markdown\" | \"image\" | \"pdf\" | \"json\" | \"delimited-text\" | \"audio\" | \"video\" | \"text\";\n\nconst MEBIBYTE = 1024 * 1024;\n\nconst maxPreviewBytes: Record<FileViewPreviewKind, number> = {\n markdown: 2 * MEBIBYTE,\n image: 25 * MEBIBYTE,\n pdf: 50 * MEBIBYTE,\n json: 2 * MEBIBYTE,\n \"delimited-text\": 2 * MEBIBYTE,\n audio: 50 * MEBIBYTE,\n video: 50 * MEBIBYTE,\n text: 2 * MEBIBYTE,\n};\n\n// SVG remains inert because FileView renders every image through <img>; never inject its markup into the DOM.\nconst imageMediaTypes = new Set([\n \"image/avif\",\n \"image/bmp\",\n \"image/gif\",\n \"image/jpeg\",\n \"image/png\",\n \"image/svg+xml\",\n \"image/webp\",\n \"image/x-icon\",\n]);\nconst audioMediaTypes = new Set([\n \"audio/aac\",\n \"audio/flac\",\n \"audio/mp4\",\n \"audio/mpeg\",\n \"audio/ogg\",\n \"audio/wav\",\n \"audio/webm\",\n \"audio/x-wav\",\n]);\nconst videoMediaTypes = new Set([\"video/mp4\", \"video/ogg\", \"video/quicktime\", \"video/webm\", \"video/x-m4v\"]);\n\nconst markdownExtensions = new Set([\"md\", \"markdown\"]);\nconst imageExtensions = new Set([\"avif\", \"bmp\", \"gif\", \"ico\", \"jpeg\", \"jpg\", \"png\", \"svg\", \"webp\"]);\nconst audioExtensions = new Set([\"aac\", \"flac\", \"m4a\", \"mp3\", \"oga\", \"ogg\", \"wav\", \"weba\"]);\nconst videoExtensions = new Set([\"m4v\", \"mov\", \"mp4\", \"ogv\", \"webm\"]);\nconst textExtensions = new Set([\n \"c\",\n \"conf\",\n \"cpp\",\n \"css\",\n \"env\",\n \"go\",\n \"h\",\n \"html\",\n \"ini\",\n \"java\",\n \"js\",\n \"jsx\",\n \"log\",\n \"mjs\",\n \"php\",\n \"py\",\n \"rb\",\n \"rs\",\n \"sh\",\n \"sql\",\n \"toml\",\n \"ts\",\n \"tsx\",\n \"txt\",\n \"xml\",\n \"yaml\",\n \"yml\",\n]);\n\nexport const fileViewExtension = (path: string): string => {\n const cleanPath = path.split(/[?#]/, 1)[0] ?? path;\n const name = cleanPath.slice(cleanPath.lastIndexOf(\"/\") + 1);\n const dot = name.lastIndexOf(\".\");\n return dot > 0 ? name.slice(dot + 1).toLowerCase() : \"\";\n};\n\nconst normalizedMediaType = (mediaType?: string): string => mediaType?.split(\";\", 1)[0]?.trim().toLowerCase() ?? \"\";\n\nconst previewKindByType = (file: FileViewFile): FileViewPreviewKind | null => {\n const extension = fileViewExtension(file.path);\n const mediaType = normalizedMediaType(file.mediaType);\n\n if (mediaType === \"text/markdown\" || markdownExtensions.has(extension)) return \"markdown\";\n if (mediaType === \"application/json\" || mediaType.endsWith(\"+json\") || extension === \"json\") return \"json\";\n if (mediaType === \"text/csv\" || mediaType === \"text/tab-separated-values\" || extension === \"csv\" || extension === \"tsv\") {\n return \"delimited-text\";\n }\n if (mediaType === \"application/pdf\" || extension === \"pdf\") return \"pdf\";\n if (imageMediaTypes.has(mediaType) || imageExtensions.has(extension)) return \"image\";\n if (audioMediaTypes.has(mediaType) || audioExtensions.has(extension)) return \"audio\";\n if (videoMediaTypes.has(mediaType) || videoExtensions.has(extension)) return \"video\";\n if (\n mediaType.startsWith(\"text/\") ||\n mediaType === \"application/javascript\" ||\n mediaType === \"application/sql\" ||\n mediaType === \"application/xml\" ||\n textExtensions.has(extension)\n ) {\n return \"text\";\n }\n return null;\n};\n\n/**\n * Returns the built-in preview kind when FileView can render the file within\n * its bounded client-side limits. Custom renderers remain registry-driven.\n */\nexport const getFileViewPreviewKind = (file: FileViewFile): FileViewPreviewKind | null => {\n const kind = previewKindByType(file);\n if (!kind) return null;\n if (file.size !== undefined && (!Number.isFinite(file.size) || file.size < 0 || file.size > maxPreviewBytes[kind])) {\n return null;\n }\n return kind;\n};\n\n/**\n * A file size such as \"4.2 MB\". With `locale`, the number follows that language (\"4,2 MB\") and drops a trailing\n * zero (\"64 KB\"); without it, the output stays as before.\n */\nexport const formatFileViewSize = (bytes: number, locale?: string): string => {\n const [value, unit] = bytes < 1024 ? [bytes, \"B\"] : bytes < 1024 * 1024 ? [bytes / 1024, \"KB\"] : [bytes / (1024 * 1024), \"MB\"];\n if (unit === \"B\") return `${bytes} B`;\n if (!locale) return `${value.toFixed(1)} ${unit}`;\n return `${new Intl.NumberFormat(locale, { maximumFractionDigits: 1 }).format(value)} ${unit}`;\n};\n\n/** Use this to expose preview actions only for files FileView can render. */\nexport const canPreviewFile = (file: FileViewFile): boolean => getFileViewPreviewKind(file) !== null;\n\nexport type DelimitedTextPreview = {\n rows: string[][];\n truncated: boolean;\n totalRows: number;\n columnsTruncated: boolean;\n};\n\nexport const parseDelimitedText = (\n input: string,\n delimiter: string,\n limits: { rows?: number; columns?: number; offset?: number } = {},\n): DelimitedTextPreview => {\n const maxRows = Math.max(1, limits.rows ?? 201);\n const maxColumns = Math.max(1, limits.columns ?? 50);\n const rows: string[][] = [];\n let row: string[] = [];\n let field = \"\";\n let quoted = false;\n let truncated = false;\n let totalRows = 0;\n let columnsTruncated = false;\n\n const pushField = () => {\n if (row.length < maxColumns) row.push(field);\n else {\n truncated = true;\n columnsTruncated = true;\n }\n field = \"\";\n };\n const pushRow = () => {\n if (rows.length < maxRows && (totalRows === 0 || totalRows > (limits.offset ?? 0))) rows.push(row);\n else truncated = true;\n totalRows++;\n row = [];\n };\n\n for (let index = 0; index < input.length; index += 1) {\n const character = input[index]!;\n if (quoted) {\n if (character === '\"' && input[index + 1] === '\"') {\n field += '\"';\n index += 1;\n } else if (character === '\"') {\n quoted = false;\n } else {\n field += character;\n }\n continue;\n }\n\n if (character === '\"' && field.length === 0) quoted = true;\n else if (character === delimiter) pushField();\n else if (character === \"\\n\" || character === \"\\r\") {\n pushField();\n pushRow();\n if (character === \"\\r\" && input[index + 1] === \"\\n\") index += 1;\n } else {\n field += character;\n }\n }\n\n if (field.length > 0 || row.length > 0) {\n pushField();\n pushRow();\n }\n\n return { rows, truncated, totalRows, columnsTruncated };\n};\n"],"mappings":"AAQA,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI;AAE5B,MAAM,eAAoD,GAAG;EAC3D,QAA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AAC;MACX,OAAO,CAAC,CAAC;MACT,IAAI,SAAS,KAAK,IAAI,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,KAAK,IAAI,CAAC;IACjE,CAAC,MAAM;MACL,KAAK,IAAI,SAAS;IACpB;EACF;EAEA,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;IACtC,SAAS,CAAC,CAAC;IACX,OAAO,CAAC,CAAC;EACX;EAEA,OAAO;IAAE,IAAI;IAAE,SAAS;IAAE,SAAS;IAAE;EAAiB,CAAC;AACzD,CAAC","ignoreList":[]}
@@ -20,11 +20,11 @@ export { FileBrowserPanel, openFileBrowser } from "./FileBrowser";
20
20
  export { FileGrid } from "./FileGrid";
21
21
  export { default as FileTree } from "./FileTree";
22
22
  export { FileTypeIcon, fileKindLabel, fileTypeOf } from "./FileTypeIcon";
23
- export { default as FileView, formatFileViewSize } from "./FileView";
23
+ export { default as FileView } from "./FileView";
24
24
  export { FlowAmount, flowDirection } from "./FlowAmount";
25
- // Choosing a renderer needs no renderer: these come from their own small module, so an app that only asks which kind
26
- // a file is never loads FileView and its PDF, video and code dependencies.
27
- export { canPreviewFile, getFileViewPreviewKind } from "./file-view-preview";
25
+ // Choosing a renderer or labelling a size needs no renderer: these come from their own small module, so an app that only
26
+ // asks which kind a file is, or how large, never loads FileView and its PDF, video and code dependencies.
27
+ export { canPreviewFile, formatFileViewSize, getFileViewPreviewKind } from "./file-view-preview";
28
28
  export { Kbd } from "./Kbd";
29
29
  export { LabelChip } from "./LabelChip";
30
30
  export { default as Lightbox } from "./Lightbox";
@@ -51,6 +51,7 @@ export { ProgressPath } from "./ProgressPath";
51
51
  export { default as RangePicker } from "./RangePicker";
52
52
  export { ReactionBar } from "./ReactionBar";
53
53
  export { REFERENCE_CHIP_MAX_CHARACTERS, ReferenceChip, truncateMiddle } from "./ReferenceChip";
54
+ export { RunLog } from "./RunLog";
54
55
  export { Steps } from "./Steps";
55
56
  export { default as StructuredDataPreview, isStructuredDataValue } from "./StructuredDataPreview";
56
57
  export { ThumbnailStrip } from "./ThumbnailStrip";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["content/index.ts"],"sourcesContent":["export type { ChartDateFormat, ChartDatum, ChartDatumRole, ChartFormat, ChartNumberFormat } from \"../charts/core\";\nexport {\n type ActivityAction,\n ActivityCard,\n type ActivityCardProps,\n type ActivityDensity,\n type ActivityDialogInput,\n type ActivityEntry,\n type ActivityKind,\n ActivityList,\n type ActivityListProps,\n type ActivityTone,\n openActivityDialog,\n} from \"./ActivityList\";\nexport { BalanceSummary, type BalanceSummaryProps } from \"./BalanceSummary\";\nexport type {\n CalendarAttendee,\n CalendarCommand,\n CalendarController,\n CalendarCustomView,\n CalendarDayBadge,\n CalendarEvent,\n CalendarEventColor,\n CalendarEventLink,\n CalendarEventRenderContext,\n CalendarEventTimeChange,\n CalendarExternalDrag,\n CalendarLabels,\n CalendarProps,\n CalendarQuickCreateControls,\n CalendarRange,\n CalendarRecurrence,\n CalendarResource,\n CalendarSelectionControls,\n CalendarView,\n} from \"./Calendar\";\nexport { default as Calendar } from \"./Calendar\";\n\nexport type { ChartKind, ChartKindProps, ChartLabels, ChartProps, ChartRenderOptions } from \"./Chart\";\nexport { default as Chart } from \"./Chart\";\nexport type { ChartExplorerColumn, ChartExplorerProps, ChartFrameRequest, ChartLegendEntry } from \"./ChartExplorer\";\nexport { ChartExplorer } from \"./ChartExplorer\";\nexport type { ChartExplorerControlsProps } from \"./ChartExplorerControls\";\nexport { ChartExplorerControls } from \"./ChartExplorerControls\";\nexport { ChartFilterControls, type ChartFilterControlsProps } from \"./ChartFilterControls\";\nexport { ChartSnapshotView } from \"./ChartSnapshotView\";\nexport type { CodeDisplayLanguage, CodeDisplayProps } from \"./CodeDisplay\";\nexport { default as CodeDisplay } from \"./CodeDisplay\";\nexport { type ChartCursor, createChartCursor } from \"./chart-cursor\";\nexport type {\n ChartExplorerCharts,\n ChartExplorerController,\n ChartExplorerData,\n ChartExplorerOptions,\n ChartExplorerRequest,\n ChartExplorerRow,\n ChartExplorerSnapshot,\n} from \"./chart-explorer\";\nexport { createChartExplorer } from \"./chart-explorer\";\nexport type { ChartDatumRef, ChartSelection, ChartTooltip, ChartTooltipFormatter } from \"./chart-inspection-core\";\nexport type { ChartSnapshot } from \"./chart-snapshot\";\nexport { prepareChartSnapshot } from \"./chart-snapshot\";\nexport type {\n StateTimelineChartOptions,\n StateTimelineDomain,\n StateTimelineInterval,\n StateTimelineRow,\n StateTimelineState,\n} from \"./chart-state-timeline\";\nexport type { ChartTimeAxis } from \"./chart-time-axis\";\nexport { highlightSql } from \"./code-highlight\";\nexport { type CollectionSelection, createCollectionSelection, type SelectionModifiers } from \"./collection-selection\";\nexport type {\n DataTableColumn,\n DataTableControlsProps,\n DataTableFooter,\n DataTableHeaderProps,\n DataTablePanelFooterProps,\n DataTablePanelProps,\n DataTableProps,\n DataTableRenderCell,\n DataTableRenderHeader,\n DataTableSort,\n} from \"./DataTable\";\nexport { default as DataTable } from \"./DataTable\";\nexport type { DataTableToolsProps, DataTableView, DataTableViewOptions } from \"./DataTableTools\";\nexport { createDataTableView, DataTableTools } from \"./DataTableTools\";\nexport type { DocCodeHighlighter, DocCodeProps, DocConcept, DocNoteVariant, DocRow } from \"./Docs\";\nexport { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocRows, DocSection } from \"./Docs\";\nexport type {\n DataTableColumnType,\n DataTableNumberFormat,\n DataTableStatusState,\n DataTableTypedColumn,\n} from \"./data-table-columns\";\nexport { filterRows, sortRows } from \"./data-table-columns\";\nexport { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from \"./FileBrowser\";\nexport { FileGrid, type FileGridGroup, type FileGridOpenProps, type FileGridProps, type FileGridSelectableProps } from \"./FileGrid\";\nexport { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from \"./FileTree\";\nexport { type FileType, FileTypeIcon, type FileTypeIconProps, fileKindLabel, fileTypeOf } from \"./FileTypeIcon\";\nexport {\n default as FileView,\n type FileViewContent,\n type FileViewProps,\n type FileViewRenderer,\n type FileViewRendererProps,\n formatFileViewSize,\n} from \"./FileView\";\nexport { FlowAmount, type FlowAmountDirection, type FlowAmountProps, flowDirection } from \"./FlowAmount\";\n// Choosing a renderer needs no renderer: these come from their own small module, so an app that only asks which kind\n// a file is never loads FileView and its PDF, video and code dependencies.\nexport { canPreviewFile, type FileViewFile, type FileViewPreviewKind, getFileViewPreviewKind } from \"./file-view-preview\";\nexport type { KbdProps } from \"./Kbd\";\nexport { Kbd } from \"./Kbd\";\nexport type { LabelChipProps } from \"./LabelChip\";\nexport { LabelChip } from \"./LabelChip\";\nexport type { LightboxAction, LightboxItem, LightboxProps } from \"./Lightbox\";\nexport { default as Lightbox } from \"./Lightbox\";\nexport type { LoadMoreProps } from \"./LoadMore\";\nexport { LoadMore } from \"./LoadMore\";\nexport type { LogTableEntry } from \"./LogEntriesTable\";\nexport { default as LogEntriesTable } from \"./LogEntriesTable\";\nexport { MapAttribution } from \"./MapAttribution\";\nexport {\n MapDialog,\n type MapDialogFact,\n type MapDialogMapView,\n type MapDialogMenuItem,\n type MapDialogProps,\n type MapPlace,\n type MapPlaceLink,\n type MapPlaceSource,\n} from \"./MapDialog\";\nexport { MAP_DIALOG_PARAM, MapTile, type MapTileProps, mapDialogOptions } from \"./MapTile\";\nexport { MapView } from \"./MapView\";\nexport { MapViewFrame } from \"./MapViewFrame\";\nexport { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from \"./MarkdownView\";\nexport { type MatchRange, MatchText, type MatchTextProps, matchParts } from \"./MatchText\";\nexport type {\n MessageEventGroupProps,\n MessageEventRowProps,\n MessageGroupEntry,\n MessageRowAction,\n MessageRowAttachment,\n MessageRowAuthor,\n MessageRowFile,\n MessageRowMedia,\n MessageRowOrigin,\n MessageRowProgress,\n MessageRowProps,\n MessageRowQuote,\n MessageRowReaction,\n MessageRowStatus,\n MessageRowThread,\n MessageSystemRowProps,\n} from \"./MessageRow\";\nexport { MessageEventGroup, MessageEventRow, MessageRow, MessageSystemRow, startsMessageGroup } from \"./MessageRow\";\nexport { type GeoNavigationPlatform, geoNavigationHref, geoNavigationPlatform } from \"./map-navigation\";\nexport { type MapPaletteColors, type MapTheme, mapPalette } from \"./map-palette\";\nexport { type MapStyleOptions, mapAttribution, mapStyle } from \"./map-style\";\nexport { MAP_SNAPSHOT_MAX_PIXELS, MapSnapshotError, type MapSnapshotErrorCode } from \"./map-view-snapshot\";\nexport type {\n MapViewArea,\n MapViewFit,\n MapViewFrameProps,\n MapViewHandle,\n MapViewLine,\n MapViewLineTone,\n MapViewMarker,\n MapViewOwnLocation,\n MapViewPoint,\n MapViewProps,\n MapViewSnapshot,\n MapViewSnapshotOptions,\n MapViewStyle,\n MapViewStyleSource,\n MapViewTone,\n} from \"./map-view-types\";\nexport {\n MARKDOWN_CALLOUT_CLASSES,\n MARKDOWN_CALLOUT_ICON_ATTRIBUTES,\n type MarkdownInfoBlock,\n type MarkdownInfoBlockRenderInput,\n type MarkdownInfoBlockType,\n markdownInfoBlocks,\n renderMarkdownInfoBlock,\n scanMarkdownInfoBlock,\n} from \"./markdown-info-blocks\";\nexport {\n type MarkdownLinkInput,\n type MarkdownReference,\n type MarkdownReferenceKind,\n type MarkdownReferenceType,\n markdownLinkReference,\n markdownReferenceIcon,\n markdownReferenceType,\n markdownReferenceTypeLabel,\n markStandaloneLinks,\n renderMarkdownLink,\n} from \"./markdown-links\";\nexport { Pagination, type PaginationProps } from \"./Pagination\";\nexport { PdfThumbnails, type PdfThumbnailsProps } from \"./PdfThumbnails\";\nexport type { PdfViewerProps, PdfViewerRequest } from \"./PdfViewer\";\nexport { default as PdfViewer } from \"./PdfViewer\";\nexport { ProgressPath, type ProgressPathProps, type ProgressPathStep } from \"./ProgressPath\";\nexport type { RangeOption, RangePickerProps } from \"./RangePicker\";\nexport { default as RangePicker } from \"./RangePicker\";\nexport { ReactionBar, type ReactionBarItem, type ReactionBarProps } from \"./ReactionBar\";\nexport type {\n ReferenceChipObjectProps,\n ReferenceChipPersonProps,\n ReferenceChipProps,\n ReferenceChipTimeProps,\n} from \"./ReferenceChip\";\nexport { REFERENCE_CHIP_MAX_CHARACTERS, ReferenceChip, truncateMiddle } from \"./ReferenceChip\";\nexport type { StepsProps } from \"./Steps\";\nexport { Steps } from \"./Steps\";\nexport type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from \"./StructuredDataPreview\";\nexport { default as StructuredDataPreview, isStructuredDataValue } from \"./StructuredDataPreview\";\nexport { ThumbnailStrip, type ThumbnailStripItem, type ThumbnailStripProps } from \"./ThumbnailStrip\";\nexport type { TimelineColor, TimelineController, TimelineItem, TimelineProps } from \"./Timeline\";\nexport { default as Timeline } from \"./Timeline\";\nexport { VideoPlayer, type VideoPlayerProps } from \"./VideoPlayer\";\nexport type { VirtualFeedController, VirtualFeedProps, VirtualFeedScrollOptions } from \"./VirtualFeed\";\nexport { VirtualFeed } from \"./VirtualFeed\";\nexport type { ZoomPanAction, ZoomPanFullscreen, ZoomPanViewportProps } from \"./ZoomPanViewport\";\nexport { ZoomPanViewport } from \"./ZoomPanViewport\";\n"],"mappings":"AACA,SAEE,YAAY,EAMZ,YAAY,EAGZ,kBAAkB,QACb,gBAAgB;AACvB,SAAS,cAAc,QAAkC,kBAAkB;AAsB3E,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAGhD,SAAS,OAAO,IAAI,KAAK,QAAQ,SAAS;AAE1C,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,qBAAqB,QAAQ,yBAAyB;AAC/D,SAAS,mBAAmB,QAAuC,uBAAuB;AAC1F,SAAS,iBAAiB,QAAQ,qBAAqB;AAEvD,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAA2B,iBAAiB,QAAQ,gBAAgB;AAUpE,SAA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;AAmBzF,SAAS,iBAAiB,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,QAAQ,cAAc;AACnH,SAAqC,iBAAiB,EAAE,qBAAqB,QAAQ,kBAAkB;AACvG,SAA+C,UAAU,QAAQ,eAAe;AAChF,SAA+B,cAAc,EAAE,QAAQ,QAAQ,aAAa;AAC5E,SAAS,uBAAuB,EAAE,gBAAgB,QAAmC,qBAAqB;AAkB1G,SACE,wBAAwB,EACxB,gCAAgC,EAIhC,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,QAChB,wBAAwB;AAC/B,SAKE,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,QACb,kBAAkB;AACzB,SAAS,UAAU,QAA8B,cAAc;AAC/D,SAAS,aAAa,QAAiC,iBAAiB;AAExE,SAAS,OAAO,IAAI,SAAS,QAAQ,aAAa;AAClD,SAAS,YAAY,QAAuD,gBAAgB;AAE5F,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAAS,WAAW,QAAqD,eAAe;AAOxF,SAAS,6BAA6B,EAAE,aAAa,EAAE,cAAc,QAAQ,iBAAiB;AAE9F,SAAS,KAAK,QAAQ,SAAS;AAE/B,SAAS,OAAO,IAAI,qBAAqB,EAAE,qBAAqB,QAAQ,yBAAyB;AACjG,SAAS,cAAc,QAA2D,kBAAkB;AAEpG,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAChD,SAAS,WAAW,QAA+B,eAAe;AAElE,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,eAAe,QAAQ,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["content/index.ts"],"sourcesContent":["export type { ChartDateFormat, ChartDatum, ChartDatumRole, ChartFormat, ChartNumberFormat } from \"../charts/core\";\nexport {\n type ActivityAction,\n type ActivityAvatar,\n ActivityCard,\n type ActivityCardProps,\n type ActivityDensity,\n type ActivityDialogInput,\n type ActivityEntry,\n type ActivityKind,\n ActivityList,\n type ActivityListProps,\n type ActivityRowProps,\n type ActivityTone,\n openActivityDialog,\n} from \"./ActivityList\";\nexport { BalanceSummary, type BalanceSummaryProps } from \"./BalanceSummary\";\nexport type {\n CalendarAttendee,\n CalendarCommand,\n CalendarController,\n CalendarCustomView,\n CalendarDayBadge,\n CalendarEvent,\n CalendarEventColor,\n CalendarEventLink,\n CalendarEventRenderContext,\n CalendarEventTimeChange,\n CalendarExternalDrag,\n CalendarLabels,\n CalendarProps,\n CalendarQuickCreateControls,\n CalendarRange,\n CalendarRecurrence,\n CalendarResource,\n CalendarSelectionControls,\n CalendarView,\n} from \"./Calendar\";\nexport { default as Calendar } from \"./Calendar\";\n\nexport type { ChartKind, ChartKindProps, ChartLabels, ChartProps, ChartRenderOptions } from \"./Chart\";\nexport { default as Chart } from \"./Chart\";\nexport type { ChartExplorerColumn, ChartExplorerProps, ChartFrameRequest, ChartLegendEntry } from \"./ChartExplorer\";\nexport { ChartExplorer } from \"./ChartExplorer\";\nexport type { ChartExplorerControlsProps } from \"./ChartExplorerControls\";\nexport { ChartExplorerControls } from \"./ChartExplorerControls\";\nexport { ChartFilterControls, type ChartFilterControlsProps } from \"./ChartFilterControls\";\nexport { ChartSnapshotView } from \"./ChartSnapshotView\";\nexport type { CodeDisplayLanguage, CodeDisplayProps } from \"./CodeDisplay\";\nexport { default as CodeDisplay } from \"./CodeDisplay\";\nexport { type ChartCursor, createChartCursor } from \"./chart-cursor\";\nexport type {\n ChartExplorerCharts,\n ChartExplorerController,\n ChartExplorerData,\n ChartExplorerOptions,\n ChartExplorerRequest,\n ChartExplorerRow,\n ChartExplorerSnapshot,\n} from \"./chart-explorer\";\nexport { createChartExplorer } from \"./chart-explorer\";\nexport type { ChartDatumRef, ChartSelection, ChartTooltip, ChartTooltipFormatter } from \"./chart-inspection-core\";\nexport type { ChartSnapshot } from \"./chart-snapshot\";\nexport { prepareChartSnapshot } from \"./chart-snapshot\";\nexport type {\n StateTimelineChartOptions,\n StateTimelineDomain,\n StateTimelineInterval,\n StateTimelineRow,\n StateTimelineState,\n} from \"./chart-state-timeline\";\nexport type { ChartTimeAxis } from \"./chart-time-axis\";\nexport { highlightSql } from \"./code-highlight\";\nexport { type CollectionSelection, createCollectionSelection, type SelectionModifiers } from \"./collection-selection\";\nexport type {\n DataTableColumn,\n DataTableControlsProps,\n DataTableFooter,\n DataTableHeaderProps,\n DataTablePanelFooterProps,\n DataTablePanelProps,\n DataTableProps,\n DataTableRenderCell,\n DataTableRenderHeader,\n DataTableSort,\n} from \"./DataTable\";\nexport { default as DataTable } from \"./DataTable\";\nexport type { DataTableToolsProps, DataTableView, DataTableViewOptions } from \"./DataTableTools\";\nexport { createDataTableView, DataTableTools } from \"./DataTableTools\";\nexport type { DocCodeHighlighter, DocCodeProps, DocConcept, DocNoteVariant, DocRow } from \"./Docs\";\nexport { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocRows, DocSection } from \"./Docs\";\nexport type {\n DataTableColumnType,\n DataTableNumberFormat,\n DataTableStatusState,\n DataTableTypedColumn,\n} from \"./data-table-columns\";\nexport { filterRows, sortRows } from \"./data-table-columns\";\nexport { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from \"./FileBrowser\";\nexport { FileGrid, type FileGridGroup, type FileGridOpenProps, type FileGridProps, type FileGridSelectableProps } from \"./FileGrid\";\nexport { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from \"./FileTree\";\nexport { type FileType, FileTypeIcon, type FileTypeIconProps, fileKindLabel, fileTypeOf } from \"./FileTypeIcon\";\nexport {\n default as FileView,\n type FileViewContent,\n type FileViewProps,\n type FileViewRenderer,\n type FileViewRendererProps,\n} from \"./FileView\";\nexport { FlowAmount, type FlowAmountDirection, type FlowAmountProps, flowDirection } from \"./FlowAmount\";\n// Choosing a renderer or labelling a size needs no renderer: these come from their own small module, so an app that only\n// asks which kind a file is, or how large, never loads FileView and its PDF, video and code dependencies.\nexport {\n canPreviewFile,\n type FileViewFile,\n type FileViewPreviewKind,\n formatFileViewSize,\n getFileViewPreviewKind,\n} from \"./file-view-preview\";\nexport type { KbdProps } from \"./Kbd\";\nexport { Kbd } from \"./Kbd\";\nexport type { LabelChipProps } from \"./LabelChip\";\nexport { LabelChip } from \"./LabelChip\";\nexport type { LightboxAction, LightboxItem, LightboxProps } from \"./Lightbox\";\nexport { default as Lightbox } from \"./Lightbox\";\nexport type { LoadMoreProps } from \"./LoadMore\";\nexport { LoadMore } from \"./LoadMore\";\nexport type { LogTableEntry } from \"./LogEntriesTable\";\nexport { default as LogEntriesTable } from \"./LogEntriesTable\";\nexport { MapAttribution } from \"./MapAttribution\";\nexport {\n MapDialog,\n type MapDialogFact,\n type MapDialogMapView,\n type MapDialogMenuItem,\n type MapDialogProps,\n type MapPlace,\n type MapPlaceLink,\n type MapPlaceSource,\n} from \"./MapDialog\";\nexport { MAP_DIALOG_PARAM, MapTile, type MapTileProps, mapDialogOptions } from \"./MapTile\";\nexport { MapView } from \"./MapView\";\nexport { MapViewFrame } from \"./MapViewFrame\";\nexport { default as MarkdownView, type MarkdownRenderOptions, type MarkdownViewProps, renderSafeMarkdown } from \"./MarkdownView\";\nexport { type MatchRange, MatchText, type MatchTextProps, matchParts } from \"./MatchText\";\nexport type {\n MessageEventGroupProps,\n MessageEventRowProps,\n MessageGroupEntry,\n MessageRowAction,\n MessageRowAttachment,\n MessageRowAuthor,\n MessageRowFile,\n MessageRowMedia,\n MessageRowOrigin,\n MessageRowProgress,\n MessageRowProps,\n MessageRowQuote,\n MessageRowReaction,\n MessageRowStatus,\n MessageRowThread,\n MessageSystemRowProps,\n} from \"./MessageRow\";\nexport { MessageEventGroup, MessageEventRow, MessageRow, MessageSystemRow, startsMessageGroup } from \"./MessageRow\";\nexport { type GeoNavigationPlatform, geoNavigationHref, geoNavigationPlatform } from \"./map-navigation\";\nexport { type MapPaletteColors, type MapTheme, mapPalette } from \"./map-palette\";\nexport { type MapStyleOptions, mapAttribution, mapStyle } from \"./map-style\";\nexport { MAP_SNAPSHOT_MAX_PIXELS, MapSnapshotError, type MapSnapshotErrorCode } from \"./map-view-snapshot\";\nexport type {\n MapViewArea,\n MapViewFit,\n MapViewFrameProps,\n MapViewHandle,\n MapViewLine,\n MapViewLineTone,\n MapViewMarker,\n MapViewOwnLocation,\n MapViewPoint,\n MapViewProps,\n MapViewSnapshot,\n MapViewSnapshotOptions,\n MapViewStyle,\n MapViewStyleSource,\n MapViewTone,\n} from \"./map-view-types\";\nexport {\n MARKDOWN_CALLOUT_CLASSES,\n MARKDOWN_CALLOUT_ICON_ATTRIBUTES,\n type MarkdownInfoBlock,\n type MarkdownInfoBlockRenderInput,\n type MarkdownInfoBlockType,\n markdownInfoBlocks,\n renderMarkdownInfoBlock,\n scanMarkdownInfoBlock,\n} from \"./markdown-info-blocks\";\nexport {\n type MarkdownLinkInput,\n type MarkdownReference,\n type MarkdownReferenceKind,\n type MarkdownReferenceType,\n markdownLinkReference,\n markdownReferenceIcon,\n markdownReferenceType,\n markdownReferenceTypeLabel,\n markStandaloneLinks,\n renderMarkdownLink,\n} from \"./markdown-links\";\nexport { Pagination, type PaginationProps } from \"./Pagination\";\nexport { PdfThumbnails, type PdfThumbnailsProps } from \"./PdfThumbnails\";\nexport type { PdfViewerProps, PdfViewerRequest } from \"./PdfViewer\";\nexport { default as PdfViewer } from \"./PdfViewer\";\nexport { ProgressPath, type ProgressPathProps, type ProgressPathStep } from \"./ProgressPath\";\nexport type { RangeOption, RangePickerProps } from \"./RangePicker\";\nexport { default as RangePicker } from \"./RangePicker\";\nexport { ReactionBar, type ReactionBarItem, type ReactionBarProps } from \"./ReactionBar\";\nexport type {\n ReferenceChipObjectProps,\n ReferenceChipPersonProps,\n ReferenceChipProps,\n ReferenceChipTimeProps,\n} from \"./ReferenceChip\";\nexport { REFERENCE_CHIP_MAX_CHARACTERS, ReferenceChip, truncateMiddle } from \"./ReferenceChip\";\nexport {\n type RunEntry,\n type RunLevel,\n RunLog,\n type RunLogAction,\n type RunLogEntry,\n type RunLogProps,\n type RunLogState,\n type RunStepEntry,\n} from \"./RunLog\";\nexport type { StepsProps } from \"./Steps\";\nexport { Steps } from \"./Steps\";\nexport type { StructuredDataPreviewMode, StructuredDataPreviewProps, StructuredDataValue } from \"./StructuredDataPreview\";\nexport { default as StructuredDataPreview, isStructuredDataValue } from \"./StructuredDataPreview\";\nexport { ThumbnailStrip, type ThumbnailStripItem, type ThumbnailStripProps } from \"./ThumbnailStrip\";\nexport type { TimelineColor, TimelineController, TimelineItem, TimelineProps } from \"./Timeline\";\nexport { default as Timeline } from \"./Timeline\";\nexport { VideoPlayer, type VideoPlayerProps } from \"./VideoPlayer\";\nexport type { VirtualFeedController, VirtualFeedProps, VirtualFeedScrollOptions } from \"./VirtualFeed\";\nexport { VirtualFeed } from \"./VirtualFeed\";\nexport type { ZoomPanAction, ZoomPanFullscreen, ZoomPanViewportProps } from \"./ZoomPanViewport\";\nexport { ZoomPanViewport } from \"./ZoomPanViewport\";\n"],"mappings":"AACA,SAGE,YAAY,EAMZ,YAAY,EAIZ,kBAAkB,QACb,gBAAgB;AACvB,SAAS,cAAc,QAAkC,kBAAkB;AAsB3E,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAGhD,SAAS,OAAO,IAAI,KAAK,QAAQ,SAAS;AAE1C,SAAS,aAAa,QAAQ,iBAAiB;AAE/C,SAAS,qBAAqB,QAAQ,yBAAyB;AAC/D,SAAS,mBAAmB,QAAuC,uBAAuB;AAC1F,SAAS,iBAAiB,QAAQ,qBAAqB;AAEvD,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAA2B,iBAAiB,QAAQ,gBAAgB;AAUpE,SAAS,mBAAmB,QAAQ,kBAAkB;AAGtD,SAAS,oBAAoB,QAAQ,kBAAkB;AASvD,SAAS,YAAY,QAAQ,kBAAkB;AAC/C,SAAmC,yBAAyB,QAAiC,wBAAwB;AAarH,SAA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AA+C,UAAU,QAAQ,eAAe;AAChF,SAA+B,cAAc,EAAE,QAAQ,QAAQ,aAAa;AAC5E,SAAS,uBAAuB,EAAE,gBAAgB,QAAmC,qBAAqB;AAkB1G,SACE,wBAAwB,EACxB,gCAAgC,EAIhC,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,QAChB,wBAAwB;AAC/B,SAKE,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,QACb,kBAAkB;AACzB,SAAS,UAAU,QAA8B,cAAc;AAC/D,SAAS,aAAa,QAAiC,iBAAiB;AAExE,SAAS,OAAO,IAAI,SAAS,QAAQ,aAAa;AAClD,SAAS,YAAY,QAAuD,gBAAgB;AAE5F,SAAS,OAAO,IAAI,WAAW,QAAQ,eAAe;AACtD,SAAS,WAAW,QAAqD,eAAe;AAOxF,SAAS,6BAA6B,EAAE,aAAa,EAAE,cAAc,QAAQ,iBAAiB;AAC9F,SAGE,MAAM,QAMD,UAAU;AAEjB,SAAS,KAAK,QAAQ,SAAS;AAE/B,SAAS,OAAO,IAAI,qBAAqB,EAAE,qBAAqB,QAAQ,yBAAyB;AACjG,SAAS,cAAc,QAA2D,kBAAkB;AAEpG,SAAS,OAAO,IAAI,QAAQ,QAAQ,YAAY;AAChD,SAAS,WAAW,QAA+B,eAAe;AAElE,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,eAAe,QAAQ,mBAAmB","ignoreList":[]}
@@ -0,0 +1,134 @@
1
+ import { i18n } from "@k2b/stdlib";
2
+ import { useLocale } from "../intl/locale";
3
+ const messages = i18n.define({
4
+ baseLocale: "en",
5
+ messages: {
6
+ en: {
7
+ run: "Run",
8
+ idle: "Not run yet",
9
+ starting: "Starting …",
10
+ running: "Running",
11
+ since: ({
12
+ duration
13
+ }) => `Running for ${duration}`,
14
+ succeeded: "Done",
15
+ doneAfter: ({
16
+ duration
17
+ }) => `Done in ${duration}`,
18
+ failed: "Failed",
19
+ failedAfter: ({
20
+ duration
21
+ }) => `Failed after ${duration}`,
22
+ pending: "pending",
23
+ active: "running",
24
+ completed: "succeeded",
25
+ skipped: "skipped",
26
+ stepFailed: "failed",
27
+ output: "Output",
28
+ noLines: "no lines yet",
29
+ lines: ({
30
+ count
31
+ }) => `${count} lines`,
32
+ line: "1 line",
33
+ warnings: ({
34
+ count
35
+ }) => `${count} warnings`,
36
+ warning: "1 warning",
37
+ warningLevel: "Warning",
38
+ errors: ({
39
+ count
40
+ }) => `${count} errors`,
41
+ error: "1 error",
42
+ errorLevel: "Error",
43
+ older: ({
44
+ count
45
+ }) => `Show ${count} older lines`,
46
+ earlier: ({
47
+ count
48
+ }) => `Show ${count} earlier steps`,
49
+ later: ({
50
+ count
51
+ }) => `Show ${count} more steps`,
52
+ current: "Show current steps",
53
+ details: ({
54
+ label
55
+ }) => `Details for ${label}`,
56
+ toggle: "Expand or collapse run",
57
+ actions: "Actions",
58
+ progress: ({
59
+ current,
60
+ count
61
+ }) => `Step ${current} of ${count}`,
62
+ steps: ({
63
+ count
64
+ }) => `${count} steps`,
65
+ step: "1 step"
66
+ },
67
+ de: {
68
+ run: "Lauf",
69
+ idle: "Noch nicht ausgeführt",
70
+ starting: "Startet …",
71
+ running: "Läuft",
72
+ since: ({
73
+ duration
74
+ }) => `Läuft seit ${duration}`,
75
+ succeeded: "Fertig",
76
+ doneAfter: ({
77
+ duration
78
+ }) => `Fertig nach ${duration}`,
79
+ failed: "Gescheitert",
80
+ failedAfter: ({
81
+ duration
82
+ }) => `Gescheitert nach ${duration}`,
83
+ pending: "ausstehend",
84
+ active: "läuft",
85
+ completed: "erledigt",
86
+ skipped: "übersprungen",
87
+ stepFailed: "fehlgeschlagen",
88
+ output: "Ausgabe",
89
+ noLines: "noch keine Zeilen",
90
+ lines: ({
91
+ count
92
+ }) => `${count} Zeilen`,
93
+ line: "1 Zeile",
94
+ warnings: ({
95
+ count
96
+ }) => `${count} Warnungen`,
97
+ warning: "1 Warnung",
98
+ warningLevel: "Warnung",
99
+ errors: ({
100
+ count
101
+ }) => `${count} Fehler`,
102
+ error: "1 Fehler",
103
+ errorLevel: "Fehler",
104
+ older: ({
105
+ count
106
+ }) => `${count} ältere Zeilen anzeigen`,
107
+ earlier: ({
108
+ count
109
+ }) => `${count} frühere Schritte anzeigen`,
110
+ later: ({
111
+ count
112
+ }) => `${count} weitere Schritte anzeigen`,
113
+ current: "Aktuelle Schritte anzeigen",
114
+ details: ({
115
+ label
116
+ }) => `Details zu ${label}`,
117
+ toggle: "Lauf auf- oder zuklappen",
118
+ actions: "Aktionen",
119
+ progress: ({
120
+ current,
121
+ count
122
+ }) => `Schritt ${current} von ${count}`,
123
+ steps: ({
124
+ count
125
+ }) => `${count} Schritte`,
126
+ step: "1 Schritt"
127
+ }
128
+ }
129
+ });
130
+ export function useRunLogMessages() {
131
+ const locale = useLocale();
132
+ return () => messages.resolve([locale()]).t;
133
+ }
134
+ //# sourceMappingURL=run-log-messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["content/run-log-messages.ts"],"sourcesContent":["import { i18n } from \"@k2b/stdlib\";\nimport { useLocale } from \"../intl/locale\";\n\nconst messages = i18n.define({\n baseLocale: \"en\",\n messages: {\n en: {\n run: \"Run\",\n idle: \"Not run yet\",\n starting: \"Starting …\",\n running: \"Running\",\n since: ({ duration }: { duration: string }) => `Running for ${duration}`,\n succeeded: \"Done\",\n doneAfter: ({ duration }: { duration: string }) => `Done in ${duration}`,\n failed: \"Failed\",\n failedAfter: ({ duration }: { duration: string }) => `Failed after ${duration}`,\n pending: \"pending\",\n active: \"running\",\n completed: \"succeeded\",\n skipped: \"skipped\",\n stepFailed: \"failed\",\n output: \"Output\",\n noLines: \"no lines yet\",\n lines: ({ count }: { count: number }) => `${count} lines`,\n line: \"1 line\",\n warnings: ({ count }: { count: number }) => `${count} warnings`,\n warning: \"1 warning\",\n warningLevel: \"Warning\",\n errors: ({ count }: { count: number }) => `${count} errors`,\n error: \"1 error\",\n errorLevel: \"Error\",\n older: ({ count }: { count: number }) => `Show ${count} older lines`,\n earlier: ({ count }: { count: number }) => `Show ${count} earlier steps`,\n later: ({ count }: { count: number }) => `Show ${count} more steps`,\n current: \"Show current steps\",\n details: ({ label }: { label: string }) => `Details for ${label}`,\n toggle: \"Expand or collapse run\",\n actions: \"Actions\",\n progress: ({ current, count }: { current: number; count: number }) => `Step ${current} of ${count}`,\n steps: ({ count }: { count: number }) => `${count} steps`,\n step: \"1 step\",\n },\n de: {\n run: \"Lauf\",\n idle: \"Noch nicht ausgeführt\",\n starting: \"Startet …\",\n running: \"Läuft\",\n since: ({ duration }) => `Läuft seit ${duration}`,\n succeeded: \"Fertig\",\n doneAfter: ({ duration }) => `Fertig nach ${duration}`,\n failed: \"Gescheitert\",\n failedAfter: ({ duration }) => `Gescheitert nach ${duration}`,\n pending: \"ausstehend\",\n active: \"läuft\",\n completed: \"erledigt\",\n skipped: \"übersprungen\",\n stepFailed: \"fehlgeschlagen\",\n output: \"Ausgabe\",\n noLines: \"noch keine Zeilen\",\n lines: ({ count }) => `${count} Zeilen`,\n line: \"1 Zeile\",\n warnings: ({ count }) => `${count} Warnungen`,\n warning: \"1 Warnung\",\n warningLevel: \"Warnung\",\n errors: ({ count }) => `${count} Fehler`,\n error: \"1 Fehler\",\n errorLevel: \"Fehler\",\n older: ({ count }) => `${count} ältere Zeilen anzeigen`,\n earlier: ({ count }) => `${count} frühere Schritte anzeigen`,\n later: ({ count }) => `${count} weitere Schritte anzeigen`,\n current: \"Aktuelle Schritte anzeigen\",\n details: ({ label }) => `Details zu ${label}`,\n toggle: \"Lauf auf- oder zuklappen\",\n actions: \"Aktionen\",\n progress: ({ current, count }) => `Schritt ${current} von ${count}`,\n steps: ({ count }) => `${count} Schritte`,\n step: \"1 Schritt\",\n },\n },\n});\n\nexport function useRunLogMessages() {\n const locale = useLocale();\n return () => messages.resolve([locale()]).t;\n}\n"],"mappings":"AAAA,SAAS,IAAI,QAAQ,aAAa;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AAK,yBAAyB;MACvD,OAAO,EAAE,CAAC;QAAE;MAAM,CAAC,KAAK,GAAG,KAAK,4BAA4B;MAC5D,KAAK,EAAE,CAAC;QAAE;MAAM,CAAC,KAAK,GAAG,KAAK,4BAA4B;MAC1D,OAAO,EAAE,4BAA4B;MACrC,OAAO,EAAE,CAAC;QAAE;MAAM,CAAC,KAAK,cAAc,KAAK,EAAE;MAC7C,MAAM,EAAE,0BAA0B;MAClC,OAAO,EAAE,UAAU;MACnB,QAAQ,EAAE,CAAC;QAAE,OAAO;QAAE;MAAM,CAAC,KAAK,WAAW,OAAO,QAAQ,KAAK,EAAE;MACnE,KAAK,EAAE,CAAC;QAAE;MAAM,CAAC,KAAK,GAAG,KAAK,WAAW;MACzC,IAAI,EAAE;IACR;EACF;AACF,CAAC,CAAC;AAEF,OAAO,SAAS,iBAAiB,GAAG;EAClC,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC;EAC1B,OAAO,MAAM,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C","ignoreList":[]}
@@ -63,12 +63,17 @@ const applyAccessibleName = (dialog, entry) => {
63
63
  */
64
64
  let frameMotion;
65
65
  let frameMotionLoading;
66
- const loadFrameMotion = () => frameMotionLoading ??= import("./dialog-frame-motion").then(module => {
67
- frameMotion = module;
68
- }, () => {
69
- // A failed chunk request may succeed on the next open.
70
- frameMotionLoading = undefined;
71
- });
66
+ const loadFrameMotion = (state, announced) => {
67
+ const arrived = () => frameMotion?.connectFrameMotion(state, announced);
68
+ if (frameMotion) return arrived();
69
+ frameMotionLoading ??= import("./dialog-frame-motion").then(module => {
70
+ frameMotion = module;
71
+ }, () => {
72
+ // A failed chunk request may succeed on the next open.
73
+ frameMotionLoading = undefined;
74
+ });
75
+ void frameMotionLoading.then(arrived);
76
+ };
72
77
  const schedule = callback => {
73
78
  if (typeof requestAnimationFrame === "function") requestAnimationFrame(callback);else queueMicrotask(callback);
74
79
  };
@@ -347,7 +352,6 @@ export const createDialogCore = () => {
347
352
  // Each stack level carries its own palette, independently of the first opener.
348
353
  getK2bPortalRoot(undefined, document.body).appendChild(element);
349
354
  state.element = element;
350
- void loadFrameMotion();
351
355
  return element;
352
356
  };
353
357
  const lockPageScroll = () => {
@@ -372,8 +376,8 @@ export const createDialogCore = () => {
372
376
  if (dialog.className !== entry.panelClassName) dialog.className = entry.panelClassName;
373
377
  applyUiScope(dialog, entry.uiScope);
374
378
  const position = entry.position;
379
+ if (position || dialog.style.position) dialog.style.inset = position ? `${position.y}px auto auto ${position.x}px` : "";
375
380
  dialog.style.position = position ? "fixed" : "";
376
- dialog.style.inset = position ? `${position.y}px auto auto ${position.x}px` : "";
377
381
  dialog.style.margin = position ? "0" : "";
378
382
  dialog.style.transform = position ? "none" : "";
379
383
  dialog.dataset.modeless = String(!entry.modal);
@@ -443,18 +447,6 @@ export const createDialogCore = () => {
443
447
  }
444
448
  };
445
449
 
446
- /** A level that replaces another says its name; before the module has loaded, as soon as it has, if it still shows. */
447
- const announceLevel = entry => {
448
- if (state.motion) state.motion.announce(entry.role);else {
449
- const element = state.element;
450
- void loadFrameMotion().then(() => {
451
- if (!element || state.element !== element || state.stack.at(-1) !== entry || !frameMotion) return;
452
- state.motion ??= frameMotion.createFrameMotion(element);
453
- state.motion.announce(entry.role);
454
- });
455
- }
456
- };
457
-
458
450
  /** Closes the shown level. `below` are the levels under it that close with it (lowest last): they leave with the frame. */
459
451
  const popTop = (result, below = []) => {
460
452
  const top = state.stack.pop();
@@ -479,8 +471,8 @@ export const createDialogCore = () => {
479
471
  applyPresentation(previous);
480
472
  applyAccessibleName(dialog, previous);
481
473
  applyCancelBehavior(dialog, () => void requestDismiss(previous), previous.cancelBehavior);
482
- if (motion) motion.arrive(previous.container, discard);else discard();
483
- announceLevel(previous);
474
+ if (motion) motion.arrive(previous.container, discard, previous.follow);else discard();
475
+ loadFrameMotion(state, previous);
484
476
  schedule(() => {
485
477
  if (!focusUnclaimed(dialog)) return;
486
478
  if (top.opener?.isConnected) returnFocus(top.opener, top.openerRing);else resolveInitialFocusTarget(previous, dialog)?.focus();
@@ -569,7 +561,6 @@ export const createDialogCore = () => {
569
561
  // A dialog that waited for history while islands were disposed would open over content it was never meant for.
570
562
  if (disposals !== requested) return Promise.resolve(undefined);
571
563
  const dialog = ensureDialogElement();
572
- if (!state.motion && frameMotion) state.motion = frameMotion.createFrameMotion(dialog);
573
564
  listen();
574
565
  const previousTop = state.stack[state.stack.length - 1];
575
566
  // The shown level fades out while the new one replaces it in the same frame; it is hidden once it has faded.
@@ -596,7 +587,8 @@ export const createDialogCore = () => {
596
587
  ariaLabel: options.ariaLabel,
597
588
  ariaDescribedBy: options.ariaDescribedBy,
598
589
  role: options.role ?? "dialog",
599
- modal: true
590
+ modal: true,
591
+ follow: options.followContent
600
592
  };
601
593
  return new Promise((resolve, reject) => {
602
594
  const abort = () => {
@@ -640,7 +632,10 @@ export const createDialogCore = () => {
640
632
  },
641
633
  setPosition: position => {
642
634
  if (position && (!Number.isFinite(position.x) || !Number.isFinite(position.y))) return;
643
- entry.position = position;
635
+ if (state.stack[state.stack.length - 1] === entry && state.motion?.position(entry.position, position) === false) return;
636
+ entry.position = position ? {
637
+ ...position
638
+ } : null;
644
639
  applyPresentation(entry);
645
640
  },
646
641
  requestDismiss: () => requestDismiss(entry),
@@ -662,8 +657,8 @@ export const createDialogCore = () => {
662
657
  const hide = () => {
663
658
  previousTop.container.style.display = "none";
664
659
  };
665
- if (state.motion) state.motion.arrive(container, hide);else hide();
666
- announceLevel(entry);
660
+ if (state.motion) state.motion.arrive(container, hide, entry.follow);else hide();
661
+ loadFrameMotion(state, entry);
667
662
  }
668
663
  if (state.stack.length === 1) {
669
664
  // The native dialog returns focus to the element focused when it
@@ -679,6 +674,8 @@ export const createDialogCore = () => {
679
674
  if (entry.modal) dialog.showModal();else dialog.show();
680
675
  } else dialog.setAttribute("open", "");
681
676
  observeConnection();
677
+ // Only opted-in levels follow content; the first open itself does not animate.
678
+ loadFrameMotion(state);
682
679
  }
683
680
  options.signal?.addEventListener("abort", abort, {
684
681
  once: true