@flamingo-stack/openframe-frontend-core 0.0.492-1506.3956.1 → 0.0.492
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-KX3K2EH4.cjs → chunk-2XAAFAQT.cjs} +11 -11
- package/dist/{chunk-KX3K2EH4.cjs.map → chunk-2XAAFAQT.cjs.map} +1 -1
- package/dist/{chunk-JHEIOXXZ.js → chunk-4AWRPTKE.js} +5 -6
- package/dist/chunk-4AWRPTKE.js.map +1 -0
- package/dist/{chunk-PTXZB2KW.js → chunk-4J3CB4KO.js} +2 -2
- package/dist/{chunk-7N7YZCHR.cjs → chunk-4MLOMMDX.cjs} +5519 -7555
- package/dist/chunk-4MLOMMDX.cjs.map +1 -0
- package/dist/{chunk-MEMRQTOI.js → chunk-56J7RLMM.js} +10434 -12470
- package/dist/chunk-56J7RLMM.js.map +1 -0
- package/dist/{chunk-MEIGDK7M.cjs → chunk-5ICPQAUI.cjs} +60 -60
- package/dist/chunk-5ICPQAUI.cjs.map +1 -0
- package/dist/{chunk-BEEPU44B.js → chunk-5RHJVPL7.js} +10 -10
- package/dist/chunk-5RHJVPL7.js.map +1 -0
- package/dist/{chunk-XOFE2RT4.js → chunk-BTIRYGDT.js} +4 -4
- package/dist/{chunk-JSEJ5MH5.cjs → chunk-DY6AJNVK.cjs} +5 -5
- package/dist/{chunk-JSEJ5MH5.cjs.map → chunk-DY6AJNVK.cjs.map} +1 -1
- package/dist/{chunk-PLB6CQSO.js → chunk-FG5ALORQ.js} +2 -2
- package/dist/{chunk-QG2EBIH5.cjs → chunk-J2J36PEN.cjs} +31 -31
- package/dist/{chunk-QG2EBIH5.cjs.map → chunk-J2J36PEN.cjs.map} +1 -1
- package/dist/{chunk-A6FPYAUD.cjs → chunk-LIRXKEOE.cjs} +15 -15
- package/dist/{chunk-A6FPYAUD.cjs.map → chunk-LIRXKEOE.cjs.map} +1 -1
- package/dist/{chunk-MSL5NE3N.cjs → chunk-LVDI7R7T.cjs} +37 -37
- package/dist/{chunk-MSL5NE3N.cjs.map → chunk-LVDI7R7T.cjs.map} +1 -1
- package/dist/{chunk-MPUQFRJG.cjs → chunk-M4SCYPCR.cjs} +7 -7
- package/dist/{chunk-MPUQFRJG.cjs.map → chunk-M4SCYPCR.cjs.map} +1 -1
- package/dist/{chunk-QDGB2DKY.cjs → chunk-O6S6Q52W.cjs} +26 -26
- package/dist/{chunk-QDGB2DKY.cjs.map → chunk-O6S6Q52W.cjs.map} +1 -1
- package/dist/{chunk-W56JYDSC.cjs → chunk-OFFYASUY.cjs} +27 -28
- package/dist/chunk-OFFYASUY.cjs.map +1 -0
- package/dist/{chunk-NCAN6VUF.js → chunk-P3ITKTUE.js} +2 -2
- package/dist/{chunk-M6FEGPQJ.cjs → chunk-PI5BMKV3.cjs} +62 -62
- package/dist/{chunk-M6FEGPQJ.cjs.map → chunk-PI5BMKV3.cjs.map} +1 -1
- package/dist/{chunk-34TDA22K.js → chunk-QHRNQTW5.js} +2 -2
- package/dist/{chunk-OL3MJKUI.js → chunk-SZWMJIH3.js} +2 -2
- package/dist/{chunk-MZRIRQYV.js → chunk-U5LU56JE.js} +2 -2
- package/dist/{chunk-C65NCIMV.cjs → chunk-VML66FJQ.cjs} +9 -9
- package/dist/{chunk-C65NCIMV.cjs.map → chunk-VML66FJQ.cjs.map} +1 -1
- package/dist/{chunk-3LKB722U.js → chunk-WKWZ7LVC.js} +2 -2
- package/dist/{chunk-J3VBVR4W.js → chunk-WPFLV4QJ.js} +4 -4
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/hooks/index.d.ts +1 -0
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-chat.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +48 -15
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts +6 -0
- package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts +57 -10
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -10
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +0 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +13 -21
- package/dist/components/chat/types/api.types.d.ts +81 -1
- package/dist/components/chat/types/api.types.d.ts.map +1 -1
- package/dist/components/chat/types/processing.types.d.ts +93 -2
- package/dist/components/chat/types/processing.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chunk-parser.d.ts +25 -0
- package/dist/components/chat/utils/chunk-parser.d.ts.map +1 -0
- package/dist/components/chat/utils/extract-incomplete-message-state.d.ts +6 -34
- package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
- package/dist/components/chat/utils/index.d.ts +3 -2
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/chat/utils/process-historical-messages.d.ts +11 -59
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/floating-walkthrough-video.d.ts.map +1 -1
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +130 -172
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +21 -63
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/navigation/navigation-sidebar-item.d.ts +23 -1
- package/dist/components/navigation/navigation-sidebar-item.d.ts.map +1 -1
- package/dist/components/navigation/navigation-sidebar.d.ts.map +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/data-table/data-table-column-filter.d.ts.map +1 -1
- package/dist/components/ui/data-table/data-table-header.d.ts.map +1 -1
- package/dist/components/ui/data-table/data-table-skeleton.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +2 -44
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +13 -55
- package/dist/components/ui/rich-markdown-renderer.d.ts +34 -0
- package/dist/components/ui/rich-markdown-renderer.d.ts.map +1 -0
- package/dist/components/ui/simple-markdown-renderer.d.ts +73 -0
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -0
- package/dist/components/ui/tab-navigation.d.ts.map +1 -1
- package/dist/index.cjs +2 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -71
- package/dist/utils/index.cjs +40 -169
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +41 -162
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/markdown-section-extractor.d.ts.map +1 -1
- package/package.json +1 -7
- package/src/components/chat/__tests__/chat-message-list.test.tsx +5 -293
- package/src/components/chat/chat-message-enhanced.tsx +20 -122
- package/src/components/chat/chat-message-list.tsx +109 -358
- package/src/components/chat/embeddable-chat.tsx +0 -6
- package/src/components/chat/hooks/.index.md +33 -30
- package/src/components/chat/hooks/.use-nats-chat-adapter.md +55 -36
- package/src/components/chat/hooks/.use-realtime-chunk-processor.md +77 -0
- package/src/components/chat/hooks/index.ts +1 -0
- package/src/components/chat/hooks/use-chat.ts +0 -8
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +825 -243
- package/src/components/chat/hooks/use-realtime-chunk-processor.ts +489 -0
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +684 -380
- package/src/components/chat/index.ts +0 -5
- package/src/components/chat/thinking-display.tsx +1 -1
- package/src/components/chat/types/.api.types.md +49 -39
- package/src/components/chat/types/.processing.types.md +58 -29
- package/src/components/chat/types/api.types.ts +73 -6
- package/src/components/chat/types/processing.types.ts +53 -11
- package/src/components/chat/utils/.chunk-parser.md +62 -0
- package/src/components/chat/utils/.index.md +40 -31
- package/src/components/chat/utils/chunk-parser.ts +262 -0
- package/src/components/chat/utils/extract-incomplete-message-state.ts +5 -63
- package/src/components/chat/utils/index.ts +8 -5
- package/src/components/chat/utils/process-historical-messages.ts +386 -358
- package/src/components/features/floating-walkthrough-video.tsx +3 -1
- package/src/components/navigation/navigation-sidebar-item.tsx +80 -30
- package/src/components/navigation/navigation-sidebar.tsx +106 -46
- package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +4 -22
- package/src/components/shared/legal-document/legal-document-page.tsx +1 -1
- package/src/components/shared/product-release/release-detail-page.tsx +4 -19
- package/src/components/ui/.simple-markdown-renderer.md +52 -0
- package/src/components/ui/__tests__/tab-navigation.test.tsx +159 -0
- package/src/components/ui/data-table/data-table-column-filter.tsx +7 -1
- package/src/components/ui/data-table/data-table-header.tsx +4 -1
- package/src/components/ui/data-table/data-table-skeleton.tsx +7 -0
- package/src/components/ui/index.ts +2 -1
- package/src/components/ui/release-changelog-section.tsx +1 -1
- package/src/components/ui/rich-markdown-renderer.tsx +1223 -0
- package/src/components/ui/simple-markdown-renderer.tsx +964 -0
- package/src/components/ui/tab-navigation.tsx +370 -171
- package/src/components/ui/ticket-info-section.tsx +1 -1
- package/src/utils/index.ts +0 -1
- package/src/utils/markdown-section-extractor.ts +56 -41
- package/dist/chat-protocol/decode.d.ts +0 -58
- package/dist/chat-protocol/decode.d.ts.map +0 -1
- package/dist/chat-protocol/encode.d.ts +0 -44
- package/dist/chat-protocol/encode.d.ts.map +0 -1
- package/dist/chat-protocol/env-flag.d.ts +0 -35
- package/dist/chat-protocol/env-flag.d.ts.map +0 -1
- package/dist/chat-protocol/events.d.ts +0 -207
- package/dist/chat-protocol/events.d.ts.map +0 -1
- package/dist/chat-protocol/frames.d.ts +0 -213
- package/dist/chat-protocol/frames.d.ts.map +0 -1
- package/dist/chat-protocol/index.cjs +0 -500
- package/dist/chat-protocol/index.cjs.map +0 -1
- package/dist/chat-protocol/index.d.ts +0 -18
- package/dist/chat-protocol/index.d.ts.map +0 -1
- package/dist/chat-protocol/index.js +0 -484
- package/dist/chat-protocol/index.js.map +0 -1
- package/dist/chat-protocol/ip-normalize.d.ts +0 -44
- package/dist/chat-protocol/ip-normalize.d.ts.map +0 -1
- package/dist/chat-protocol/nats-decoder.d.ts +0 -26
- package/dist/chat-protocol/nats-decoder.d.ts.map +0 -1
- package/dist/chunk-7N7YZCHR.cjs.map +0 -1
- package/dist/chunk-BEEPU44B.js.map +0 -1
- package/dist/chunk-JHEIOXXZ.js.map +0 -1
- package/dist/chunk-MEIGDK7M.cjs.map +0 -1
- package/dist/chunk-MEMRQTOI.js.map +0 -1
- package/dist/chunk-W56JYDSC.cjs.map +0 -1
- package/dist/components/chat/stream/chat-dialog-store.d.ts +0 -184
- package/dist/components/chat/stream/chat-dialog-store.d.ts.map +0 -1
- package/dist/components/chat/stream/chat-stream-reducer.d.ts +0 -367
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +0 -1
- package/dist/components/chat/stream/delta-batcher.d.ts +0 -51
- package/dist/components/chat/stream/delta-batcher.d.ts.map +0 -1
- package/dist/components/chat/stream/index.d.ts +0 -17
- package/dist/components/chat/stream/index.d.ts.map +0 -1
- package/dist/components/chat/stream/message-mutations.d.ts +0 -77
- package/dist/components/chat/stream/message-mutations.d.ts.map +0 -1
- package/dist/components/chat/stream/use-chat-stream-reducer.d.ts +0 -22
- package/dist/components/chat/stream/use-chat-stream-reducer.d.ts.map +0 -1
- package/dist/components/ui/markdown/base-components.d.ts +0 -51
- package/dist/components/ui/markdown/base-components.d.ts.map +0 -1
- package/dist/components/ui/markdown/engine.d.ts +0 -99
- package/dist/components/ui/markdown/engine.d.ts.map +0 -1
- package/dist/components/ui/markdown/heading-ids.d.ts +0 -65
- package/dist/components/ui/markdown/heading-ids.d.ts.map +0 -1
- package/dist/components/ui/markdown/index.d.ts +0 -18
- package/dist/components/ui/markdown/index.d.ts.map +0 -1
- package/dist/components/ui/markdown/mermaid-diagram.d.ts +0 -79
- package/dist/components/ui/markdown/mermaid-diagram.d.ts.map +0 -1
- package/dist/components/ui/markdown/rich/embed-overrides.d.ts +0 -14
- package/dist/components/ui/markdown/rich/embed-overrides.d.ts.map +0 -1
- package/dist/components/ui/markdown/rich/rich-markdown-renderer.d.ts +0 -40
- package/dist/components/ui/markdown/rich/rich-markdown-renderer.d.ts.map +0 -1
- package/dist/components/ui/markdown/rich/shortcodes.d.ts +0 -8
- package/dist/components/ui/markdown/rich/shortcodes.d.ts.map +0 -1
- package/dist/components/ui/markdown/sanitize.d.ts +0 -153
- package/dist/components/ui/markdown/sanitize.d.ts.map +0 -1
- package/dist/components/ui/markdown/simple-markdown-renderer.d.ts +0 -23
- package/dist/components/ui/markdown/simple-markdown-renderer.d.ts.map +0 -1
- package/dist/components/ui/markdown/streaming.d.ts +0 -78
- package/dist/components/ui/markdown/streaming.d.ts.map +0 -1
- package/dist/components/ui/markdown/text-size.d.ts +0 -34
- package/dist/components/ui/markdown/text-size.d.ts.map +0 -1
- package/dist/utils/markdown-fences.d.ts +0 -42
- package/dist/utils/markdown-fences.d.ts.map +0 -1
- package/dist/utils/markdown-heading-id.d.ts +0 -85
- package/dist/utils/markdown-heading-id.d.ts.map +0 -1
- package/src/chat-protocol/__tests__/__snapshots__/nats-decoder-golden.test.ts.snap +0 -317
- package/src/chat-protocol/__tests__/chat-protocol.test.ts +0 -516
- package/src/chat-protocol/__tests__/env-flag.test.ts +0 -52
- package/src/chat-protocol/__tests__/ip-normalize.test.ts +0 -136
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +0 -232
- package/src/chat-protocol/decode.ts +0 -278
- package/src/chat-protocol/encode.ts +0 -71
- package/src/chat-protocol/env-flag.ts +0 -39
- package/src/chat-protocol/events.ts +0 -245
- package/src/chat-protocol/frames.ts +0 -245
- package/src/chat-protocol/index.ts +0 -21
- package/src/chat-protocol/ip-normalize.ts +0 -146
- package/src/chat-protocol/nats-decoder.ts +0 -258
- package/src/components/chat/__tests__/chat-message-streaming-memo.test.tsx +0 -207
- package/src/components/chat/__tests__/chat-pending-turn.test.tsx +0 -230
- package/src/components/chat/hooks/__tests__/__snapshots__/conversation-id-persistence-golden.test.ts.snap +0 -37
- package/src/components/chat/hooks/__tests__/__snapshots__/sse-stream-golden.test.ts.snap +0 -0
- package/src/components/chat/hooks/__tests__/conversation-id-persistence-golden.test.ts +0 -438
- package/src/components/chat/hooks/__tests__/sse-stream-golden.test.ts +0 -318
- package/src/components/chat/stream/__tests__/__snapshots__/chat-stream-reducer-golden.test.ts.snap +0 -940
- package/src/components/chat/stream/__tests__/chat-dialog-store.test.ts +0 -756
- package/src/components/chat/stream/__tests__/chat-stream-reducer-golden.test.ts +0 -460
- package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +0 -973
- package/src/components/chat/stream/__tests__/delta-batcher.test.ts +0 -255
- package/src/components/chat/stream/__tests__/use-chat-stream-reducer.test.ts +0 -98
- package/src/components/chat/stream/chat-dialog-store.ts +0 -536
- package/src/components/chat/stream/chat-stream-reducer.ts +0 -1808
- package/src/components/chat/stream/delta-batcher.ts +0 -168
- package/src/components/chat/stream/index.ts +0 -55
- package/src/components/chat/stream/message-mutations.ts +0 -340
- package/src/components/chat/stream/use-chat-stream-reducer.ts +0 -126
- package/src/components/chat/utils/__tests__/__snapshots__/process-historical-messages-golden.test.ts.snap +0 -420
- package/src/components/chat/utils/__tests__/__snapshots__/segment-accumulator-golden.test.ts.snap +0 -605
- package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +0 -394
- package/src/components/chat/utils/__tests__/segment-accumulator-golden.test.ts +0 -270
- package/src/components/ui/__tests__/__snapshots__/markdown-parity.test.tsx.snap +0 -2420
- package/src/components/ui/__tests__/markdown-parity.test.tsx +0 -2528
- package/src/components/ui/markdown/__tests__/mermaid-security.test.ts +0 -115
- package/src/components/ui/markdown/__tests__/mermaid-stale-render.test.tsx +0 -95
- package/src/components/ui/markdown/__tests__/sanitize-invariant.test.ts +0 -309
- package/src/components/ui/markdown/__tests__/streaming.test.tsx +0 -388
- package/src/components/ui/markdown/base-components.tsx +0 -360
- package/src/components/ui/markdown/engine.tsx +0 -315
- package/src/components/ui/markdown/heading-ids.ts +0 -239
- package/src/components/ui/markdown/index.ts +0 -49
- package/src/components/ui/markdown/mermaid-diagram.tsx +0 -291
- package/src/components/ui/markdown/rich/embed-overrides.tsx +0 -199
- package/src/components/ui/markdown/rich/rich-markdown-renderer.tsx +0 -184
- package/src/components/ui/markdown/rich/shortcodes.ts +0 -170
- package/src/components/ui/markdown/sanitize.ts +0 -3499
- package/src/components/ui/markdown/simple-markdown-renderer.tsx +0 -28
- package/src/components/ui/markdown/streaming.ts +0 -362
- package/src/components/ui/markdown/text-size.ts +0 -106
- package/src/utils/markdown-fences.ts +0 -127
- package/src/utils/markdown-heading-id.ts +0 -348
- /package/dist/{chunk-PTXZB2KW.js.map → chunk-4J3CB4KO.js.map} +0 -0
- /package/dist/{chunk-XOFE2RT4.js.map → chunk-BTIRYGDT.js.map} +0 -0
- /package/dist/{chunk-PLB6CQSO.js.map → chunk-FG5ALORQ.js.map} +0 -0
- /package/dist/{chunk-NCAN6VUF.js.map → chunk-P3ITKTUE.js.map} +0 -0
- /package/dist/{chunk-34TDA22K.js.map → chunk-QHRNQTW5.js.map} +0 -0
- /package/dist/{chunk-OL3MJKUI.js.map → chunk-SZWMJIH3.js.map} +0 -0
- /package/dist/{chunk-MZRIRQYV.js.map → chunk-U5LU56JE.js.map} +0 -0
- /package/dist/{chunk-3LKB722U.js.map → chunk-WKWZ7LVC.js.map} +0 -0
- /package/dist/{chunk-J3VBVR4W.js.map → chunk-WPFLV4QJ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -196,10 +196,8 @@ import {
|
|
|
196
196
|
CveLink,
|
|
197
197
|
DEFAULT_CONTENT_SUFFIXES,
|
|
198
198
|
DEFAULT_CUSTOM_STATUS_COLOR,
|
|
199
|
-
DEFAULT_DIALOG_SIDE,
|
|
200
199
|
DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID,
|
|
201
200
|
DEFAULT_FOLDER_INDEX_FILE,
|
|
202
|
-
DEFAULT_MAX_REDUCERS,
|
|
203
201
|
DEFAULT_OS_PLATFORM,
|
|
204
202
|
DEFAULT_THEME,
|
|
205
203
|
DEFAULT_VIDEO_BITES_TITLE,
|
|
@@ -293,7 +291,6 @@ import {
|
|
|
293
291
|
GuideDisplay,
|
|
294
292
|
GuideModeBanner,
|
|
295
293
|
GuideWelcome,
|
|
296
|
-
HEADING_EMOJI_RE,
|
|
297
294
|
HEX_PATTERN,
|
|
298
295
|
Header,
|
|
299
296
|
HeaderButton,
|
|
@@ -340,14 +337,12 @@ import {
|
|
|
340
337
|
LogSeverityDot,
|
|
341
338
|
LoginForm,
|
|
342
339
|
LogsList,
|
|
343
|
-
MAX_PENDING_RETAIN_KEYS,
|
|
344
340
|
MESSAGE_ROLE,
|
|
345
341
|
MESSAGE_TYPE,
|
|
346
342
|
MOBILE_NAV_PANEL_ID,
|
|
347
343
|
MUX_IMAGE_ORIGIN,
|
|
348
344
|
MUX_STREAM_ORIGIN,
|
|
349
345
|
MarkdownEditor,
|
|
350
|
-
MarkdownEngine,
|
|
351
346
|
MarqueeWall,
|
|
352
347
|
MarqueeWallFades,
|
|
353
348
|
MediaGalleryManager,
|
|
@@ -369,7 +364,6 @@ import {
|
|
|
369
364
|
MenubarSubContent,
|
|
370
365
|
MenubarSubTrigger,
|
|
371
366
|
MenubarTrigger,
|
|
372
|
-
MermaidDiagram,
|
|
373
367
|
MessageSegmentAccumulator,
|
|
374
368
|
MingoAiButton,
|
|
375
369
|
MingoChatHistory,
|
|
@@ -493,7 +487,6 @@ import {
|
|
|
493
487
|
RoadmapCard,
|
|
494
488
|
RoadmapCardSkeleton,
|
|
495
489
|
RoadmapVoteButton,
|
|
496
|
-
SAFE_HTML_TAGS,
|
|
497
490
|
SCROLL_ANCHOR,
|
|
498
491
|
SCROLL_ANCHOR_WIRE_KEY,
|
|
499
492
|
SECTION_HEADING_CLASS,
|
|
@@ -506,7 +499,6 @@ import {
|
|
|
506
499
|
SOURCE_ICON_NAMES,
|
|
507
500
|
SOURCE_LABELS_BY_TABLE,
|
|
508
501
|
STRIP_CELL_MAX_WIDTH,
|
|
509
|
-
SVG_TAGS,
|
|
510
502
|
SYNTHETIC_REALTIME_ID_PREFIXES,
|
|
511
503
|
ScriptArguments,
|
|
512
504
|
ScriptInfoSection,
|
|
@@ -564,7 +556,6 @@ import {
|
|
|
564
556
|
TAG_BADGE_CLASS,
|
|
565
557
|
TASK_TYPE_LABELS,
|
|
566
558
|
TASK_TYPE_TEXT_COLORS,
|
|
567
|
-
TEXT_SIZE_PRESETS,
|
|
568
559
|
THEME_ATTRIBUTE,
|
|
569
560
|
THEME_STORAGE_KEY,
|
|
570
561
|
TICKET_STATUS_COLOR_PRESETS,
|
|
@@ -670,17 +661,13 @@ import {
|
|
|
670
661
|
buildDefaultHref,
|
|
671
662
|
buildDiscussAddendum,
|
|
672
663
|
buildDocumentTree,
|
|
673
|
-
buildEffectiveTagSet,
|
|
674
|
-
buildHeadingIdMap,
|
|
675
664
|
buildListUrl,
|
|
676
665
|
buildNatsWsUrl,
|
|
677
666
|
buildProductReleaseCardProps,
|
|
678
|
-
buildSanitizeSchema,
|
|
679
667
|
buildStreamFrames,
|
|
680
668
|
buildSuggestionUrl,
|
|
681
669
|
canonicalContentRefType,
|
|
682
670
|
captureFirstTouchAttribution,
|
|
683
|
-
cardAwareUrlTransform,
|
|
684
671
|
changelogLabels,
|
|
685
672
|
chatChipClass,
|
|
686
673
|
cleanEmailDomain,
|
|
@@ -691,20 +678,12 @@ import {
|
|
|
691
678
|
clearWalkthroughDismissal,
|
|
692
679
|
clickupTaskUrl,
|
|
693
680
|
columnFromTicketStatus,
|
|
694
|
-
completeStreamingTail,
|
|
695
681
|
computeHistoryPrepend,
|
|
696
682
|
computeIsNewTab,
|
|
697
|
-
createChatDialogStore,
|
|
698
|
-
createChatStreamReducer,
|
|
699
683
|
createColumnHelper,
|
|
700
|
-
createDeltaBatcher,
|
|
701
|
-
createEmptyTurnMeta,
|
|
702
|
-
createFenceTracker,
|
|
703
|
-
createHeadingIdDeduper,
|
|
704
684
|
createMessageSegmentAccumulator,
|
|
705
685
|
createUTCTimestamp,
|
|
706
686
|
decideNewTab,
|
|
707
|
-
decodeHistoricalMessageData,
|
|
708
687
|
deepClone,
|
|
709
688
|
defaultBuildProductReleaseCardProps,
|
|
710
689
|
defaultTableIdForDocumentType,
|
|
@@ -718,7 +697,6 @@ import {
|
|
|
718
697
|
dismissWalkthrough,
|
|
719
698
|
ensureBiteIds,
|
|
720
699
|
escapeMarkdownInline,
|
|
721
|
-
escapeUnknownHtmlTags,
|
|
722
700
|
executeNavigation,
|
|
723
701
|
executeNavigationImperative,
|
|
724
702
|
exportToCSV,
|
|
@@ -728,11 +706,10 @@ import {
|
|
|
728
706
|
extractErrorMessages,
|
|
729
707
|
extractImageEdgeColorAsync,
|
|
730
708
|
extractIncompleteMessageState,
|
|
731
|
-
extractIncompleteTailState,
|
|
732
709
|
extractItemId,
|
|
733
710
|
extractItems,
|
|
734
711
|
extractSections,
|
|
735
|
-
|
|
712
|
+
extractTextFromChunk,
|
|
736
713
|
extractYouTubeId,
|
|
737
714
|
faqItemAnchor,
|
|
738
715
|
faqSectionSlug,
|
|
@@ -859,13 +836,15 @@ import {
|
|
|
859
836
|
interleave,
|
|
860
837
|
isAnnouncementDismissed,
|
|
861
838
|
isApprovalNotification,
|
|
862
|
-
|
|
839
|
+
isControlChunk,
|
|
863
840
|
isCrossOriginUrl,
|
|
864
841
|
isDismissedCookieValue,
|
|
842
|
+
isErrorChunk,
|
|
865
843
|
isFigmaSlidesUrl,
|
|
866
844
|
isGenericDomain,
|
|
867
845
|
isGenericWebsiteDomain,
|
|
868
846
|
isHistoricalUserTurn,
|
|
847
|
+
isMetadataChunk,
|
|
869
848
|
isModifierClick,
|
|
870
849
|
isOSPlatform,
|
|
871
850
|
isQuickActionIconSpec,
|
|
@@ -899,6 +878,7 @@ import {
|
|
|
899
878
|
orderContentRefTypes,
|
|
900
879
|
osLabels,
|
|
901
880
|
parseAttributionFromUrl,
|
|
881
|
+
parseChunkToAction,
|
|
902
882
|
parseFaqHash,
|
|
903
883
|
parseScrollAnchor,
|
|
904
884
|
parseWireCommandOverride,
|
|
@@ -906,12 +886,10 @@ import {
|
|
|
906
886
|
pickReadableTextColor,
|
|
907
887
|
processHistoricalMessages,
|
|
908
888
|
processHistoricalMessagesWithErrors,
|
|
909
|
-
processShortcodes,
|
|
910
889
|
programItemToStripProfile,
|
|
911
890
|
ratioToCategory,
|
|
912
891
|
readDismissCookie,
|
|
913
892
|
readLeadingDecisionFrame,
|
|
914
|
-
rehypeStripUnsafe,
|
|
915
893
|
releaseStatusOptions,
|
|
916
894
|
releaseTypeOptions,
|
|
917
895
|
releaseTypeToBadgeColor,
|
|
@@ -927,26 +905,20 @@ import {
|
|
|
927
905
|
resolveSourceIcon,
|
|
928
906
|
resolveSourceRowCTA,
|
|
929
907
|
resolveStatusTagProps,
|
|
930
|
-
resolveTextSizeConfig,
|
|
931
908
|
resolveTicketStatus,
|
|
932
909
|
rgbToHex,
|
|
933
910
|
safeHref,
|
|
934
911
|
sanitizeLandingUrl,
|
|
935
912
|
sanitizeTitleForChat,
|
|
936
913
|
saveDataEnabled,
|
|
937
|
-
scanHeadings,
|
|
938
914
|
serializeJsonLd,
|
|
939
915
|
shellLabels,
|
|
940
916
|
shouldProxyImage,
|
|
941
|
-
slugifyHeadingBase,
|
|
942
|
-
slugifyHeadingText,
|
|
943
917
|
sortBitesByCreatedAtDesc,
|
|
944
918
|
sortTreeChildren,
|
|
945
|
-
splitStreamingBlocks,
|
|
946
919
|
statusBadgeVariants,
|
|
947
920
|
stripChatAttachmentMarkdown,
|
|
948
921
|
stripFolderIndexFromPath,
|
|
949
|
-
stripHeadingEmojis,
|
|
950
922
|
stripHtml,
|
|
951
923
|
stripInlineMarkdown,
|
|
952
924
|
stripSameOriginToPath,
|
|
@@ -973,7 +945,6 @@ import {
|
|
|
973
945
|
useChatAttachments,
|
|
974
946
|
useChatCardItem,
|
|
975
947
|
useChatIdentity,
|
|
976
|
-
useChatStreamReducer,
|
|
977
948
|
useChunkCatchup,
|
|
978
949
|
useCloseOnNavigation,
|
|
979
950
|
useCollapsible,
|
|
@@ -983,7 +954,6 @@ import {
|
|
|
983
954
|
useDynamicTheme,
|
|
984
955
|
useEmptyStateConfig,
|
|
985
956
|
useFiltersDropdown,
|
|
986
|
-
useHeadingIdMap,
|
|
987
957
|
useJetStreamDialogSubscription,
|
|
988
958
|
useLoading,
|
|
989
959
|
useMarqueeSync,
|
|
@@ -994,6 +964,7 @@ import {
|
|
|
994
964
|
useOptionalTimeTracker,
|
|
995
965
|
usePageActionsBottomPadding,
|
|
996
966
|
useProxiedImageUrl,
|
|
967
|
+
useRealtimeChunkProcessor,
|
|
997
968
|
useSSE,
|
|
998
969
|
useScriptedStream,
|
|
999
970
|
useScrollFade,
|
|
@@ -1017,7 +988,7 @@ import {
|
|
|
1017
988
|
walkthroughDismissCookieName,
|
|
1018
989
|
withFirstTouchAttribution,
|
|
1019
990
|
writeDismissCookie
|
|
1020
|
-
} from "./chunk-
|
|
991
|
+
} from "./chunk-56J7RLMM.js";
|
|
1021
992
|
import {
|
|
1022
993
|
CommandApprovalToast,
|
|
1023
994
|
DEFAULT_MIN_FILL_MS,
|
|
@@ -1571,10 +1542,8 @@ export {
|
|
|
1571
1542
|
CveLink,
|
|
1572
1543
|
DEFAULT_CONTENT_SUFFIXES,
|
|
1573
1544
|
DEFAULT_CUSTOM_STATUS_COLOR,
|
|
1574
|
-
DEFAULT_DIALOG_SIDE,
|
|
1575
1545
|
DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID,
|
|
1576
1546
|
DEFAULT_FOLDER_INDEX_FILE,
|
|
1577
|
-
DEFAULT_MAX_REDUCERS,
|
|
1578
1547
|
DEFAULT_MIN_FILL_MS,
|
|
1579
1548
|
DEFAULT_OS_PLATFORM,
|
|
1580
1549
|
DEFAULT_THEME,
|
|
@@ -1716,7 +1685,6 @@ export {
|
|
|
1716
1685
|
GuideDisplay,
|
|
1717
1686
|
GuideModeBanner,
|
|
1718
1687
|
GuideWelcome,
|
|
1719
|
-
HEADING_EMOJI_RE,
|
|
1720
1688
|
HEX_PATTERN,
|
|
1721
1689
|
HONEYPOT_FIELD,
|
|
1722
1690
|
HUB_HEADER_OFFSET_PX,
|
|
@@ -1786,7 +1754,6 @@ export {
|
|
|
1786
1754
|
CheckCircleIcon2 as LucideCheckCircleIcon,
|
|
1787
1755
|
XIcon2 as LucideXIcon,
|
|
1788
1756
|
LumaIcon,
|
|
1789
|
-
MAX_PENDING_RETAIN_KEYS,
|
|
1790
1757
|
MESSAGE_ROLE,
|
|
1791
1758
|
MESSAGE_TYPE,
|
|
1792
1759
|
MOBILE_NAV_PANEL_ID,
|
|
@@ -1795,7 +1762,6 @@ export {
|
|
|
1795
1762
|
MacOSIcon,
|
|
1796
1763
|
MarginCrisisIcon,
|
|
1797
1764
|
MarkdownEditor,
|
|
1798
|
-
MarkdownEngine,
|
|
1799
1765
|
MarqueeWall,
|
|
1800
1766
|
MarqueeWallFades,
|
|
1801
1767
|
MediaGalleryManager,
|
|
@@ -1817,7 +1783,6 @@ export {
|
|
|
1817
1783
|
MenubarSubContent,
|
|
1818
1784
|
MenubarSubTrigger,
|
|
1819
1785
|
MenubarTrigger,
|
|
1820
|
-
MermaidDiagram,
|
|
1821
1786
|
MessageCircleIcon,
|
|
1822
1787
|
MessageSegmentAccumulator,
|
|
1823
1788
|
MiamiCyberGangLogo,
|
|
@@ -1977,7 +1942,6 @@ export {
|
|
|
1977
1942
|
RoadmapCard,
|
|
1978
1943
|
RoadmapCardSkeleton,
|
|
1979
1944
|
RoadmapVoteButton,
|
|
1980
|
-
SAFE_HTML_TAGS,
|
|
1981
1945
|
SCROLL_ANCHOR,
|
|
1982
1946
|
SCROLL_ANCHOR_WIRE_KEY,
|
|
1983
1947
|
SECTION_HEADING_CLASS,
|
|
@@ -1993,7 +1957,6 @@ export {
|
|
|
1993
1957
|
SSOConfigurationIcon,
|
|
1994
1958
|
STICKY_HEADER_OFFSET_PX,
|
|
1995
1959
|
STRIP_CELL_MAX_WIDTH,
|
|
1996
|
-
SVG_TAGS,
|
|
1997
1960
|
SYNTHETIC_REALTIME_ID_PREFIXES,
|
|
1998
1961
|
ScriptArguments,
|
|
1999
1962
|
ScriptGenerationIcon,
|
|
@@ -2078,7 +2041,6 @@ export {
|
|
|
2078
2041
|
TAG_BADGE_CLASS,
|
|
2079
2042
|
TASK_TYPE_LABELS,
|
|
2080
2043
|
TASK_TYPE_TEXT_COLORS,
|
|
2081
|
-
TEXT_SIZE_PRESETS,
|
|
2082
2044
|
THEME_ATTRIBUTE,
|
|
2083
2045
|
THEME_STORAGE_KEY,
|
|
2084
2046
|
TICKET_STATUS_COLOR_PRESETS,
|
|
@@ -2207,19 +2169,15 @@ export {
|
|
|
2207
2169
|
buildDefaultHref,
|
|
2208
2170
|
buildDiscussAddendum,
|
|
2209
2171
|
buildDocumentTree,
|
|
2210
|
-
buildEffectiveTagSet,
|
|
2211
|
-
buildHeadingIdMap,
|
|
2212
2172
|
buildListUrl,
|
|
2213
2173
|
buildNatsWsUrl,
|
|
2214
2174
|
buildOgPlaceholderUrl,
|
|
2215
2175
|
buildProductReleaseCardProps,
|
|
2216
|
-
buildSanitizeSchema,
|
|
2217
2176
|
buildStreamFrames,
|
|
2218
2177
|
buildSuggestionUrl,
|
|
2219
2178
|
buttonVariants,
|
|
2220
2179
|
canonicalContentRefType,
|
|
2221
2180
|
captureFirstTouchAttribution,
|
|
2222
|
-
cardAwareUrlTransform,
|
|
2223
2181
|
changelogLabels,
|
|
2224
2182
|
embedAuthedFetch as chatAuthedFetch,
|
|
2225
2183
|
chatChipClass,
|
|
@@ -2237,24 +2195,16 @@ export {
|
|
|
2237
2195
|
cn,
|
|
2238
2196
|
coerceValue,
|
|
2239
2197
|
columnFromTicketStatus,
|
|
2240
|
-
completeStreamingTail,
|
|
2241
2198
|
computeHistoryPrepend,
|
|
2242
2199
|
computeIsNewTab,
|
|
2243
2200
|
configureAuthenticatedImage,
|
|
2244
2201
|
configureBatchImageFetch,
|
|
2245
2202
|
consumeAccessCode,
|
|
2246
|
-
createChatDialogStore,
|
|
2247
|
-
createChatStreamReducer,
|
|
2248
2203
|
createColumnHelper,
|
|
2249
|
-
createDeltaBatcher,
|
|
2250
|
-
createEmptyTurnMeta,
|
|
2251
|
-
createFenceTracker,
|
|
2252
|
-
createHeadingIdDeduper,
|
|
2253
2204
|
createMessageSegmentAccumulator,
|
|
2254
2205
|
createSearchParams,
|
|
2255
2206
|
createUTCTimestamp,
|
|
2256
2207
|
decideNewTab,
|
|
2257
|
-
decodeHistoricalMessageData,
|
|
2258
2208
|
deepClone,
|
|
2259
2209
|
defaultBuildProductReleaseCardProps,
|
|
2260
2210
|
defaultTableIdForDocumentType,
|
|
@@ -2270,7 +2220,6 @@ export {
|
|
|
2270
2220
|
embedAuthedFetch,
|
|
2271
2221
|
ensureBiteIds,
|
|
2272
2222
|
escapeMarkdownInline,
|
|
2273
|
-
escapeUnknownHtmlTags,
|
|
2274
2223
|
evaluateHumanitySignals,
|
|
2275
2224
|
executeNavigation,
|
|
2276
2225
|
executeNavigationImperative,
|
|
@@ -2282,11 +2231,10 @@ export {
|
|
|
2282
2231
|
extractHumanitySignals,
|
|
2283
2232
|
extractImageEdgeColorAsync,
|
|
2284
2233
|
extractIncompleteMessageState,
|
|
2285
|
-
extractIncompleteTailState,
|
|
2286
2234
|
extractItemId,
|
|
2287
2235
|
extractItems,
|
|
2288
2236
|
extractSections,
|
|
2289
|
-
|
|
2237
|
+
extractTextFromChunk,
|
|
2290
2238
|
extractVariablesFromQuery,
|
|
2291
2239
|
extractYouTubeId,
|
|
2292
2240
|
faqItemAnchor,
|
|
@@ -2436,14 +2384,16 @@ export {
|
|
|
2436
2384
|
introspector,
|
|
2437
2385
|
isAnnouncementDismissed,
|
|
2438
2386
|
isApprovalNotification,
|
|
2439
|
-
|
|
2387
|
+
isControlChunk,
|
|
2440
2388
|
isCrossOriginUrl,
|
|
2441
2389
|
isDismissedCookieValue,
|
|
2390
|
+
isErrorChunk,
|
|
2442
2391
|
isFigmaSlidesUrl,
|
|
2443
2392
|
isGenericDomain,
|
|
2444
2393
|
isGenericWebsiteDomain,
|
|
2445
2394
|
isHistoricalUserTurn,
|
|
2446
2395
|
isInputObjectType,
|
|
2396
|
+
isMetadataChunk,
|
|
2447
2397
|
isModifierClick,
|
|
2448
2398
|
isOSPlatform,
|
|
2449
2399
|
isQuickActionIconSpec,
|
|
@@ -2482,6 +2432,7 @@ export {
|
|
|
2482
2432
|
orderContentRefTypes,
|
|
2483
2433
|
osLabels,
|
|
2484
2434
|
parseAttributionFromUrl,
|
|
2435
|
+
parseChunkToAction,
|
|
2485
2436
|
parseFaqHash,
|
|
2486
2437
|
parseScrollAnchor,
|
|
2487
2438
|
parseWireCommandOverride,
|
|
@@ -2496,13 +2447,11 @@ export {
|
|
|
2496
2447
|
platformSlogans,
|
|
2497
2448
|
processHistoricalMessages,
|
|
2498
2449
|
processHistoricalMessagesWithErrors,
|
|
2499
|
-
processShortcodes,
|
|
2500
2450
|
programItemToStripProfile,
|
|
2501
2451
|
progressColorByVariant,
|
|
2502
2452
|
ratioToCategory,
|
|
2503
2453
|
readDismissCookie,
|
|
2504
2454
|
readLeadingDecisionFrame,
|
|
2505
|
-
rehypeStripUnsafe,
|
|
2506
2455
|
releaseStatusOptions,
|
|
2507
2456
|
releaseTypeOptions,
|
|
2508
2457
|
releaseTypeToBadgeColor,
|
|
@@ -2519,14 +2468,12 @@ export {
|
|
|
2519
2468
|
resolveSourceIcon,
|
|
2520
2469
|
resolveSourceRowCTA,
|
|
2521
2470
|
resolveStatusTagProps,
|
|
2522
|
-
resolveTextSizeConfig,
|
|
2523
2471
|
resolveTicketStatus,
|
|
2524
2472
|
rgbToHex,
|
|
2525
2473
|
safeHref,
|
|
2526
2474
|
sanitizeLandingUrl,
|
|
2527
2475
|
sanitizeTitleForChat,
|
|
2528
2476
|
saveDataEnabled,
|
|
2529
|
-
scanHeadings,
|
|
2530
2477
|
scrollElementIntoView,
|
|
2531
2478
|
serializeJsonLd,
|
|
2532
2479
|
setEmbedProxyAuth as setChatProxyAuth,
|
|
@@ -2538,16 +2485,12 @@ export {
|
|
|
2538
2485
|
shouldProxyImage,
|
|
2539
2486
|
showCommandApprovalToast,
|
|
2540
2487
|
showToast,
|
|
2541
|
-
slugifyHeadingBase,
|
|
2542
|
-
slugifyHeadingText,
|
|
2543
2488
|
sortBitesByCreatedAtDesc,
|
|
2544
2489
|
sortTreeChildren,
|
|
2545
2490
|
splitCsvEnv,
|
|
2546
|
-
splitStreamingBlocks,
|
|
2547
2491
|
statusBadgeVariants,
|
|
2548
2492
|
stripChatAttachmentMarkdown,
|
|
2549
2493
|
stripFolderIndexFromPath,
|
|
2550
|
-
stripHeadingEmojis,
|
|
2551
2494
|
stripHtml,
|
|
2552
2495
|
stripInlineMarkdown,
|
|
2553
2496
|
stripSameOriginToPath,
|
|
@@ -2584,7 +2527,6 @@ export {
|
|
|
2584
2527
|
useChatAttachments,
|
|
2585
2528
|
useChatCardItem,
|
|
2586
2529
|
useChatIdentity,
|
|
2587
|
-
useChatStreamReducer,
|
|
2588
2530
|
useChunkCatchup,
|
|
2589
2531
|
useCloseOnNavigation,
|
|
2590
2532
|
useCollapsible,
|
|
@@ -2602,7 +2544,6 @@ export {
|
|
|
2602
2544
|
useFiltersDropdown,
|
|
2603
2545
|
useFocusTrap,
|
|
2604
2546
|
useHeaderHeight,
|
|
2605
|
-
useHeadingIdMap,
|
|
2606
2547
|
useHorizontalScrollbar,
|
|
2607
2548
|
useHumanitySignals,
|
|
2608
2549
|
useImageEdgeColor,
|
|
@@ -2632,6 +2573,7 @@ export {
|
|
|
2632
2573
|
usePreventScroll,
|
|
2633
2574
|
useProxiedImageUrl,
|
|
2634
2575
|
useQueryParams,
|
|
2576
|
+
useRealtimeChunkProcessor,
|
|
2635
2577
|
useResetOnPageHidden,
|
|
2636
2578
|
useSSE,
|
|
2637
2579
|
useScriptedStream,
|
package/dist/utils/index.cjs
CHANGED
|
@@ -3996,151 +3996,6 @@ function buildDocumentTree(docs, mapFn, getParentPath, getPath) {
|
|
|
3996
3996
|
return sortTreeChildren(rootNodes);
|
|
3997
3997
|
}
|
|
3998
3998
|
|
|
3999
|
-
// src/utils/markdown-fences.ts
|
|
4000
|
-
var FENCE_RE = /^ {0,3}(`{3,}|~{3,})([^\n]*?)\r?$/;
|
|
4001
|
-
var BLANK_LINE_RE = /^[ \t\r]*$/;
|
|
4002
|
-
function isBlankLine(line) {
|
|
4003
|
-
return BLANK_LINE_RE.test(line);
|
|
4004
|
-
}
|
|
4005
|
-
function createFenceTracker() {
|
|
4006
|
-
let fenceChar = null;
|
|
4007
|
-
let fenceLength = 0;
|
|
4008
|
-
return {
|
|
4009
|
-
push(line) {
|
|
4010
|
-
const fence = FENCE_RE.exec(line);
|
|
4011
|
-
if (fence) {
|
|
4012
|
-
const run = fence[1];
|
|
4013
|
-
if (fenceChar === null) {
|
|
4014
|
-
fenceChar = run[0];
|
|
4015
|
-
fenceLength = run.length;
|
|
4016
|
-
return "open";
|
|
4017
|
-
}
|
|
4018
|
-
if (run[0] === fenceChar && run.length >= fenceLength && isBlankLine(fence[2])) {
|
|
4019
|
-
fenceChar = null;
|
|
4020
|
-
fenceLength = 0;
|
|
4021
|
-
return "close";
|
|
4022
|
-
}
|
|
4023
|
-
return "inside";
|
|
4024
|
-
}
|
|
4025
|
-
return fenceChar === null ? "text" : "inside";
|
|
4026
|
-
},
|
|
4027
|
-
openChar: () => fenceChar,
|
|
4028
|
-
openLength: () => fenceLength
|
|
4029
|
-
};
|
|
4030
|
-
}
|
|
4031
|
-
|
|
4032
|
-
// src/utils/markdown-heading-id.ts
|
|
4033
|
-
var HEADING_EMOJI_RE = /[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]/gu;
|
|
4034
|
-
function stripHeadingEmojis(text) {
|
|
4035
|
-
return text.replace(HEADING_EMOJI_RE, "").trim();
|
|
4036
|
-
}
|
|
4037
|
-
function slugifyHeadingBase(text) {
|
|
4038
|
-
return text.trim().toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/^-+|-+$/g, "");
|
|
4039
|
-
}
|
|
4040
|
-
function slugifyHeadingText(text) {
|
|
4041
|
-
return slugifyHeadingBase(stripHeadingEmojis(text));
|
|
4042
|
-
}
|
|
4043
|
-
var ATX_HEADING_RE = /^ {0,3}(#{1,6})[ \t]+(.*?)(?:[ \t]+#+)?[ \t]*\r?$/;
|
|
4044
|
-
var ATX_EMPTY_RE = /^ {0,3}(#{1,6})[ \t]*#*[ \t]*\r?$/;
|
|
4045
|
-
var RAW_HEADING_RE = /<h([1-6])\b[^>]*>([\s\S]*?)(?:<\/h\1>|$)/gi;
|
|
4046
|
-
var CONTAINER_PREFIX_RE = /^ {0,3}(?:(?:>[ \t]?)+|(?:[-+*]|\d{1,9}[.)])[ \t]+)+/;
|
|
4047
|
-
var SETEXT_UNDERLINE_RE = /^ {0,3}(=+|-+)[ \t]*\r?$/;
|
|
4048
|
-
var THEMATIC_BREAK_RE = /^ {0,3}(\*|_){3,}[ \t]*\r?$/;
|
|
4049
|
-
var HTML_BLOCK_TAGS = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
|
|
4050
|
-
var HTML_BLOCK_OPENER_RE = new RegExp(
|
|
4051
|
-
`^ {0,3}(?:<(?:script|pre|style|textarea)(?:[\\s>]|$)|<!--|<\\?|<![a-zA-Z]|<!\\[CDATA\\[|</?(?:${HTML_BLOCK_TAGS})(?:[\\s/>]|$)|<[a-zA-Z][a-zA-Z0-9-]*(?:\\s[^>]*)?/?>[ \\t]*\\r?$|</[a-zA-Z][a-zA-Z0-9-]*[ \\t]*>[ \\t]*\\r?$)`,
|
|
4052
|
-
"i"
|
|
4053
|
-
);
|
|
4054
|
-
function scanHeadings(content, options = {}) {
|
|
4055
|
-
const { skipFrontmatter = true, includeRawHtml = true, skipFences = true } = options;
|
|
4056
|
-
const out = [];
|
|
4057
|
-
const lines = content.split("\n");
|
|
4058
|
-
const fences = skipFences ? createFenceTracker() : null;
|
|
4059
|
-
let start = 0;
|
|
4060
|
-
if (skipFrontmatter && lines[0]?.trim() === "---") {
|
|
4061
|
-
for (let i = 1; i < lines.length; i++) {
|
|
4062
|
-
if (lines[i].trim() === "---" || lines[i].trim() === "...") {
|
|
4063
|
-
start = i + 1;
|
|
4064
|
-
break;
|
|
4065
|
-
}
|
|
4066
|
-
}
|
|
4067
|
-
}
|
|
4068
|
-
let setextRun = null;
|
|
4069
|
-
for (let i = start; i < lines.length; i++) {
|
|
4070
|
-
const line = lines[i];
|
|
4071
|
-
if (fences) {
|
|
4072
|
-
const role = fences.push(line);
|
|
4073
|
-
if (role !== "text") {
|
|
4074
|
-
setextRun = null;
|
|
4075
|
-
continue;
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
const prefix = CONTAINER_PREFIX_RE.exec(line)?.[0] ?? "";
|
|
4079
|
-
const body = prefix ? line.slice(prefix.length) : line;
|
|
4080
|
-
const setext = SETEXT_UNDERLINE_RE.exec(body);
|
|
4081
|
-
if (setext) {
|
|
4082
|
-
if (setextRun && !setextRun.disqualified && setextRun.prefix === prefix) {
|
|
4083
|
-
out.push({
|
|
4084
|
-
line: setextRun.line,
|
|
4085
|
-
level: setext[1][0] === "=" ? 1 : 2,
|
|
4086
|
-
text: setextRun.lines.join("\n")
|
|
4087
|
-
});
|
|
4088
|
-
}
|
|
4089
|
-
setextRun = null;
|
|
4090
|
-
continue;
|
|
4091
|
-
}
|
|
4092
|
-
const atx = ATX_HEADING_RE.exec(body) ?? ATX_EMPTY_RE.exec(body);
|
|
4093
|
-
if (atx) {
|
|
4094
|
-
out.push({ line: i + 1, level: atx[1].length, text: (atx[2] ?? "").trim() });
|
|
4095
|
-
setextRun = null;
|
|
4096
|
-
continue;
|
|
4097
|
-
}
|
|
4098
|
-
if (includeRawHtml && line.indexOf("<") !== -1) {
|
|
4099
|
-
RAW_HEADING_RE.lastIndex = 0;
|
|
4100
|
-
let raw;
|
|
4101
|
-
let matched = false;
|
|
4102
|
-
while ((raw = RAW_HEADING_RE.exec(line)) !== null) {
|
|
4103
|
-
matched = true;
|
|
4104
|
-
out.push({
|
|
4105
|
-
line: i + 1,
|
|
4106
|
-
level: Number(raw[1]),
|
|
4107
|
-
text: raw[2].replace(/<[^>]*>/g, "").trim()
|
|
4108
|
-
});
|
|
4109
|
-
}
|
|
4110
|
-
if (matched) {
|
|
4111
|
-
setextRun = null;
|
|
4112
|
-
continue;
|
|
4113
|
-
}
|
|
4114
|
-
}
|
|
4115
|
-
if (isBlankLine(body) || THEMATIC_BREAK_RE.test(body)) {
|
|
4116
|
-
setextRun = null;
|
|
4117
|
-
continue;
|
|
4118
|
-
}
|
|
4119
|
-
if (setextRun && setextRun.prefix === prefix) {
|
|
4120
|
-
setextRun.lines.push(body.trim());
|
|
4121
|
-
} else {
|
|
4122
|
-
setextRun = {
|
|
4123
|
-
line: i + 1,
|
|
4124
|
-
prefix,
|
|
4125
|
-
lines: [body.trim()],
|
|
4126
|
-
disqualified: HTML_BLOCK_OPENER_RE.test(body)
|
|
4127
|
-
};
|
|
4128
|
-
}
|
|
4129
|
-
}
|
|
4130
|
-
return out;
|
|
4131
|
-
}
|
|
4132
|
-
function createHeadingIdDeduper() {
|
|
4133
|
-
const counts = {};
|
|
4134
|
-
return (cleanId) => {
|
|
4135
|
-
if (counts[cleanId]) {
|
|
4136
|
-
counts[cleanId]++;
|
|
4137
|
-
return `${cleanId}-${counts[cleanId]}`;
|
|
4138
|
-
}
|
|
4139
|
-
counts[cleanId] = 1;
|
|
4140
|
-
return cleanId;
|
|
4141
|
-
};
|
|
4142
|
-
}
|
|
4143
|
-
|
|
4144
3999
|
// src/utils/markdown-to-plain.ts
|
|
4145
4000
|
function stripInlineMarkdown(s) {
|
|
4146
4001
|
return s.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/`([^`]+)`/g, "$1");
|
|
@@ -4171,26 +4026,50 @@ var DEFAULT_OPTIONS = {
|
|
|
4171
4026
|
function extractSections(markdown, options = {}) {
|
|
4172
4027
|
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
4173
4028
|
const sections = [];
|
|
4174
|
-
const
|
|
4175
|
-
const
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4029
|
+
const lines = markdown.split("\n");
|
|
4030
|
+
const idCounts = {};
|
|
4031
|
+
let inCodeBlock = false;
|
|
4032
|
+
let inYamlBlock = false;
|
|
4033
|
+
for (const line of lines) {
|
|
4034
|
+
if (opts.skipCodeAndYamlBlocks) {
|
|
4035
|
+
if (line.startsWith("```")) {
|
|
4036
|
+
inCodeBlock = !inCodeBlock;
|
|
4037
|
+
continue;
|
|
4038
|
+
}
|
|
4039
|
+
if (line === "---") {
|
|
4040
|
+
inYamlBlock = !inYamlBlock;
|
|
4041
|
+
continue;
|
|
4042
|
+
}
|
|
4043
|
+
if (inCodeBlock || inYamlBlock) continue;
|
|
4044
|
+
}
|
|
4045
|
+
const pattern = new RegExp(`^(#{1,${opts.maxLevel}})\\s+(.+)`);
|
|
4046
|
+
const match = line.match(pattern);
|
|
4047
|
+
if (!match) continue;
|
|
4048
|
+
const level = match[1].length;
|
|
4049
|
+
if (level > opts.maxLevel) continue;
|
|
4050
|
+
let title = match[2].trim();
|
|
4182
4051
|
if (opts.stripFormattingMarkers) {
|
|
4183
4052
|
title = stripInlineMarkdown(title).trim();
|
|
4184
4053
|
}
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4054
|
+
let baseId = title;
|
|
4055
|
+
if (opts.removeEmojis) {
|
|
4056
|
+
baseId = baseId.replace(
|
|
4057
|
+
/[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]/gu,
|
|
4058
|
+
""
|
|
4059
|
+
).trim();
|
|
4060
|
+
}
|
|
4061
|
+
baseId = baseId.toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/^-+|-+$/g, "");
|
|
4188
4062
|
const cleanId = baseId || `section-${sections.length + 1}`;
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4063
|
+
let id = cleanId;
|
|
4064
|
+
if (opts.handleDuplicateIds) {
|
|
4065
|
+
if (idCounts[cleanId]) {
|
|
4066
|
+
idCounts[cleanId]++;
|
|
4067
|
+
id = `${cleanId}-${idCounts[cleanId]}`;
|
|
4068
|
+
} else {
|
|
4069
|
+
idCounts[cleanId] = 1;
|
|
4070
|
+
}
|
|
4071
|
+
}
|
|
4072
|
+
sections.push({ id, title, level });
|
|
4194
4073
|
}
|
|
4195
4074
|
return sections;
|
|
4196
4075
|
}
|
|
@@ -4356,7 +4235,6 @@ exports.DEV_SECTION_PARAM_KEYS = DEV_SECTION_PARAM_KEYS;
|
|
|
4356
4235
|
exports.ELAPSED_MS_FIELD = ELAPSED_MS_FIELD;
|
|
4357
4236
|
exports.FIRST_TOUCH_ATTRIBUTION_KEY = FIRST_TOUCH_ATTRIBUTION_KEY;
|
|
4358
4237
|
exports.GENERIC_EMAIL_DOMAINS = GENERIC_EMAIL_DOMAINS;
|
|
4359
|
-
exports.HEADING_EMOJI_RE = HEADING_EMOJI_RE;
|
|
4360
4238
|
exports.HEX_PATTERN = HEX_PATTERN;
|
|
4361
4239
|
exports.HONEYPOT_FIELD = HONEYPOT_FIELD;
|
|
4362
4240
|
exports.HUB_HEADER_OFFSET_PX = HUB_HEADER_OFFSET_PX;
|
|
@@ -4399,8 +4277,6 @@ exports.clearWalkthroughDismissal = clearWalkthroughDismissal;
|
|
|
4399
4277
|
exports.clickupTaskUrl = clickupTaskUrl;
|
|
4400
4278
|
exports.cn = cn;
|
|
4401
4279
|
exports.consumeAccessCode = consumeAccessCode;
|
|
4402
|
-
exports.createFenceTracker = createFenceTracker;
|
|
4403
|
-
exports.createHeadingIdDeduper = createHeadingIdDeduper;
|
|
4404
4280
|
exports.createUTCTimestamp = createUTCTimestamp;
|
|
4405
4281
|
exports.deepClone = deepClone;
|
|
4406
4282
|
exports.delay = delay;
|
|
@@ -4524,7 +4400,6 @@ exports.getTrendColors = getTrendColors;
|
|
|
4524
4400
|
exports.hasGenericEmailDomain = hasGenericEmailDomain;
|
|
4525
4401
|
exports.hexToRgb = hexToRgb2;
|
|
4526
4402
|
exports.isAnnouncementDismissed = isAnnouncementDismissed;
|
|
4527
|
-
exports.isBlankLine = isBlankLine;
|
|
4528
4403
|
exports.isCrossOriginUrl = isCrossOriginUrl;
|
|
4529
4404
|
exports.isDismissedCookieValue = isDismissedCookieValue;
|
|
4530
4405
|
exports.isFigmaSlidesUrl = isFigmaSlidesUrl;
|
|
@@ -4570,19 +4445,15 @@ exports.resolveReleaseCover = resolveReleaseCover;
|
|
|
4570
4445
|
exports.rgbToHex = rgbToHex;
|
|
4571
4446
|
exports.sanitizeLandingUrl = sanitizeLandingUrl;
|
|
4572
4447
|
exports.sanitizeTitleForChat = sanitizeTitleForChat;
|
|
4573
|
-
exports.scanHeadings = scanHeadings;
|
|
4574
4448
|
exports.scrollElementIntoView = scrollElementIntoView;
|
|
4575
4449
|
exports.serializeJsonLd = serializeJsonLd;
|
|
4576
4450
|
exports.setEmbedAuthAdapter = setEmbedAuthAdapter;
|
|
4577
4451
|
exports.setEmbedProxyAuth = setEmbedProxyAuth;
|
|
4578
4452
|
exports.shouldProxyImage = shouldProxyImage;
|
|
4579
|
-
exports.slugifyHeadingBase = slugifyHeadingBase;
|
|
4580
|
-
exports.slugifyHeadingText = slugifyHeadingText;
|
|
4581
4453
|
exports.sortTreeChildren = sortTreeChildren;
|
|
4582
4454
|
exports.splitCsvEnv = splitCsvEnv;
|
|
4583
4455
|
exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown;
|
|
4584
4456
|
exports.stripFolderIndexFromPath = stripFolderIndexFromPath;
|
|
4585
|
-
exports.stripHeadingEmojis = stripHeadingEmojis;
|
|
4586
4457
|
exports.stripHtml = stripHtml;
|
|
4587
4458
|
exports.stripInlineMarkdown = stripInlineMarkdown;
|
|
4588
4459
|
exports.toDocSlug = toDocSlug;
|