@flamingo-stack/openframe-frontend-core 0.0.498-1506.4000.1 → 0.0.498
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-ZHC2BCXK.js → chunk-2OPD6KRB.js} +4 -4
- package/dist/{chunk-5BQWVNRS.cjs → chunk-2R25CGSO.cjs} +62 -62
- package/dist/{chunk-5BQWVNRS.cjs.map → chunk-2R25CGSO.cjs.map} +1 -1
- package/dist/{chunk-242K7LZY.cjs → chunk-4EHQEMN4.cjs} +11 -11
- package/dist/{chunk-242K7LZY.cjs.map → chunk-4EHQEMN4.cjs.map} +1 -1
- package/dist/{chunk-4KKGHPNE.cjs → chunk-4NIBKEED.cjs} +9 -9
- package/dist/{chunk-4KKGHPNE.cjs.map → chunk-4NIBKEED.cjs.map} +1 -1
- package/dist/{chunk-5QWYIPMH.js → chunk-5ZL7PA63.js} +2 -2
- package/dist/{chunk-3VGRZ62V.js → chunk-6GAJETAP.js} +2 -2
- package/dist/{chunk-EO35UHFT.cjs → chunk-A3Z63ZL5.cjs} +60 -60
- package/dist/chunk-A3Z63ZL5.cjs.map +1 -0
- package/dist/{chunk-34C2JV2C.js → chunk-G6ARA2HD.js} +2 -2
- package/dist/{chunk-WNXIG6YY.js → chunk-K5HHLTSG.js} +2 -2
- package/dist/{chunk-42NYDEHH.js → chunk-KK4M4URN.js} +2 -2
- package/dist/{chunk-42SMPKGY.js → chunk-MF3VJKHT.js} +2 -2
- package/dist/{chunk-EORFD5WB.cjs → chunk-MSB3PEPP.cjs} +15 -15
- package/dist/{chunk-EORFD5WB.cjs.map → chunk-MSB3PEPP.cjs.map} +1 -1
- package/dist/{chunk-F7XPMG25.cjs → chunk-MVORKLWX.cjs} +27 -28
- package/dist/chunk-MVORKLWX.cjs.map +1 -0
- package/dist/{chunk-D3LUKR2Y.js → chunk-OYPUQJJ2.js} +10044 -12292
- package/dist/chunk-OYPUQJJ2.js.map +1 -0
- package/dist/{chunk-62TM2RVZ.cjs → chunk-T67MZAQJ.cjs} +26 -26
- package/dist/{chunk-62TM2RVZ.cjs.map → chunk-T67MZAQJ.cjs.map} +1 -1
- package/dist/{chunk-BUBQEZ5J.js → chunk-VLWVM6ZS.js} +2 -2
- package/dist/{chunk-632XJ2ZT.js → chunk-VOOEX4IZ.js} +5 -6
- package/dist/chunk-VOOEX4IZ.js.map +1 -0
- package/dist/{chunk-5ZY5JM4Z.js → chunk-W4XZ3FBZ.js} +10 -10
- package/dist/chunk-W4XZ3FBZ.js.map +1 -0
- package/dist/{chunk-2LYA3RBT.cjs → chunk-XI44QDCD.cjs} +37 -37
- package/dist/{chunk-2LYA3RBT.cjs.map → chunk-XI44QDCD.cjs.map} +1 -1
- package/dist/{chunk-WZCQW4MW.js → chunk-XSNKSMB3.js} +4 -4
- package/dist/{chunk-J3NHQ4JB.cjs → chunk-ZBTIN7RC.cjs} +31 -31
- package/dist/{chunk-J3NHQ4JB.cjs.map → chunk-ZBTIN7RC.cjs.map} +1 -1
- package/dist/{chunk-SS3D3DHL.cjs → chunk-ZEZTITQZ.cjs} +4886 -7134
- package/dist/chunk-ZEZTITQZ.cjs.map +1 -0
- package/dist/{chunk-44C23SSC.cjs → chunk-ZHNWWFIM.cjs} +5 -5
- package/dist/{chunk-44C23SSC.cjs.map → chunk-ZHNWWFIM.cjs.map} +1 -1
- package/dist/{chunk-H6GFQ4AO.cjs → chunk-ZTE32A7C.cjs} +7 -7
- package/dist/{chunk-H6GFQ4AO.cjs.map → chunk-ZTE32A7C.cjs.map} +1 -1
- 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-chunk-catchup.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/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/header.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/navigation/mingo-ai-button.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/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/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 +6 -381
- package/src/components/chat/chat-message-enhanced.tsx +20 -122
- package/src/components/chat/chat-message-list.tsx +132 -409
- 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-chunk-catchup.ts +1 -26
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +825 -254
- 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/__tests__/process-historical-messages-approvals.test.ts +0 -61
- 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/navigation/header.tsx +2 -1
- package/src/components/navigation/mingo-ai-button.tsx +4 -1
- package/src/components/navigation/mobile-nav-panel.tsx +5 -5
- 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/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/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-5ZY5JM4Z.js.map +0 -1
- package/dist/chunk-632XJ2ZT.js.map +0 -1
- package/dist/chunk-D3LUKR2Y.js.map +0 -1
- package/dist/chunk-EO35UHFT.cjs.map +0 -1
- package/dist/chunk-F7XPMG25.cjs.map +0 -1
- package/dist/chunk-SS3D3DHL.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 -250
- 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__/chunk-catchup-dialog-staleness.test.ts +0 -92
- 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 -806
- package/src/components/chat/stream/__tests__/chat-stream-reducer-golden.test.ts +0 -467
- package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +0 -1248
- 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 -105
- package/src/components/chat/stream/chat-dialog-store.ts +0 -536
- package/src/components/chat/stream/chat-stream-reducer.ts +0 -1876
- 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 -2540
- package/src/components/ui/markdown/__tests__/mermaid-security.test.ts +0 -176
- package/src/components/ui/markdown/__tests__/mermaid-stale-render.test.tsx +0 -151
- package/src/components/ui/markdown/__tests__/sanitize-invariant.test.ts +0 -354
- package/src/components/ui/markdown/__tests__/sanitize-render.test.tsx +0 -118
- package/src/components/ui/markdown/__tests__/streaming.test.tsx +0 -436
- 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 -323
- 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 -3584
- package/src/components/ui/markdown/simple-markdown-renderer.tsx +0 -28
- package/src/components/ui/markdown/streaming.ts +0 -390
- 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-ZHC2BCXK.js.map → chunk-2OPD6KRB.js.map} +0 -0
- /package/dist/{chunk-5QWYIPMH.js.map → chunk-5ZL7PA63.js.map} +0 -0
- /package/dist/{chunk-3VGRZ62V.js.map → chunk-6GAJETAP.js.map} +0 -0
- /package/dist/{chunk-34C2JV2C.js.map → chunk-G6ARA2HD.js.map} +0 -0
- /package/dist/{chunk-WNXIG6YY.js.map → chunk-K5HHLTSG.js.map} +0 -0
- /package/dist/{chunk-42NYDEHH.js.map → chunk-KK4M4URN.js.map} +0 -0
- /package/dist/{chunk-42SMPKGY.js.map → chunk-MF3VJKHT.js.map} +0 -0
- /package/dist/{chunk-BUBQEZ5J.js.map → chunk-VLWVM6ZS.js.map} +0 -0
- /package/dist/{chunk-WZCQW4MW.js.map → chunk-XSNKSMB3.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,
|
|
@@ -671,17 +662,13 @@ import {
|
|
|
671
662
|
buildDefaultHref,
|
|
672
663
|
buildDiscussAddendum,
|
|
673
664
|
buildDocumentTree,
|
|
674
|
-
buildEffectiveTagSet,
|
|
675
|
-
buildHeadingIdMap,
|
|
676
665
|
buildListUrl,
|
|
677
666
|
buildNatsWsUrl,
|
|
678
667
|
buildProductReleaseCardProps,
|
|
679
|
-
buildSanitizeSchema,
|
|
680
668
|
buildStreamFrames,
|
|
681
669
|
buildSuggestionUrl,
|
|
682
670
|
canonicalContentRefType,
|
|
683
671
|
captureFirstTouchAttribution,
|
|
684
|
-
cardAwareUrlTransform,
|
|
685
672
|
changelogLabels,
|
|
686
673
|
chatChipClass,
|
|
687
674
|
cleanEmailDomain,
|
|
@@ -692,20 +679,12 @@ import {
|
|
|
692
679
|
clearWalkthroughDismissal,
|
|
693
680
|
clickupTaskUrl,
|
|
694
681
|
columnFromTicketStatus,
|
|
695
|
-
completeStreamingTail,
|
|
696
682
|
computeHistoryPrepend,
|
|
697
683
|
computeIsNewTab,
|
|
698
|
-
createChatDialogStore,
|
|
699
|
-
createChatStreamReducer,
|
|
700
684
|
createColumnHelper,
|
|
701
|
-
createDeltaBatcher,
|
|
702
|
-
createEmptyTurnMeta,
|
|
703
|
-
createFenceTracker,
|
|
704
|
-
createHeadingIdDeduper,
|
|
705
685
|
createMessageSegmentAccumulator,
|
|
706
686
|
createUTCTimestamp,
|
|
707
687
|
decideNewTab,
|
|
708
|
-
decodeHistoricalMessageData,
|
|
709
688
|
deepClone,
|
|
710
689
|
defaultBuildProductReleaseCardProps,
|
|
711
690
|
defaultTableIdForDocumentType,
|
|
@@ -719,7 +698,6 @@ import {
|
|
|
719
698
|
dismissWalkthrough,
|
|
720
699
|
ensureBiteIds,
|
|
721
700
|
escapeMarkdownInline,
|
|
722
|
-
escapeUnknownHtmlTags,
|
|
723
701
|
executeNavigation,
|
|
724
702
|
executeNavigationImperative,
|
|
725
703
|
exportToCSV,
|
|
@@ -729,11 +707,10 @@ import {
|
|
|
729
707
|
extractErrorMessages,
|
|
730
708
|
extractImageEdgeColorAsync,
|
|
731
709
|
extractIncompleteMessageState,
|
|
732
|
-
extractIncompleteTailState,
|
|
733
710
|
extractItemId,
|
|
734
711
|
extractItems,
|
|
735
712
|
extractSections,
|
|
736
|
-
|
|
713
|
+
extractTextFromChunk,
|
|
737
714
|
extractYouTubeId,
|
|
738
715
|
faqItemAnchor,
|
|
739
716
|
faqSectionSlug,
|
|
@@ -860,13 +837,15 @@ import {
|
|
|
860
837
|
interleave,
|
|
861
838
|
isAnnouncementDismissed,
|
|
862
839
|
isApprovalNotification,
|
|
863
|
-
|
|
840
|
+
isControlChunk,
|
|
864
841
|
isCrossOriginUrl,
|
|
865
842
|
isDismissedCookieValue,
|
|
843
|
+
isErrorChunk,
|
|
866
844
|
isFigmaSlidesUrl,
|
|
867
845
|
isGenericDomain,
|
|
868
846
|
isGenericWebsiteDomain,
|
|
869
847
|
isHistoricalUserTurn,
|
|
848
|
+
isMetadataChunk,
|
|
870
849
|
isModifierClick,
|
|
871
850
|
isOSPlatform,
|
|
872
851
|
isQuickActionIconSpec,
|
|
@@ -900,6 +879,7 @@ import {
|
|
|
900
879
|
orderContentRefTypes,
|
|
901
880
|
osLabels,
|
|
902
881
|
parseAttributionFromUrl,
|
|
882
|
+
parseChunkToAction,
|
|
903
883
|
parseFaqHash,
|
|
904
884
|
parseScrollAnchor,
|
|
905
885
|
parseWireCommandOverride,
|
|
@@ -907,12 +887,10 @@ import {
|
|
|
907
887
|
pickReadableTextColor,
|
|
908
888
|
processHistoricalMessages,
|
|
909
889
|
processHistoricalMessagesWithErrors,
|
|
910
|
-
processShortcodes,
|
|
911
890
|
programItemToStripProfile,
|
|
912
891
|
ratioToCategory,
|
|
913
892
|
readDismissCookie,
|
|
914
893
|
readLeadingDecisionFrame,
|
|
915
|
-
rehypeStripUnsafe,
|
|
916
894
|
releaseStatusOptions,
|
|
917
895
|
releaseTypeOptions,
|
|
918
896
|
releaseTypeToBadgeColor,
|
|
@@ -928,26 +906,20 @@ import {
|
|
|
928
906
|
resolveSourceIcon,
|
|
929
907
|
resolveSourceRowCTA,
|
|
930
908
|
resolveStatusTagProps,
|
|
931
|
-
resolveTextSizeConfig,
|
|
932
909
|
resolveTicketStatus,
|
|
933
910
|
rgbToHex,
|
|
934
911
|
safeHref,
|
|
935
912
|
sanitizeLandingUrl,
|
|
936
913
|
sanitizeTitleForChat,
|
|
937
914
|
saveDataEnabled,
|
|
938
|
-
scanHeadings,
|
|
939
915
|
serializeJsonLd,
|
|
940
916
|
shellLabels,
|
|
941
917
|
shouldProxyImage,
|
|
942
|
-
slugifyHeadingBase,
|
|
943
|
-
slugifyHeadingText,
|
|
944
918
|
sortBitesByCreatedAtDesc,
|
|
945
919
|
sortTreeChildren,
|
|
946
|
-
splitStreamingBlocks,
|
|
947
920
|
statusBadgeVariants,
|
|
948
921
|
stripChatAttachmentMarkdown,
|
|
949
922
|
stripFolderIndexFromPath,
|
|
950
|
-
stripHeadingEmojis,
|
|
951
923
|
stripHtml,
|
|
952
924
|
stripInlineMarkdown,
|
|
953
925
|
stripSameOriginToPath,
|
|
@@ -974,7 +946,6 @@ import {
|
|
|
974
946
|
useChatAttachments,
|
|
975
947
|
useChatCardItem,
|
|
976
948
|
useChatIdentity,
|
|
977
|
-
useChatStreamReducer,
|
|
978
949
|
useChunkCatchup,
|
|
979
950
|
useCloseOnNavigation,
|
|
980
951
|
useCollapsible,
|
|
@@ -984,7 +955,6 @@ import {
|
|
|
984
955
|
useDynamicTheme,
|
|
985
956
|
useEmptyStateConfig,
|
|
986
957
|
useFiltersDropdown,
|
|
987
|
-
useHeadingIdMap,
|
|
988
958
|
useJetStreamDialogSubscription,
|
|
989
959
|
useLoading,
|
|
990
960
|
useMarqueeSync,
|
|
@@ -995,6 +965,7 @@ import {
|
|
|
995
965
|
useOptionalTimeTracker,
|
|
996
966
|
usePageActionsBottomPadding,
|
|
997
967
|
useProxiedImageUrl,
|
|
968
|
+
useRealtimeChunkProcessor,
|
|
998
969
|
useSSE,
|
|
999
970
|
useScriptedStream,
|
|
1000
971
|
useScrollFade,
|
|
@@ -1018,7 +989,7 @@ import {
|
|
|
1018
989
|
walkthroughDismissCookieName,
|
|
1019
990
|
withFirstTouchAttribution,
|
|
1020
991
|
writeDismissCookie
|
|
1021
|
-
} from "./chunk-
|
|
992
|
+
} from "./chunk-OYPUQJJ2.js";
|
|
1022
993
|
import {
|
|
1023
994
|
CommandApprovalToast,
|
|
1024
995
|
DEFAULT_MIN_FILL_MS,
|
|
@@ -1572,10 +1543,8 @@ export {
|
|
|
1572
1543
|
CveLink,
|
|
1573
1544
|
DEFAULT_CONTENT_SUFFIXES,
|
|
1574
1545
|
DEFAULT_CUSTOM_STATUS_COLOR,
|
|
1575
|
-
DEFAULT_DIALOG_SIDE,
|
|
1576
1546
|
DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID,
|
|
1577
1547
|
DEFAULT_FOLDER_INDEX_FILE,
|
|
1578
|
-
DEFAULT_MAX_REDUCERS,
|
|
1579
1548
|
DEFAULT_MIN_FILL_MS,
|
|
1580
1549
|
DEFAULT_OS_PLATFORM,
|
|
1581
1550
|
DEFAULT_THEME,
|
|
@@ -1717,7 +1686,6 @@ export {
|
|
|
1717
1686
|
GuideDisplay,
|
|
1718
1687
|
GuideModeBanner,
|
|
1719
1688
|
GuideWelcome,
|
|
1720
|
-
HEADING_EMOJI_RE,
|
|
1721
1689
|
HEX_PATTERN,
|
|
1722
1690
|
HONEYPOT_FIELD,
|
|
1723
1691
|
HUB_HEADER_OFFSET_PX,
|
|
@@ -1787,7 +1755,6 @@ export {
|
|
|
1787
1755
|
CheckCircleIcon2 as LucideCheckCircleIcon,
|
|
1788
1756
|
XIcon2 as LucideXIcon,
|
|
1789
1757
|
LumaIcon,
|
|
1790
|
-
MAX_PENDING_RETAIN_KEYS,
|
|
1791
1758
|
MESSAGE_ROLE,
|
|
1792
1759
|
MESSAGE_TYPE,
|
|
1793
1760
|
MOBILE_NAV_PANEL_ID,
|
|
@@ -1796,7 +1763,6 @@ export {
|
|
|
1796
1763
|
MacOSIcon,
|
|
1797
1764
|
MarginCrisisIcon,
|
|
1798
1765
|
MarkdownEditor,
|
|
1799
|
-
MarkdownEngine,
|
|
1800
1766
|
MarqueeWall,
|
|
1801
1767
|
MarqueeWallFades,
|
|
1802
1768
|
MediaGalleryManager,
|
|
@@ -1818,7 +1784,6 @@ export {
|
|
|
1818
1784
|
MenubarSubContent,
|
|
1819
1785
|
MenubarSubTrigger,
|
|
1820
1786
|
MenubarTrigger,
|
|
1821
|
-
MermaidDiagram,
|
|
1822
1787
|
MessageCircleIcon,
|
|
1823
1788
|
MessageSegmentAccumulator,
|
|
1824
1789
|
MiamiCyberGangLogo,
|
|
@@ -1978,7 +1943,6 @@ export {
|
|
|
1978
1943
|
RoadmapCard,
|
|
1979
1944
|
RoadmapCardSkeleton,
|
|
1980
1945
|
RoadmapVoteButton,
|
|
1981
|
-
SAFE_HTML_TAGS,
|
|
1982
1946
|
SCROLL_ANCHOR,
|
|
1983
1947
|
SCROLL_ANCHOR_WIRE_KEY,
|
|
1984
1948
|
SECTION_HEADING_CLASS,
|
|
@@ -1994,7 +1958,6 @@ export {
|
|
|
1994
1958
|
SSOConfigurationIcon,
|
|
1995
1959
|
STICKY_HEADER_OFFSET_PX,
|
|
1996
1960
|
STRIP_CELL_MAX_WIDTH,
|
|
1997
|
-
SVG_TAGS,
|
|
1998
1961
|
SYNTHETIC_REALTIME_ID_PREFIXES,
|
|
1999
1962
|
ScriptArguments,
|
|
2000
1963
|
ScriptGenerationIcon,
|
|
@@ -2079,7 +2042,6 @@ export {
|
|
|
2079
2042
|
TAG_BADGE_CLASS,
|
|
2080
2043
|
TASK_TYPE_LABELS,
|
|
2081
2044
|
TASK_TYPE_TEXT_COLORS,
|
|
2082
|
-
TEXT_SIZE_PRESETS,
|
|
2083
2045
|
THEME_ATTRIBUTE,
|
|
2084
2046
|
THEME_STORAGE_KEY,
|
|
2085
2047
|
TICKET_STATUS_COLOR_PRESETS,
|
|
@@ -2209,19 +2171,15 @@ export {
|
|
|
2209
2171
|
buildDefaultHref,
|
|
2210
2172
|
buildDiscussAddendum,
|
|
2211
2173
|
buildDocumentTree,
|
|
2212
|
-
buildEffectiveTagSet,
|
|
2213
|
-
buildHeadingIdMap,
|
|
2214
2174
|
buildListUrl,
|
|
2215
2175
|
buildNatsWsUrl,
|
|
2216
2176
|
buildOgPlaceholderUrl,
|
|
2217
2177
|
buildProductReleaseCardProps,
|
|
2218
|
-
buildSanitizeSchema,
|
|
2219
2178
|
buildStreamFrames,
|
|
2220
2179
|
buildSuggestionUrl,
|
|
2221
2180
|
buttonVariants,
|
|
2222
2181
|
canonicalContentRefType,
|
|
2223
2182
|
captureFirstTouchAttribution,
|
|
2224
|
-
cardAwareUrlTransform,
|
|
2225
2183
|
changelogLabels,
|
|
2226
2184
|
embedAuthedFetch as chatAuthedFetch,
|
|
2227
2185
|
chatChipClass,
|
|
@@ -2239,24 +2197,16 @@ export {
|
|
|
2239
2197
|
cn,
|
|
2240
2198
|
coerceValue,
|
|
2241
2199
|
columnFromTicketStatus,
|
|
2242
|
-
completeStreamingTail,
|
|
2243
2200
|
computeHistoryPrepend,
|
|
2244
2201
|
computeIsNewTab,
|
|
2245
2202
|
configureAuthenticatedImage,
|
|
2246
2203
|
configureBatchImageFetch,
|
|
2247
2204
|
consumeAccessCode,
|
|
2248
|
-
createChatDialogStore,
|
|
2249
|
-
createChatStreamReducer,
|
|
2250
2205
|
createColumnHelper,
|
|
2251
|
-
createDeltaBatcher,
|
|
2252
|
-
createEmptyTurnMeta,
|
|
2253
|
-
createFenceTracker,
|
|
2254
|
-
createHeadingIdDeduper,
|
|
2255
2206
|
createMessageSegmentAccumulator,
|
|
2256
2207
|
createSearchParams,
|
|
2257
2208
|
createUTCTimestamp,
|
|
2258
2209
|
decideNewTab,
|
|
2259
|
-
decodeHistoricalMessageData,
|
|
2260
2210
|
deepClone,
|
|
2261
2211
|
defaultBuildProductReleaseCardProps,
|
|
2262
2212
|
defaultTableIdForDocumentType,
|
|
@@ -2272,7 +2222,6 @@ export {
|
|
|
2272
2222
|
embedAuthedFetch,
|
|
2273
2223
|
ensureBiteIds,
|
|
2274
2224
|
escapeMarkdownInline,
|
|
2275
|
-
escapeUnknownHtmlTags,
|
|
2276
2225
|
evaluateHumanitySignals,
|
|
2277
2226
|
executeNavigation,
|
|
2278
2227
|
executeNavigationImperative,
|
|
@@ -2284,11 +2233,10 @@ export {
|
|
|
2284
2233
|
extractHumanitySignals,
|
|
2285
2234
|
extractImageEdgeColorAsync,
|
|
2286
2235
|
extractIncompleteMessageState,
|
|
2287
|
-
extractIncompleteTailState,
|
|
2288
2236
|
extractItemId,
|
|
2289
2237
|
extractItems,
|
|
2290
2238
|
extractSections,
|
|
2291
|
-
|
|
2239
|
+
extractTextFromChunk,
|
|
2292
2240
|
extractVariablesFromQuery,
|
|
2293
2241
|
extractYouTubeId,
|
|
2294
2242
|
faqItemAnchor,
|
|
@@ -2438,14 +2386,16 @@ export {
|
|
|
2438
2386
|
introspector,
|
|
2439
2387
|
isAnnouncementDismissed,
|
|
2440
2388
|
isApprovalNotification,
|
|
2441
|
-
|
|
2389
|
+
isControlChunk,
|
|
2442
2390
|
isCrossOriginUrl,
|
|
2443
2391
|
isDismissedCookieValue,
|
|
2392
|
+
isErrorChunk,
|
|
2444
2393
|
isFigmaSlidesUrl,
|
|
2445
2394
|
isGenericDomain,
|
|
2446
2395
|
isGenericWebsiteDomain,
|
|
2447
2396
|
isHistoricalUserTurn,
|
|
2448
2397
|
isInputObjectType,
|
|
2398
|
+
isMetadataChunk,
|
|
2449
2399
|
isModifierClick,
|
|
2450
2400
|
isOSPlatform,
|
|
2451
2401
|
isQuickActionIconSpec,
|
|
@@ -2484,6 +2434,7 @@ export {
|
|
|
2484
2434
|
orderContentRefTypes,
|
|
2485
2435
|
osLabels,
|
|
2486
2436
|
parseAttributionFromUrl,
|
|
2437
|
+
parseChunkToAction,
|
|
2487
2438
|
parseFaqHash,
|
|
2488
2439
|
parseScrollAnchor,
|
|
2489
2440
|
parseWireCommandOverride,
|
|
@@ -2498,13 +2449,11 @@ export {
|
|
|
2498
2449
|
platformSlogans,
|
|
2499
2450
|
processHistoricalMessages,
|
|
2500
2451
|
processHistoricalMessagesWithErrors,
|
|
2501
|
-
processShortcodes,
|
|
2502
2452
|
programItemToStripProfile,
|
|
2503
2453
|
progressColorByVariant,
|
|
2504
2454
|
ratioToCategory,
|
|
2505
2455
|
readDismissCookie,
|
|
2506
2456
|
readLeadingDecisionFrame,
|
|
2507
|
-
rehypeStripUnsafe,
|
|
2508
2457
|
releaseStatusOptions,
|
|
2509
2458
|
releaseTypeOptions,
|
|
2510
2459
|
releaseTypeToBadgeColor,
|
|
@@ -2521,14 +2470,12 @@ export {
|
|
|
2521
2470
|
resolveSourceIcon,
|
|
2522
2471
|
resolveSourceRowCTA,
|
|
2523
2472
|
resolveStatusTagProps,
|
|
2524
|
-
resolveTextSizeConfig,
|
|
2525
2473
|
resolveTicketStatus,
|
|
2526
2474
|
rgbToHex,
|
|
2527
2475
|
safeHref,
|
|
2528
2476
|
sanitizeLandingUrl,
|
|
2529
2477
|
sanitizeTitleForChat,
|
|
2530
2478
|
saveDataEnabled,
|
|
2531
|
-
scanHeadings,
|
|
2532
2479
|
scrollElementIntoView,
|
|
2533
2480
|
serializeJsonLd,
|
|
2534
2481
|
setEmbedProxyAuth as setChatProxyAuth,
|
|
@@ -2540,16 +2487,12 @@ export {
|
|
|
2540
2487
|
shouldProxyImage,
|
|
2541
2488
|
showCommandApprovalToast,
|
|
2542
2489
|
showToast,
|
|
2543
|
-
slugifyHeadingBase,
|
|
2544
|
-
slugifyHeadingText,
|
|
2545
2490
|
sortBitesByCreatedAtDesc,
|
|
2546
2491
|
sortTreeChildren,
|
|
2547
2492
|
splitCsvEnv,
|
|
2548
|
-
splitStreamingBlocks,
|
|
2549
2493
|
statusBadgeVariants,
|
|
2550
2494
|
stripChatAttachmentMarkdown,
|
|
2551
2495
|
stripFolderIndexFromPath,
|
|
2552
|
-
stripHeadingEmojis,
|
|
2553
2496
|
stripHtml,
|
|
2554
2497
|
stripInlineMarkdown,
|
|
2555
2498
|
stripSameOriginToPath,
|
|
@@ -2586,7 +2529,6 @@ export {
|
|
|
2586
2529
|
useChatAttachments,
|
|
2587
2530
|
useChatCardItem,
|
|
2588
2531
|
useChatIdentity,
|
|
2589
|
-
useChatStreamReducer,
|
|
2590
2532
|
useChunkCatchup,
|
|
2591
2533
|
useCloseOnNavigation,
|
|
2592
2534
|
useCollapsible,
|
|
@@ -2604,7 +2546,6 @@ export {
|
|
|
2604
2546
|
useFiltersDropdown,
|
|
2605
2547
|
useFocusTrap,
|
|
2606
2548
|
useHeaderHeight,
|
|
2607
|
-
useHeadingIdMap,
|
|
2608
2549
|
useHorizontalScrollbar,
|
|
2609
2550
|
useHumanitySignals,
|
|
2610
2551
|
useImageEdgeColor,
|
|
@@ -2634,6 +2575,7 @@ export {
|
|
|
2634
2575
|
usePreventScroll,
|
|
2635
2576
|
useProxiedImageUrl,
|
|
2636
2577
|
useQueryParams,
|
|
2578
|
+
useRealtimeChunkProcessor,
|
|
2637
2579
|
useResetOnPageHidden,
|
|
2638
2580
|
useSSE,
|
|
2639
2581
|
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;
|