@flamingo-stack/openframe-frontend-core 0.0.490-1506.3944.1 → 0.0.490
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-5CJR2GZ4.cjs → chunk-2MKUHJ3O.cjs} +31 -31
- package/dist/{chunk-5CJR2GZ4.cjs.map → chunk-2MKUHJ3O.cjs.map} +1 -1
- package/dist/{chunk-S2NHJDKQ.cjs → chunk-3IEVA5AO.cjs} +62 -62
- package/dist/{chunk-S2NHJDKQ.cjs.map → chunk-3IEVA5AO.cjs.map} +1 -1
- package/dist/{chunk-GTWO5NAY.js → chunk-6CFFISUC.js} +2 -2
- package/dist/{chunk-VHG6AX5V.js → chunk-6CJ2K7BD.js} +2 -2
- package/dist/{chunk-4NWARV5I.js → chunk-6QK3ONDD.js} +2 -2
- package/dist/{chunk-YHOIAA2E.cjs → chunk-7I42V2OD.cjs} +60 -60
- package/dist/chunk-7I42V2OD.cjs.map +1 -0
- package/dist/{chunk-T2EGSZFN.js → chunk-AIRNG27G.js} +5 -6
- package/dist/chunk-AIRNG27G.js.map +1 -0
- package/dist/{chunk-NWX7MMF5.cjs → chunk-AW63ET2A.cjs} +15 -15
- package/dist/{chunk-NWX7MMF5.cjs.map → chunk-AW63ET2A.cjs.map} +1 -1
- package/dist/{chunk-TKN5667N.js → chunk-BZMOEWWS.js} +10 -10
- package/dist/chunk-BZMOEWWS.js.map +1 -0
- package/dist/{chunk-DSDZ5T4P.cjs → chunk-D5LQMRPU.cjs} +5 -5
- package/dist/{chunk-DSDZ5T4P.cjs.map → chunk-D5LQMRPU.cjs.map} +1 -1
- package/dist/{chunk-CORIBKHG.js → chunk-EGXCWZYP.js} +2 -2
- package/dist/{chunk-5EYRXSY5.cjs → chunk-EJQUYZXF.cjs} +9 -9
- package/dist/{chunk-5EYRXSY5.cjs.map → chunk-EJQUYZXF.cjs.map} +1 -1
- package/dist/{chunk-P4WTZU6L.cjs → chunk-FY5XAW3H.cjs} +11 -11
- package/dist/{chunk-P4WTZU6L.cjs.map → chunk-FY5XAW3H.cjs.map} +1 -1
- package/dist/{chunk-VQ523ORK.cjs → chunk-GMPYR3MX.cjs} +26 -26
- package/dist/{chunk-VQ523ORK.cjs.map → chunk-GMPYR3MX.cjs.map} +1 -1
- package/dist/{chunk-QSCHCZL3.cjs → chunk-GUTYUMGV.cjs} +7 -7
- package/dist/{chunk-QSCHCZL3.cjs.map → chunk-GUTYUMGV.cjs.map} +1 -1
- package/dist/{chunk-Q6E7VJ4W.cjs → chunk-IEZ3YBAP.cjs} +27 -28
- package/dist/chunk-IEZ3YBAP.cjs.map +1 -0
- package/dist/{chunk-HSACATCD.js → chunk-MPYDX5WX.js} +2 -2
- package/dist/{chunk-RQLBHKXN.js → chunk-NGEFYPY7.js} +2 -2
- package/dist/{chunk-BE6DK7QY.js → chunk-OQIMH2WQ.js} +8985 -11081
- package/dist/chunk-OQIMH2WQ.js.map +1 -0
- package/dist/{chunk-CSYSYJCF.cjs → chunk-UZZT65PQ.cjs} +37 -37
- package/dist/{chunk-CSYSYJCF.cjs.map → chunk-UZZT65PQ.cjs.map} +1 -1
- package/dist/{chunk-YZ2OIYQ3.js → chunk-VDZO6IDR.js} +4 -4
- package/dist/{chunk-UUYRJPGJ.js → chunk-VL2YMDPH.js} +4 -4
- package/dist/{chunk-5LMGFI4J.cjs → chunk-VUXNXWOQ.cjs} +4946 -7042
- package/dist/chunk-VUXNXWOQ.cjs.map +1 -0
- package/dist/{chunk-XQ2B74SI.js → chunk-WLM3F3WU.js} +2 -2
- 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/guide-display.d.ts +14 -0
- package/dist/components/chat/guide-display.d.ts.map +1 -0
- 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 -8
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +1 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +15 -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/component.types.d.ts +6 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +15 -2
- package/dist/components/chat/types/message.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/message-segment-accumulator.d.ts +5 -0
- package/dist/components/chat/utils/message-segment-accumulator.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 -170
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +23 -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/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 -42
- 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 +15 -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 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -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 +80 -163
- package/src/components/chat/chat-message-list.tsx +109 -358
- package/src/components/chat/embeddable-chat.tsx +0 -6
- package/src/components/chat/guide-display.tsx +44 -0
- 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 +1 -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/component.types.ts +9 -0
- package/src/components/chat/types/message.types.ts +17 -1
- 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/message-segment-accumulator.ts +19 -0
- package/src/components/chat/utils/process-historical-messages.ts +390 -352
- 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/stories/ChatMessageEnhanced.stories.tsx +48 -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 -196
- 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 -494
- 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 -478
- 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-5LMGFI4J.cjs.map +0 -1
- package/dist/chunk-BE6DK7QY.js.map +0 -1
- package/dist/chunk-Q6E7VJ4W.cjs.map +0 -1
- package/dist/chunk-T2EGSZFN.js.map +0 -1
- package/dist/chunk-TKN5667N.js.map +0 -1
- package/dist/chunk-YHOIAA2E.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 -307
- 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 -228
- 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 -232
- 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 -252
- package/src/components/chat/__tests__/chat-message-streaming-memo.test.tsx +0 -207
- package/src/components/chat/__tests__/chat-pending-turn.test.tsx +0 -209
- 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 -894
- 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 -1796
- package/src/components/chat/stream/delta-batcher.ts +0 -159
- package/src/components/chat/stream/index.ts +0 -55
- package/src/components/chat/stream/message-mutations.ts +0 -338
- 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 -317
- 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-GTWO5NAY.js.map → chunk-6CFFISUC.js.map} +0 -0
- /package/dist/{chunk-VHG6AX5V.js.map → chunk-6CJ2K7BD.js.map} +0 -0
- /package/dist/{chunk-4NWARV5I.js.map → chunk-6QK3ONDD.js.map} +0 -0
- /package/dist/{chunk-CORIBKHG.js.map → chunk-EGXCWZYP.js.map} +0 -0
- /package/dist/{chunk-HSACATCD.js.map → chunk-MPYDX5WX.js.map} +0 -0
- /package/dist/{chunk-RQLBHKXN.js.map → chunk-NGEFYPY7.js.map} +0 -0
- /package/dist/{chunk-YZ2OIYQ3.js.map → chunk-VDZO6IDR.js.map} +0 -0
- /package/dist/{chunk-UUYRJPGJ.js.map → chunk-VL2YMDPH.js.map} +0 -0
- /package/dist/{chunk-XQ2B74SI.js.map → chunk-WLM3F3WU.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,
|
|
@@ -290,9 +288,9 @@ import {
|
|
|
290
288
|
GitHubActivityCard,
|
|
291
289
|
GitHubActivityCardSkeleton,
|
|
292
290
|
GitHubReleasesManager,
|
|
291
|
+
GuideDisplay,
|
|
293
292
|
GuideModeBanner,
|
|
294
293
|
GuideWelcome,
|
|
295
|
-
HEADING_EMOJI_RE,
|
|
296
294
|
HEX_PATTERN,
|
|
297
295
|
Header,
|
|
298
296
|
HeaderButton,
|
|
@@ -339,14 +337,12 @@ import {
|
|
|
339
337
|
LogSeverityDot,
|
|
340
338
|
LoginForm,
|
|
341
339
|
LogsList,
|
|
342
|
-
MAX_PENDING_RETAIN_KEYS,
|
|
343
340
|
MESSAGE_ROLE,
|
|
344
341
|
MESSAGE_TYPE,
|
|
345
342
|
MOBILE_NAV_PANEL_ID,
|
|
346
343
|
MUX_IMAGE_ORIGIN,
|
|
347
344
|
MUX_STREAM_ORIGIN,
|
|
348
345
|
MarkdownEditor,
|
|
349
|
-
MarkdownEngine,
|
|
350
346
|
MarqueeWall,
|
|
351
347
|
MarqueeWallFades,
|
|
352
348
|
MediaGalleryManager,
|
|
@@ -368,7 +364,6 @@ import {
|
|
|
368
364
|
MenubarSubContent,
|
|
369
365
|
MenubarSubTrigger,
|
|
370
366
|
MenubarTrigger,
|
|
371
|
-
MermaidDiagram,
|
|
372
367
|
MessageSegmentAccumulator,
|
|
373
368
|
MingoAiButton,
|
|
374
369
|
MingoChatHistory,
|
|
@@ -492,7 +487,6 @@ import {
|
|
|
492
487
|
RoadmapCard,
|
|
493
488
|
RoadmapCardSkeleton,
|
|
494
489
|
RoadmapVoteButton,
|
|
495
|
-
SAFE_HTML_TAGS,
|
|
496
490
|
SCROLL_ANCHOR,
|
|
497
491
|
SCROLL_ANCHOR_WIRE_KEY,
|
|
498
492
|
SECTION_HEADING_CLASS,
|
|
@@ -505,7 +499,6 @@ import {
|
|
|
505
499
|
SOURCE_ICON_NAMES,
|
|
506
500
|
SOURCE_LABELS_BY_TABLE,
|
|
507
501
|
STRIP_CELL_MAX_WIDTH,
|
|
508
|
-
SVG_TAGS,
|
|
509
502
|
SYNTHETIC_REALTIME_ID_PREFIXES,
|
|
510
503
|
ScriptArguments,
|
|
511
504
|
ScriptInfoSection,
|
|
@@ -563,7 +556,6 @@ import {
|
|
|
563
556
|
TAG_BADGE_CLASS,
|
|
564
557
|
TASK_TYPE_LABELS,
|
|
565
558
|
TASK_TYPE_TEXT_COLORS,
|
|
566
|
-
TEXT_SIZE_PRESETS,
|
|
567
559
|
THEME_ATTRIBUTE,
|
|
568
560
|
THEME_STORAGE_KEY,
|
|
569
561
|
TICKET_STATUS_COLOR_PRESETS,
|
|
@@ -669,17 +661,13 @@ import {
|
|
|
669
661
|
buildDefaultHref,
|
|
670
662
|
buildDiscussAddendum,
|
|
671
663
|
buildDocumentTree,
|
|
672
|
-
buildEffectiveTagSet,
|
|
673
|
-
buildHeadingIdMap,
|
|
674
664
|
buildListUrl,
|
|
675
665
|
buildNatsWsUrl,
|
|
676
666
|
buildProductReleaseCardProps,
|
|
677
|
-
buildSanitizeSchema,
|
|
678
667
|
buildStreamFrames,
|
|
679
668
|
buildSuggestionUrl,
|
|
680
669
|
canonicalContentRefType,
|
|
681
670
|
captureFirstTouchAttribution,
|
|
682
|
-
cardAwareUrlTransform,
|
|
683
671
|
changelogLabels,
|
|
684
672
|
chatChipClass,
|
|
685
673
|
cleanEmailDomain,
|
|
@@ -690,20 +678,12 @@ import {
|
|
|
690
678
|
clearWalkthroughDismissal,
|
|
691
679
|
clickupTaskUrl,
|
|
692
680
|
columnFromTicketStatus,
|
|
693
|
-
completeStreamingTail,
|
|
694
681
|
computeHistoryPrepend,
|
|
695
682
|
computeIsNewTab,
|
|
696
|
-
createChatDialogStore,
|
|
697
|
-
createChatStreamReducer,
|
|
698
683
|
createColumnHelper,
|
|
699
|
-
createDeltaBatcher,
|
|
700
|
-
createEmptyTurnMeta,
|
|
701
|
-
createFenceTracker,
|
|
702
|
-
createHeadingIdDeduper,
|
|
703
684
|
createMessageSegmentAccumulator,
|
|
704
685
|
createUTCTimestamp,
|
|
705
686
|
decideNewTab,
|
|
706
|
-
decodeHistoricalMessageData,
|
|
707
687
|
deepClone,
|
|
708
688
|
defaultBuildProductReleaseCardProps,
|
|
709
689
|
defaultTableIdForDocumentType,
|
|
@@ -717,7 +697,6 @@ import {
|
|
|
717
697
|
dismissWalkthrough,
|
|
718
698
|
ensureBiteIds,
|
|
719
699
|
escapeMarkdownInline,
|
|
720
|
-
escapeUnknownHtmlTags,
|
|
721
700
|
executeNavigation,
|
|
722
701
|
executeNavigationImperative,
|
|
723
702
|
exportToCSV,
|
|
@@ -727,11 +706,10 @@ import {
|
|
|
727
706
|
extractErrorMessages,
|
|
728
707
|
extractImageEdgeColorAsync,
|
|
729
708
|
extractIncompleteMessageState,
|
|
730
|
-
extractIncompleteTailState,
|
|
731
709
|
extractItemId,
|
|
732
710
|
extractItems,
|
|
733
711
|
extractSections,
|
|
734
|
-
|
|
712
|
+
extractTextFromChunk,
|
|
735
713
|
extractYouTubeId,
|
|
736
714
|
faqItemAnchor,
|
|
737
715
|
faqSectionSlug,
|
|
@@ -858,13 +836,15 @@ import {
|
|
|
858
836
|
interleave,
|
|
859
837
|
isAnnouncementDismissed,
|
|
860
838
|
isApprovalNotification,
|
|
861
|
-
|
|
839
|
+
isControlChunk,
|
|
862
840
|
isCrossOriginUrl,
|
|
863
841
|
isDismissedCookieValue,
|
|
842
|
+
isErrorChunk,
|
|
864
843
|
isFigmaSlidesUrl,
|
|
865
844
|
isGenericDomain,
|
|
866
845
|
isGenericWebsiteDomain,
|
|
867
846
|
isHistoricalUserTurn,
|
|
847
|
+
isMetadataChunk,
|
|
868
848
|
isModifierClick,
|
|
869
849
|
isOSPlatform,
|
|
870
850
|
isQuickActionIconSpec,
|
|
@@ -898,6 +878,7 @@ import {
|
|
|
898
878
|
orderContentRefTypes,
|
|
899
879
|
osLabels,
|
|
900
880
|
parseAttributionFromUrl,
|
|
881
|
+
parseChunkToAction,
|
|
901
882
|
parseFaqHash,
|
|
902
883
|
parseScrollAnchor,
|
|
903
884
|
parseWireCommandOverride,
|
|
@@ -905,12 +886,10 @@ import {
|
|
|
905
886
|
pickReadableTextColor,
|
|
906
887
|
processHistoricalMessages,
|
|
907
888
|
processHistoricalMessagesWithErrors,
|
|
908
|
-
processShortcodes,
|
|
909
889
|
programItemToStripProfile,
|
|
910
890
|
ratioToCategory,
|
|
911
891
|
readDismissCookie,
|
|
912
892
|
readLeadingDecisionFrame,
|
|
913
|
-
rehypeStripUnsafe,
|
|
914
893
|
releaseStatusOptions,
|
|
915
894
|
releaseTypeOptions,
|
|
916
895
|
releaseTypeToBadgeColor,
|
|
@@ -926,26 +905,20 @@ import {
|
|
|
926
905
|
resolveSourceIcon,
|
|
927
906
|
resolveSourceRowCTA,
|
|
928
907
|
resolveStatusTagProps,
|
|
929
|
-
resolveTextSizeConfig,
|
|
930
908
|
resolveTicketStatus,
|
|
931
909
|
rgbToHex,
|
|
932
910
|
safeHref,
|
|
933
911
|
sanitizeLandingUrl,
|
|
934
912
|
sanitizeTitleForChat,
|
|
935
913
|
saveDataEnabled,
|
|
936
|
-
scanHeadings,
|
|
937
914
|
serializeJsonLd,
|
|
938
915
|
shellLabels,
|
|
939
916
|
shouldProxyImage,
|
|
940
|
-
slugifyHeadingBase,
|
|
941
|
-
slugifyHeadingText,
|
|
942
917
|
sortBitesByCreatedAtDesc,
|
|
943
918
|
sortTreeChildren,
|
|
944
|
-
splitStreamingBlocks,
|
|
945
919
|
statusBadgeVariants,
|
|
946
920
|
stripChatAttachmentMarkdown,
|
|
947
921
|
stripFolderIndexFromPath,
|
|
948
|
-
stripHeadingEmojis,
|
|
949
922
|
stripHtml,
|
|
950
923
|
stripInlineMarkdown,
|
|
951
924
|
stripSameOriginToPath,
|
|
@@ -972,7 +945,6 @@ import {
|
|
|
972
945
|
useChatAttachments,
|
|
973
946
|
useChatCardItem,
|
|
974
947
|
useChatIdentity,
|
|
975
|
-
useChatStreamReducer,
|
|
976
948
|
useChunkCatchup,
|
|
977
949
|
useCloseOnNavigation,
|
|
978
950
|
useCollapsible,
|
|
@@ -982,7 +954,6 @@ import {
|
|
|
982
954
|
useDynamicTheme,
|
|
983
955
|
useEmptyStateConfig,
|
|
984
956
|
useFiltersDropdown,
|
|
985
|
-
useHeadingIdMap,
|
|
986
957
|
useJetStreamDialogSubscription,
|
|
987
958
|
useLoading,
|
|
988
959
|
useMarqueeSync,
|
|
@@ -993,6 +964,7 @@ import {
|
|
|
993
964
|
useOptionalTimeTracker,
|
|
994
965
|
usePageActionsBottomPadding,
|
|
995
966
|
useProxiedImageUrl,
|
|
967
|
+
useRealtimeChunkProcessor,
|
|
996
968
|
useSSE,
|
|
997
969
|
useScriptedStream,
|
|
998
970
|
useScrollFade,
|
|
@@ -1016,7 +988,7 @@ import {
|
|
|
1016
988
|
walkthroughDismissCookieName,
|
|
1017
989
|
withFirstTouchAttribution,
|
|
1018
990
|
writeDismissCookie
|
|
1019
|
-
} from "./chunk-
|
|
991
|
+
} from "./chunk-OQIMH2WQ.js";
|
|
1020
992
|
import {
|
|
1021
993
|
CommandApprovalToast,
|
|
1022
994
|
DEFAULT_MIN_FILL_MS,
|
|
@@ -1569,10 +1541,8 @@ export {
|
|
|
1569
1541
|
CveLink,
|
|
1570
1542
|
DEFAULT_CONTENT_SUFFIXES,
|
|
1571
1543
|
DEFAULT_CUSTOM_STATUS_COLOR,
|
|
1572
|
-
DEFAULT_DIALOG_SIDE,
|
|
1573
1544
|
DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID,
|
|
1574
1545
|
DEFAULT_FOLDER_INDEX_FILE,
|
|
1575
|
-
DEFAULT_MAX_REDUCERS,
|
|
1576
1546
|
DEFAULT_MIN_FILL_MS,
|
|
1577
1547
|
DEFAULT_OS_PLATFORM,
|
|
1578
1548
|
DEFAULT_THEME,
|
|
@@ -1711,9 +1681,9 @@ export {
|
|
|
1711
1681
|
GoogleLogo,
|
|
1712
1682
|
GraphQLIntrospector,
|
|
1713
1683
|
GridViewIcon,
|
|
1684
|
+
GuideDisplay,
|
|
1714
1685
|
GuideModeBanner,
|
|
1715
1686
|
GuideWelcome,
|
|
1716
|
-
HEADING_EMOJI_RE,
|
|
1717
1687
|
HEX_PATTERN,
|
|
1718
1688
|
HONEYPOT_FIELD,
|
|
1719
1689
|
HUB_HEADER_OFFSET_PX,
|
|
@@ -1783,7 +1753,6 @@ export {
|
|
|
1783
1753
|
CheckCircleIcon2 as LucideCheckCircleIcon,
|
|
1784
1754
|
XIcon2 as LucideXIcon,
|
|
1785
1755
|
LumaIcon,
|
|
1786
|
-
MAX_PENDING_RETAIN_KEYS,
|
|
1787
1756
|
MESSAGE_ROLE,
|
|
1788
1757
|
MESSAGE_TYPE,
|
|
1789
1758
|
MOBILE_NAV_PANEL_ID,
|
|
@@ -1792,7 +1761,6 @@ export {
|
|
|
1792
1761
|
MacOSIcon,
|
|
1793
1762
|
MarginCrisisIcon,
|
|
1794
1763
|
MarkdownEditor,
|
|
1795
|
-
MarkdownEngine,
|
|
1796
1764
|
MarqueeWall,
|
|
1797
1765
|
MarqueeWallFades,
|
|
1798
1766
|
MediaGalleryManager,
|
|
@@ -1814,7 +1782,6 @@ export {
|
|
|
1814
1782
|
MenubarSubContent,
|
|
1815
1783
|
MenubarSubTrigger,
|
|
1816
1784
|
MenubarTrigger,
|
|
1817
|
-
MermaidDiagram,
|
|
1818
1785
|
MessageCircleIcon,
|
|
1819
1786
|
MessageSegmentAccumulator,
|
|
1820
1787
|
MiamiCyberGangLogo,
|
|
@@ -1974,7 +1941,6 @@ export {
|
|
|
1974
1941
|
RoadmapCard,
|
|
1975
1942
|
RoadmapCardSkeleton,
|
|
1976
1943
|
RoadmapVoteButton,
|
|
1977
|
-
SAFE_HTML_TAGS,
|
|
1978
1944
|
SCROLL_ANCHOR,
|
|
1979
1945
|
SCROLL_ANCHOR_WIRE_KEY,
|
|
1980
1946
|
SECTION_HEADING_CLASS,
|
|
@@ -1990,7 +1956,6 @@ export {
|
|
|
1990
1956
|
SSOConfigurationIcon,
|
|
1991
1957
|
STICKY_HEADER_OFFSET_PX,
|
|
1992
1958
|
STRIP_CELL_MAX_WIDTH,
|
|
1993
|
-
SVG_TAGS,
|
|
1994
1959
|
SYNTHETIC_REALTIME_ID_PREFIXES,
|
|
1995
1960
|
ScriptArguments,
|
|
1996
1961
|
ScriptGenerationIcon,
|
|
@@ -2075,7 +2040,6 @@ export {
|
|
|
2075
2040
|
TAG_BADGE_CLASS,
|
|
2076
2041
|
TASK_TYPE_LABELS,
|
|
2077
2042
|
TASK_TYPE_TEXT_COLORS,
|
|
2078
|
-
TEXT_SIZE_PRESETS,
|
|
2079
2043
|
THEME_ATTRIBUTE,
|
|
2080
2044
|
THEME_STORAGE_KEY,
|
|
2081
2045
|
TICKET_STATUS_COLOR_PRESETS,
|
|
@@ -2204,19 +2168,15 @@ export {
|
|
|
2204
2168
|
buildDefaultHref,
|
|
2205
2169
|
buildDiscussAddendum,
|
|
2206
2170
|
buildDocumentTree,
|
|
2207
|
-
buildEffectiveTagSet,
|
|
2208
|
-
buildHeadingIdMap,
|
|
2209
2171
|
buildListUrl,
|
|
2210
2172
|
buildNatsWsUrl,
|
|
2211
2173
|
buildOgPlaceholderUrl,
|
|
2212
2174
|
buildProductReleaseCardProps,
|
|
2213
|
-
buildSanitizeSchema,
|
|
2214
2175
|
buildStreamFrames,
|
|
2215
2176
|
buildSuggestionUrl,
|
|
2216
2177
|
buttonVariants,
|
|
2217
2178
|
canonicalContentRefType,
|
|
2218
2179
|
captureFirstTouchAttribution,
|
|
2219
|
-
cardAwareUrlTransform,
|
|
2220
2180
|
changelogLabels,
|
|
2221
2181
|
embedAuthedFetch as chatAuthedFetch,
|
|
2222
2182
|
chatChipClass,
|
|
@@ -2234,24 +2194,16 @@ export {
|
|
|
2234
2194
|
cn,
|
|
2235
2195
|
coerceValue,
|
|
2236
2196
|
columnFromTicketStatus,
|
|
2237
|
-
completeStreamingTail,
|
|
2238
2197
|
computeHistoryPrepend,
|
|
2239
2198
|
computeIsNewTab,
|
|
2240
2199
|
configureAuthenticatedImage,
|
|
2241
2200
|
configureBatchImageFetch,
|
|
2242
2201
|
consumeAccessCode,
|
|
2243
|
-
createChatDialogStore,
|
|
2244
|
-
createChatStreamReducer,
|
|
2245
2202
|
createColumnHelper,
|
|
2246
|
-
createDeltaBatcher,
|
|
2247
|
-
createEmptyTurnMeta,
|
|
2248
|
-
createFenceTracker,
|
|
2249
|
-
createHeadingIdDeduper,
|
|
2250
2203
|
createMessageSegmentAccumulator,
|
|
2251
2204
|
createSearchParams,
|
|
2252
2205
|
createUTCTimestamp,
|
|
2253
2206
|
decideNewTab,
|
|
2254
|
-
decodeHistoricalMessageData,
|
|
2255
2207
|
deepClone,
|
|
2256
2208
|
defaultBuildProductReleaseCardProps,
|
|
2257
2209
|
defaultTableIdForDocumentType,
|
|
@@ -2267,7 +2219,6 @@ export {
|
|
|
2267
2219
|
embedAuthedFetch,
|
|
2268
2220
|
ensureBiteIds,
|
|
2269
2221
|
escapeMarkdownInline,
|
|
2270
|
-
escapeUnknownHtmlTags,
|
|
2271
2222
|
evaluateHumanitySignals,
|
|
2272
2223
|
executeNavigation,
|
|
2273
2224
|
executeNavigationImperative,
|
|
@@ -2279,11 +2230,10 @@ export {
|
|
|
2279
2230
|
extractHumanitySignals,
|
|
2280
2231
|
extractImageEdgeColorAsync,
|
|
2281
2232
|
extractIncompleteMessageState,
|
|
2282
|
-
extractIncompleteTailState,
|
|
2283
2233
|
extractItemId,
|
|
2284
2234
|
extractItems,
|
|
2285
2235
|
extractSections,
|
|
2286
|
-
|
|
2236
|
+
extractTextFromChunk,
|
|
2287
2237
|
extractVariablesFromQuery,
|
|
2288
2238
|
extractYouTubeId,
|
|
2289
2239
|
faqItemAnchor,
|
|
@@ -2433,14 +2383,16 @@ export {
|
|
|
2433
2383
|
introspector,
|
|
2434
2384
|
isAnnouncementDismissed,
|
|
2435
2385
|
isApprovalNotification,
|
|
2436
|
-
|
|
2386
|
+
isControlChunk,
|
|
2437
2387
|
isCrossOriginUrl,
|
|
2438
2388
|
isDismissedCookieValue,
|
|
2389
|
+
isErrorChunk,
|
|
2439
2390
|
isFigmaSlidesUrl,
|
|
2440
2391
|
isGenericDomain,
|
|
2441
2392
|
isGenericWebsiteDomain,
|
|
2442
2393
|
isHistoricalUserTurn,
|
|
2443
2394
|
isInputObjectType,
|
|
2395
|
+
isMetadataChunk,
|
|
2444
2396
|
isModifierClick,
|
|
2445
2397
|
isOSPlatform,
|
|
2446
2398
|
isQuickActionIconSpec,
|
|
@@ -2479,6 +2431,7 @@ export {
|
|
|
2479
2431
|
orderContentRefTypes,
|
|
2480
2432
|
osLabels,
|
|
2481
2433
|
parseAttributionFromUrl,
|
|
2434
|
+
parseChunkToAction,
|
|
2482
2435
|
parseFaqHash,
|
|
2483
2436
|
parseScrollAnchor,
|
|
2484
2437
|
parseWireCommandOverride,
|
|
@@ -2493,13 +2446,11 @@ export {
|
|
|
2493
2446
|
platformSlogans,
|
|
2494
2447
|
processHistoricalMessages,
|
|
2495
2448
|
processHistoricalMessagesWithErrors,
|
|
2496
|
-
processShortcodes,
|
|
2497
2449
|
programItemToStripProfile,
|
|
2498
2450
|
progressColorByVariant,
|
|
2499
2451
|
ratioToCategory,
|
|
2500
2452
|
readDismissCookie,
|
|
2501
2453
|
readLeadingDecisionFrame,
|
|
2502
|
-
rehypeStripUnsafe,
|
|
2503
2454
|
releaseStatusOptions,
|
|
2504
2455
|
releaseTypeOptions,
|
|
2505
2456
|
releaseTypeToBadgeColor,
|
|
@@ -2516,14 +2467,12 @@ export {
|
|
|
2516
2467
|
resolveSourceIcon,
|
|
2517
2468
|
resolveSourceRowCTA,
|
|
2518
2469
|
resolveStatusTagProps,
|
|
2519
|
-
resolveTextSizeConfig,
|
|
2520
2470
|
resolveTicketStatus,
|
|
2521
2471
|
rgbToHex,
|
|
2522
2472
|
safeHref,
|
|
2523
2473
|
sanitizeLandingUrl,
|
|
2524
2474
|
sanitizeTitleForChat,
|
|
2525
2475
|
saveDataEnabled,
|
|
2526
|
-
scanHeadings,
|
|
2527
2476
|
scrollElementIntoView,
|
|
2528
2477
|
serializeJsonLd,
|
|
2529
2478
|
setEmbedProxyAuth as setChatProxyAuth,
|
|
@@ -2535,16 +2484,12 @@ export {
|
|
|
2535
2484
|
shouldProxyImage,
|
|
2536
2485
|
showCommandApprovalToast,
|
|
2537
2486
|
showToast,
|
|
2538
|
-
slugifyHeadingBase,
|
|
2539
|
-
slugifyHeadingText,
|
|
2540
2487
|
sortBitesByCreatedAtDesc,
|
|
2541
2488
|
sortTreeChildren,
|
|
2542
2489
|
splitCsvEnv,
|
|
2543
|
-
splitStreamingBlocks,
|
|
2544
2490
|
statusBadgeVariants,
|
|
2545
2491
|
stripChatAttachmentMarkdown,
|
|
2546
2492
|
stripFolderIndexFromPath,
|
|
2547
|
-
stripHeadingEmojis,
|
|
2548
2493
|
stripHtml,
|
|
2549
2494
|
stripInlineMarkdown,
|
|
2550
2495
|
stripSameOriginToPath,
|
|
@@ -2581,7 +2526,6 @@ export {
|
|
|
2581
2526
|
useChatAttachments,
|
|
2582
2527
|
useChatCardItem,
|
|
2583
2528
|
useChatIdentity,
|
|
2584
|
-
useChatStreamReducer,
|
|
2585
2529
|
useChunkCatchup,
|
|
2586
2530
|
useCloseOnNavigation,
|
|
2587
2531
|
useCollapsible,
|
|
@@ -2599,7 +2543,6 @@ export {
|
|
|
2599
2543
|
useFiltersDropdown,
|
|
2600
2544
|
useFocusTrap,
|
|
2601
2545
|
useHeaderHeight,
|
|
2602
|
-
useHeadingIdMap,
|
|
2603
2546
|
useHorizontalScrollbar,
|
|
2604
2547
|
useHumanitySignals,
|
|
2605
2548
|
useImageEdgeColor,
|
|
@@ -2628,6 +2571,7 @@ export {
|
|
|
2628
2571
|
usePreventScroll,
|
|
2629
2572
|
useProxiedImageUrl,
|
|
2630
2573
|
useQueryParams,
|
|
2574
|
+
useRealtimeChunkProcessor,
|
|
2631
2575
|
useResetOnPageHidden,
|
|
2632
2576
|
useSSE,
|
|
2633
2577
|
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;
|