@flamingo-stack/openframe-frontend-core 0.0.285 → 0.0.286
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-3MCHAFHB.js +89 -0
- package/dist/chunk-3MCHAFHB.js.map +1 -0
- package/dist/{chunk-IMNGGLKL.js → chunk-3ZXUQQL4.js} +2 -2
- package/dist/{chunk-44ZFLMYC.cjs → chunk-4WACBTZU.cjs} +30 -30
- package/dist/{chunk-44ZFLMYC.cjs.map → chunk-4WACBTZU.cjs.map} +1 -1
- package/dist/{chunk-23UOJUDF.js → chunk-5BTZOVDQ.js} +4 -4
- package/dist/chunk-5KD3S25X.cjs +312 -0
- package/dist/chunk-5KD3S25X.cjs.map +1 -0
- package/dist/chunk-6N26CURS.cjs +2417 -0
- package/dist/chunk-6N26CURS.cjs.map +1 -0
- package/dist/{chunk-XX7P4IL2.js → chunk-7NM7DEUK.js} +4 -143
- package/dist/chunk-7NM7DEUK.js.map +1 -0
- package/dist/chunk-BBZ7AX5H.cjs +290 -0
- package/dist/chunk-BBZ7AX5H.cjs.map +1 -0
- package/dist/chunk-C6SCWXDP.js +290 -0
- package/dist/chunk-C6SCWXDP.js.map +1 -0
- package/dist/{chunk-GVSTRN36.cjs → chunk-D3LEFMOA.cjs} +3 -3
- package/dist/{chunk-GVSTRN36.cjs.map → chunk-D3LEFMOA.cjs.map} +1 -1
- package/dist/{chunk-P45Q4QCU.cjs → chunk-D5YY5U6J.cjs} +19 -15
- package/dist/chunk-D5YY5U6J.cjs.map +1 -0
- package/dist/chunk-DDAT4RKX.js +2417 -0
- package/dist/chunk-DDAT4RKX.js.map +1 -0
- package/dist/{chunk-PVXCVPJD.cjs → chunk-EI4WALN2.cjs} +67 -1626
- package/dist/chunk-EI4WALN2.cjs.map +1 -0
- package/dist/{chunk-ZIODAAFY.cjs → chunk-EL5GCMPU.cjs} +20 -159
- package/dist/chunk-EL5GCMPU.cjs.map +1 -0
- package/dist/{chunk-VQW7CEGS.js → chunk-FSBDVT6R.js} +1831 -3672
- package/dist/chunk-FSBDVT6R.js.map +1 -0
- package/dist/{chunk-DPKUSBQH.cjs → chunk-GDF2R2ER.cjs} +1073 -2914
- package/dist/chunk-GDF2R2ER.cjs.map +1 -0
- package/dist/chunk-HLQW7MWJ.cjs +1594 -0
- package/dist/chunk-HLQW7MWJ.cjs.map +1 -0
- package/dist/chunk-I6ZPGKZ2.cjs +151 -0
- package/dist/chunk-I6ZPGKZ2.cjs.map +1 -0
- package/dist/{chunk-J66U3LPZ.cjs → chunk-KBKZYJRI.cjs} +33 -332
- package/dist/chunk-KBKZYJRI.cjs.map +1 -0
- package/dist/{chunk-USPATRSC.js → chunk-N6ZM5PYZ.js} +45 -344
- package/dist/chunk-N6ZM5PYZ.js.map +1 -0
- package/dist/{chunk-RGALV4UX.js → chunk-POKKCWKF.js} +3 -82
- package/dist/chunk-POKKCWKF.js.map +1 -0
- package/dist/{chunk-XDI5JSWB.cjs → chunk-QCKN37OP.cjs} +45 -41
- package/dist/chunk-QCKN37OP.cjs.map +1 -0
- package/dist/{chunk-KNCDUWY2.js → chunk-QF2X6PTD.js} +10 -6
- package/dist/{chunk-KNCDUWY2.js.map → chunk-QF2X6PTD.js.map} +1 -1
- package/dist/{chunk-Z3V2SGQZ.js → chunk-R2KT5GDD.js} +324 -1883
- package/dist/chunk-R2KT5GDD.js.map +1 -0
- package/dist/{chunk-RJUGNL2A.cjs → chunk-RQ6RTBKF.cjs} +16 -12
- package/dist/chunk-RQ6RTBKF.cjs.map +1 -0
- package/dist/chunk-TFSYSWPS.cjs +89 -0
- package/dist/chunk-TFSYSWPS.cjs.map +1 -0
- package/dist/chunk-TYZEMPPH.js +312 -0
- package/dist/chunk-TYZEMPPH.js.map +1 -0
- package/dist/{chunk-O5N57CRV.js → chunk-VCQ3CTYK.js} +12 -8
- package/dist/{chunk-O5N57CRV.js.map → chunk-VCQ3CTYK.js.map} +1 -1
- package/dist/chunk-VRSXJ5QJ.js +1599 -0
- package/dist/chunk-VRSXJ5QJ.js.map +1 -0
- package/dist/{chunk-53CFL7PH.js → chunk-XQL4WDML.js} +11 -7
- package/dist/{chunk-53CFL7PH.js.map → chunk-XQL4WDML.js.map} +1 -1
- package/dist/chunk-Y4JNA4W6.cjs +1599 -0
- package/dist/chunk-Y4JNA4W6.cjs.map +1 -0
- package/dist/{chunk-ZSUNQJRO.cjs → chunk-YETA25JW.cjs} +2 -81
- package/dist/chunk-YETA25JW.cjs.map +1 -0
- package/dist/chunk-YVB3VDIQ.js +1594 -0
- package/dist/chunk-YVB3VDIQ.js.map +1 -0
- package/dist/chunk-ZLN6SM2U.js +151 -0
- package/dist/chunk-ZLN6SM2U.js.map +1 -0
- package/dist/components/chat/chat-attachment-bar.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +12 -6
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +45 -39
- package/dist/components/contact/index.cjs +11 -7
- package/dist/components/contact/index.cjs.map +1 -1
- package/dist/components/contact/index.js +10 -6
- package/dist/components/docs/doc-navigation-context.d.ts +39 -0
- package/dist/components/docs/doc-navigation-context.d.ts.map +1 -0
- package/dist/components/docs/doc-viewer.d.ts +66 -0
- package/dist/components/docs/doc-viewer.d.ts.map +1 -0
- package/dist/components/docs/index.cjs +34 -0
- package/dist/components/docs/index.cjs.map +1 -0
- package/dist/components/docs/index.d.ts +8 -0
- package/dist/components/docs/index.d.ts.map +1 -0
- package/dist/components/docs/index.js +34 -0
- package/dist/components/docs/index.js.map +1 -0
- package/dist/components/docs/use-document-tree.d.ts +41 -0
- package/dist/components/docs/use-document-tree.d.ts.map +1 -0
- package/dist/components/docs/use-scroll-spy.d.ts +16 -0
- package/dist/components/docs/use-scroll-spy.d.ts.map +1 -0
- package/dist/components/embeds/embed-iframe.d.ts +29 -0
- package/dist/components/embeds/embed-iframe.d.ts.map +1 -0
- package/dist/components/embeds/figma-embed.d.ts +27 -0
- package/dist/components/embeds/figma-embed.d.ts.map +1 -0
- package/dist/components/embeds/google-sheets-viewer.d.ts +8 -0
- package/dist/components/embeds/google-sheets-viewer.d.ts.map +1 -0
- package/dist/components/embeds/index.cjs +37 -0
- package/dist/components/embeds/index.cjs.map +1 -0
- package/dist/components/embeds/index.d.ts +9 -0
- package/dist/components/embeds/index.d.ts.map +1 -0
- package/dist/components/embeds/index.js +37 -0
- package/dist/components/embeds/index.js.map +1 -0
- package/dist/components/embeds/pdf-viewer.d.ts +10 -0
- package/dist/components/embeds/pdf-viewer.d.ts.map +1 -0
- package/dist/components/faq/index.cjs +12 -8
- package/dist/components/faq/index.cjs.map +1 -1
- package/dist/components/faq/index.js +11 -7
- package/dist/components/features/index.cjs +10 -6
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +9 -5
- package/dist/components/index.cjs +247 -1120
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +645 -1518
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +15 -6
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.d.ts +2 -0
- package/dist/components/navigation/index.d.ts.map +1 -1
- package/dist/components/navigation/index.js +15 -6
- package/dist/components/navigation/multi-level-navigation.d.ts +28 -0
- package/dist/components/navigation/multi-level-navigation.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.cjs +34 -29
- package/dist/components/onboarding-guides/index.cjs.map +1 -1
- package/dist/components/onboarding-guides/index.js +13 -8
- package/dist/components/onboarding-guides/index.js.map +1 -1
- package/dist/components/related-content/index.cjs +12 -8
- package/dist/components/related-content/index.cjs.map +1 -1
- package/dist/components/related-content/index.js +11 -7
- package/dist/components/tickets/index.cjs +75 -70
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +16 -11
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/ui/index.cjs +12 -6
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +65 -59
- package/dist/embed-shims/index.cjs +3 -3
- package/dist/embed-shims/index.cjs.map +1 -1
- package/dist/embed-shims/index.js +8 -8
- package/dist/hooks/index.cjs +6 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +7 -4
- package/dist/index.cjs +62 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +257 -201
- package/dist/types/doc-source.cjs +4 -0
- package/dist/types/doc-source.cjs.map +1 -0
- package/dist/types/doc-source.d.ts +86 -0
- package/dist/types/doc-source.d.ts.map +1 -0
- package/dist/types/doc-source.js +3 -0
- package/dist/types/doc-source.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/doc-path-utils.d.ts +24 -0
- package/dist/utils/doc-path-utils.d.ts.map +1 -0
- package/dist/utils/doc-tree-nav.d.ts +35 -0
- package/dist/utils/doc-tree-nav.d.ts.map +1 -0
- package/dist/utils/embed-url-converters.d.ts +16 -0
- package/dist/utils/embed-url-converters.d.ts.map +1 -0
- package/dist/utils/format.d.ts +9 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/index.cjs +297 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +7 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +276 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/markdown-section-extractor.d.ts +23 -0
- package/dist/utils/markdown-section-extractor.d.ts.map +1 -0
- package/dist/utils/markdown-to-plain.d.ts +32 -0
- package/dist/utils/markdown-to-plain.d.ts.map +1 -0
- package/dist/utils/tree-builder.d.ts +30 -0
- package/dist/utils/tree-builder.d.ts.map +1 -0
- package/package.json +19 -1
- package/src/components/chat/chat-attachment-bar.tsx +6 -11
- package/src/components/docs/doc-navigation-context.tsx +123 -0
- package/src/components/docs/doc-viewer.tsx +345 -0
- package/src/components/docs/index.ts +12 -0
- package/src/components/docs/use-document-tree.ts +427 -0
- package/src/components/docs/use-scroll-spy.ts +93 -0
- package/src/components/embeds/embed-iframe.tsx +103 -0
- package/src/components/embeds/figma-embed.tsx +147 -0
- package/src/components/embeds/google-sheets-viewer.tsx +54 -0
- package/src/components/embeds/index.ts +11 -0
- package/src/components/embeds/pdf-viewer.tsx +64 -0
- package/src/components/index.ts +2 -0
- package/src/components/navigation/index.ts +5 -0
- package/src/components/navigation/multi-level-navigation.tsx +358 -0
- package/src/types/doc-source.ts +88 -0
- package/src/types/index.ts +4 -0
- package/src/utils/doc-path-utils.ts +47 -0
- package/src/utils/doc-tree-nav.ts +111 -0
- package/src/utils/embed-url-converters.ts +77 -0
- package/src/utils/format.ts +16 -0
- package/src/utils/index.ts +11 -0
- package/src/utils/markdown-section-extractor.ts +106 -0
- package/src/utils/markdown-to-plain.ts +69 -0
- package/src/utils/tree-builder.ts +114 -0
- package/dist/chunk-DPKUSBQH.cjs.map +0 -1
- package/dist/chunk-J66U3LPZ.cjs.map +0 -1
- package/dist/chunk-P45Q4QCU.cjs.map +0 -1
- package/dist/chunk-PVXCVPJD.cjs.map +0 -1
- package/dist/chunk-RGALV4UX.js.map +0 -1
- package/dist/chunk-RJUGNL2A.cjs.map +0 -1
- package/dist/chunk-USPATRSC.js.map +0 -1
- package/dist/chunk-VQW7CEGS.js.map +0 -1
- package/dist/chunk-XDI5JSWB.cjs.map +0 -1
- package/dist/chunk-XX7P4IL2.js.map +0 -1
- package/dist/chunk-Z3V2SGQZ.js.map +0 -1
- package/dist/chunk-ZIODAAFY.cjs.map +0 -1
- package/dist/chunk-ZSUNQJRO.cjs.map +0 -1
- /package/dist/{chunk-IMNGGLKL.js.map → chunk-3ZXUQQL4.js.map} +0 -0
- /package/dist/{chunk-23UOJUDF.js.map → chunk-5BTZOVDQ.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"doc-source.cjs"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single home for doc-source tree + content types.
|
|
3
|
+
*
|
|
4
|
+
* Consumed by every doc-viewer consumer (knowledge base, data room, future
|
|
5
|
+
* sources). Replaces the per-source `OpenFrameDocNode` / `OpenFrameDocContent`
|
|
6
|
+
* / `DataRoomDocNode` / `DocNavNode` types that previously lived in the hub.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A single node in a doc-source tree. The `documentType` discriminator
|
|
10
|
+
* defaults to `'markdown'` when undefined; rich-content viewers handle
|
|
11
|
+
* `'pdf' | 'google_sheet' | 'figma' | 'file'`.
|
|
12
|
+
*/
|
|
13
|
+
export interface DocNode {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
path: string;
|
|
18
|
+
type: 'file' | 'folder';
|
|
19
|
+
hasReadme?: boolean;
|
|
20
|
+
/** Per-row sort key — populated by data-room rows, undefined elsewhere. */
|
|
21
|
+
sortOrder?: number;
|
|
22
|
+
/** Discriminator for the rich renderer. `undefined` is treated as `'markdown'`. */
|
|
23
|
+
documentType?: 'markdown' | 'pdf' | 'google_sheet' | 'figma' | 'file';
|
|
24
|
+
children?: DocNode[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Content payload returned by a doc-source DAL's `getContent` call. Carries
|
|
28
|
+
* everything any consumer's renderer might need; markdown-only fields and
|
|
29
|
+
* rich-only fields are both optional.
|
|
30
|
+
*/
|
|
31
|
+
export interface DocContent {
|
|
32
|
+
content: string;
|
|
33
|
+
sections: Array<{
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
level: number;
|
|
37
|
+
}>;
|
|
38
|
+
path: string;
|
|
39
|
+
/** Defaults to `'markdown'` when undefined. */
|
|
40
|
+
documentType?: DocNode['documentType'];
|
|
41
|
+
brokenLinks?: string[];
|
|
42
|
+
fileUrl?: string;
|
|
43
|
+
externalUrl?: string;
|
|
44
|
+
mimeType?: string;
|
|
45
|
+
fileName?: string;
|
|
46
|
+
fileSize?: number;
|
|
47
|
+
/** ISO timestamps for SEO `datePublished` / `dateModified` — DAL populates
|
|
48
|
+
* from the underlying row's sync/update timestamp. Undefined when unknown. */
|
|
49
|
+
publishedAt?: string;
|
|
50
|
+
updatedAt?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Doc-source data-access contract. Each doc source's hub-side DAL conforms
|
|
54
|
+
* to this. Generic over the Supabase-client type so the lib doesn't pull in
|
|
55
|
+
* `@supabase/supabase-js`; hub callers tighten `Client` to `SupabaseClient`.
|
|
56
|
+
*/
|
|
57
|
+
export interface DocSourceDal<Client = unknown> {
|
|
58
|
+
getStructure(client: Client): Promise<DocNode[]>;
|
|
59
|
+
getContent(client: Client, path: string): Promise<DocContent | null>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Doc-source registry id. The lib's `<DocViewer>` is generic over this union
|
|
63
|
+
* — the hub's `DOC_SOURCES` registry defines the actual ids. Listed here as a
|
|
64
|
+
* type-only union so the lib can flow the id into `DocRenderHandlers.sourceId`
|
|
65
|
+
* without callers having to cast `string` → `'openframe-docs' | 'data-room-docs'`.
|
|
66
|
+
*
|
|
67
|
+
* Adding a new source = add the id here AND register it in the hub. The lib
|
|
68
|
+
* never reaches into the registry — this is purely a type-narrowing handle.
|
|
69
|
+
*/
|
|
70
|
+
export type DocSourceId = 'openframe-docs' | 'data-room-docs';
|
|
71
|
+
/**
|
|
72
|
+
* Handlers the viewer passes to a consumer's `renderContent` callback.
|
|
73
|
+
* The page shell wires `renderContent` directly — no `DocContentRenderer`
|
|
74
|
+
* interface layer between the viewer and the consumer's render logic.
|
|
75
|
+
*/
|
|
76
|
+
export interface DocRenderHandlers {
|
|
77
|
+
onInternalLinkClick: (path: string, options?: {
|
|
78
|
+
expandFolder?: boolean;
|
|
79
|
+
fromInternalLink?: boolean;
|
|
80
|
+
}) => void;
|
|
81
|
+
currentPath: string;
|
|
82
|
+
/** Registry source id (e.g. `'openframe-docs'`, `'data-room-docs'`) — used by
|
|
83
|
+
* the consumer's `/api/resolve-link` POST to disambiguate the doc source. */
|
|
84
|
+
sourceId: DocSourceId;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=doc-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-source.d.ts","sourceRoot":"","sources":["../../src/types/doc-source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mFAAmF;IACnF,YAAY,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAAA;IACrE,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC7D,IAAI,EAAE,MAAM,CAAA;IACZ,+CAA+C;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;IAEtC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IAEtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;mFAC+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY,CAAC,MAAM,GAAG,OAAO;IAC5C,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;IAChD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;CACrE;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,gBAAgB,CAAA;AAE7D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,EAAE,CACnB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7D,IAAI,CAAA;IACT,WAAW,EAAE,MAAM,CAAA;IACnB;kFAC8E;IAC9E,QAAQ,EAAE,WAAW,CAAA;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"doc-source.js"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAA;AAI9B,cAAc,cAAc,CAAA;AAC5B,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACtF,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,IAAI,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAGjK,cAAc,YAAY,CAAA;AAG1B,cAAc,QAAQ,CAAA;AAGtB,cAAc,QAAQ,CAAA;AACtB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAGlC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AAGtB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAG1B,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAGvB,cAAc,cAAc,CAAA;AAG5B,cAAc,cAAc,CAAA;AAG5B,cAAc,eAAe,CAAA;AAG7B,cAAc,YAAY,CAAA;AAG1B,cAAc,aAAa,CAAA;AAE3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared document path utilities.
|
|
3
|
+
* Single source of truth for path/slug operations used by all doc-source viewers
|
|
4
|
+
* (knowledge base, data room, future).
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Convert a document name to a URL-safe path slug.
|
|
8
|
+
* Used when creating, moving, or renaming documents.
|
|
9
|
+
* e.g., "Investor Thesis" → "investor-thesis"
|
|
10
|
+
*/
|
|
11
|
+
export declare function toDocSlug(name: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Convert a full document path to a DOM-safe node ID.
|
|
14
|
+
* Used for tree node IDs and sidebar expand/collapse state.
|
|
15
|
+
* e.g., "legal/cap-table/safe.md" → "legal-cap-table-safe.md"
|
|
16
|
+
*/
|
|
17
|
+
export declare function pathToNodeId(path: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Normalize a raw URL path from a route handler.
|
|
20
|
+
* Strips folder-index suffixes (default README.md) and lowercases segments.
|
|
21
|
+
* Used by both data-room and knowledge-base [...path] route handlers.
|
|
22
|
+
*/
|
|
23
|
+
export declare function normalizeDocPath(segments: string[], folderIndexFile?: string): string;
|
|
24
|
+
//# sourceMappingURL=doc-path-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-path-utils.d.ts","sourceRoot":"","sources":["../../src/utils/doc-path-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAAE,EAClB,eAAe,GAAE,MAAkC,GAClD,MAAM,CAYR"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers for doc-source tree navigation — shared by client hook and RSC SSR.
|
|
3
|
+
* README convention (folder-index file) is configurable but defaults to 'README.md'.
|
|
4
|
+
*/
|
|
5
|
+
import type { DocNode } from '../types/doc-source';
|
|
6
|
+
/**
|
|
7
|
+
* Canonical folder-index filename. Single SSOT consumed by `doc-tree-nav`
|
|
8
|
+
* pure helpers, `useDocumentTree` (default config), `DocSeoContent` (fallback
|
|
9
|
+
* fetch path), and `multi-level-navigation`'s visual-selection logic. Stays
|
|
10
|
+
* in canonical case here; consumers that do case-insensitive comparison
|
|
11
|
+
* (the navigation) lowercase locally.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_FOLDER_INDEX_FILE = "README.md";
|
|
14
|
+
/**
|
|
15
|
+
* Strip the folder-index filename from a path, returning the folder path.
|
|
16
|
+
* For default 'README.md': 'folder/README.md' → 'folder', 'README.md' → '', 'folder/file.md' → 'folder/file.md'
|
|
17
|
+
*/
|
|
18
|
+
export declare function stripFolderIndexFromPath(path: string, folderIndexFile?: string): string;
|
|
19
|
+
export declare function findDocNodeByPath(path: string, nodes: DocNode[]): DocNode | null;
|
|
20
|
+
/**
|
|
21
|
+
* Given a node path like "folder1/subfolder2", return DOM-style node IDs for each segment
|
|
22
|
+
* (accordion sidebar — matches use-document-tree).
|
|
23
|
+
*/
|
|
24
|
+
export declare function getDocAncestorNodeIds(nodePath: string): string[];
|
|
25
|
+
/**
|
|
26
|
+
* Resolve which storage path to load (matches use-document-tree content effect).
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveContentFetchPath(selectedPath: string, structure: DocNode[], folderIndexFile?: string): string | null;
|
|
29
|
+
export declare function getInitialExpandedNodeIds(cleanInitialPath: string): string[];
|
|
30
|
+
/**
|
|
31
|
+
* When a doc source's root has no top-level folder-index file, navigate to the first
|
|
32
|
+
* folder that does. Matches the historical knowledge-base default.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getDocSourceDefaultPath(structure: DocNode[], folderIndexFile?: string): string | null;
|
|
35
|
+
//# sourceMappingURL=doc-tree-nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-tree-nav.d.ts","sourceRoot":"","sources":["../../src/utils/doc-tree-nav.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,cAAc,CAAA;AAKpD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,eAAe,GAAE,MAA6B,GAC7C,MAAM,CAKR;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,GAAG,IAAI,CAShF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAShE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,OAAO,EAAE,EACpB,eAAe,GAAE,MAA6B,GAC7C,MAAM,GAAG,IAAI,CAaf;AAED,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,EAAE,CAO5E;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,OAAO,EAAE,EACpB,eAAe,GAAE,MAA6B,GAC7C,MAAM,GAAG,IAAI,CAaf"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for converting external service URLs to embeddable formats.
|
|
3
|
+
* Used by lib's embed components and the hub's admin document editor.
|
|
4
|
+
*/
|
|
5
|
+
export declare function toGoogleSheetsEmbedUrl(url: string): string;
|
|
6
|
+
export declare function toGoogleSheetsOriginalUrl(url: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Convert a Figma URL to an embeddable URL.
|
|
9
|
+
* Slides/deck URLs map to `deck` (present) by default; `slidesView: 'browse'` switches to `slides` (browse).
|
|
10
|
+
*/
|
|
11
|
+
export declare function toFigmaEmbedUrl(url: string, opts?: {
|
|
12
|
+
slidesView?: 'present' | 'browse';
|
|
13
|
+
}): string;
|
|
14
|
+
export declare function isFigmaSlidesUrl(url: string): boolean;
|
|
15
|
+
export declare function toFigmaOriginalUrl(url: string): string;
|
|
16
|
+
//# sourceMappingURL=embed-url-converters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed-url-converters.d.ts","sourceRoot":"","sources":["../../src/utils/embed-url-converters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU1D;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ7D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,GAC3C,MAAM,CA8BR;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKtD"}
|
package/dist/utils/format.d.ts
CHANGED
|
@@ -35,6 +35,15 @@ export declare function formatBytes(bytes: number, decimals?: number): string;
|
|
|
35
35
|
* @example formatBytesShort(0) → "0 B"; formatBytesShort(1536) → "1.5 KB"
|
|
36
36
|
*/
|
|
37
37
|
export declare function formatBytesShort(bytes: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* File-size formatter (1 decimal place, `'B'` unit, caps at `GB`).
|
|
40
|
+
* Hub historical semantics — distinct from `formatBytesShort` (2dp) and
|
|
41
|
+
* `formatBytes` (2dp / `'Bytes'`). Lifted from the hub during the doc-viewer
|
|
42
|
+
* unification so all upload UIs, publication cards, and data-room file-size
|
|
43
|
+
* displays render the same way.
|
|
44
|
+
* @example formatFileSize(0) → "0 B"; formatFileSize(1500) → "1.5 KB"
|
|
45
|
+
*/
|
|
46
|
+
export declare function formatFileSize(bytes: number): string;
|
|
38
47
|
/**
|
|
39
48
|
* Format large numbers to abbreviated form (K, M, B) with no decimal points
|
|
40
49
|
* @param num - The number to format
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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AM,CAKnE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAM/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,QAAQ,GAAE,MAAW,GACpB,MAAM,CAiBR"}
|
package/dist/utils/index.cjs
CHANGED
|
@@ -190,6 +190,13 @@ function formatBytesShort(bytes) {
|
|
|
190
190
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
191
191
|
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`;
|
|
192
192
|
}
|
|
193
|
+
function formatFileSize(bytes) {
|
|
194
|
+
if (bytes === 0) return "0 B";
|
|
195
|
+
const k = 1024;
|
|
196
|
+
const sizes = ["B", "KB", "MB", "GB"];
|
|
197
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
198
|
+
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(1))} ${sizes[i]}`;
|
|
199
|
+
}
|
|
193
200
|
function formatLargeNumber(num) {
|
|
194
201
|
if (num === 0) return "0";
|
|
195
202
|
const isNegative = num < 0;
|
|
@@ -3515,6 +3522,274 @@ function evaluateHumanitySignals(body, opts) {
|
|
|
3515
3522
|
}
|
|
3516
3523
|
var splitCsvEnv = (s) => s?.split(",").map((t) => t.trim()).filter(Boolean) ?? [];
|
|
3517
3524
|
|
|
3525
|
+
// src/utils/doc-tree-nav.ts
|
|
3526
|
+
var DEFAULT_FOLDER_INDEX_FILE = "README.md";
|
|
3527
|
+
var DEFAULT_FOLDER_INDEX = DEFAULT_FOLDER_INDEX_FILE;
|
|
3528
|
+
function stripFolderIndexFromPath(path, folderIndexFile = DEFAULT_FOLDER_INDEX) {
|
|
3529
|
+
const suffix = `/${folderIndexFile}`;
|
|
3530
|
+
if (path.endsWith(suffix)) return path.slice(0, -suffix.length);
|
|
3531
|
+
if (path === folderIndexFile) return "";
|
|
3532
|
+
return path;
|
|
3533
|
+
}
|
|
3534
|
+
function findDocNodeByPath(path, nodes) {
|
|
3535
|
+
for (const node of nodes) {
|
|
3536
|
+
if (node.path === path) return node;
|
|
3537
|
+
if (node.children) {
|
|
3538
|
+
const found = findDocNodeByPath(path, node.children);
|
|
3539
|
+
if (found) return found;
|
|
3540
|
+
}
|
|
3541
|
+
}
|
|
3542
|
+
return null;
|
|
3543
|
+
}
|
|
3544
|
+
function getDocAncestorNodeIds(nodePath) {
|
|
3545
|
+
const parts = nodePath.split("/");
|
|
3546
|
+
const ids = [];
|
|
3547
|
+
let current = "";
|
|
3548
|
+
for (const part of parts) {
|
|
3549
|
+
current = current ? `${current}-${part}` : part;
|
|
3550
|
+
ids.push(current.toLowerCase());
|
|
3551
|
+
}
|
|
3552
|
+
return ids;
|
|
3553
|
+
}
|
|
3554
|
+
function resolveContentFetchPath(selectedPath, structure, folderIndexFile = DEFAULT_FOLDER_INDEX) {
|
|
3555
|
+
if (selectedPath === "") {
|
|
3556
|
+
return folderIndexFile;
|
|
3557
|
+
}
|
|
3558
|
+
const node = findDocNodeByPath(selectedPath, structure);
|
|
3559
|
+
if (node && node.type === "folder" && !node.hasReadme) {
|
|
3560
|
+
return null;
|
|
3561
|
+
}
|
|
3562
|
+
let pathToFetch = selectedPath;
|
|
3563
|
+
if (node && node.type === "folder" && node.hasReadme) {
|
|
3564
|
+
pathToFetch = `${selectedPath}/${folderIndexFile}`;
|
|
3565
|
+
}
|
|
3566
|
+
return pathToFetch;
|
|
3567
|
+
}
|
|
3568
|
+
function getInitialExpandedNodeIds(cleanInitialPath) {
|
|
3569
|
+
if (!cleanInitialPath) return [];
|
|
3570
|
+
const pathForExpansion = cleanInitialPath.includes(".") ? cleanInitialPath.substring(0, cleanInitialPath.lastIndexOf("/")) : cleanInitialPath;
|
|
3571
|
+
if (!pathForExpansion) return [];
|
|
3572
|
+
return getDocAncestorNodeIds(pathForExpansion);
|
|
3573
|
+
}
|
|
3574
|
+
function getDocSourceDefaultPath(structure, folderIndexFile = DEFAULT_FOLDER_INDEX) {
|
|
3575
|
+
if (!structure.length) return null;
|
|
3576
|
+
const hasRootIndex = structure.some(
|
|
3577
|
+
(node) => node.type === "file" && node.path === folderIndexFile
|
|
3578
|
+
);
|
|
3579
|
+
if (hasRootIndex) return null;
|
|
3580
|
+
const firstFolderWithReadme = structure.find(
|
|
3581
|
+
(node) => node.type === "folder" && node.hasReadme && !!node.path
|
|
3582
|
+
);
|
|
3583
|
+
return firstFolderWithReadme?.path ?? null;
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3586
|
+
// src/utils/doc-path-utils.ts
|
|
3587
|
+
function toDocSlug(name) {
|
|
3588
|
+
return name.trim().toLowerCase().replace(/\s+/g, "-");
|
|
3589
|
+
}
|
|
3590
|
+
function pathToNodeId(path) {
|
|
3591
|
+
return path.replace(/[\/\s]/g, "-").toLowerCase();
|
|
3592
|
+
}
|
|
3593
|
+
function normalizeDocPath(segments, folderIndexFile = DEFAULT_FOLDER_INDEX_FILE) {
|
|
3594
|
+
const lowerPath = (segments?.join("/") || "").toLowerCase();
|
|
3595
|
+
const lowerIndex = folderIndexFile.toLowerCase();
|
|
3596
|
+
const suffix = `/${lowerIndex}`;
|
|
3597
|
+
if (lowerPath.endsWith(suffix)) return lowerPath.slice(0, -suffix.length);
|
|
3598
|
+
if (lowerPath === lowerIndex) return "";
|
|
3599
|
+
return lowerPath;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
// src/utils/tree-builder.ts
|
|
3603
|
+
function formatDocName(name) {
|
|
3604
|
+
let displayName = name;
|
|
3605
|
+
if (displayName.endsWith(".md")) {
|
|
3606
|
+
displayName = displayName.slice(0, -3);
|
|
3607
|
+
}
|
|
3608
|
+
if (displayName.toLowerCase() === "readme") {
|
|
3609
|
+
return "README";
|
|
3610
|
+
}
|
|
3611
|
+
return displayName.charAt(0).toUpperCase() + displayName.slice(1).replace(/-/g, " ");
|
|
3612
|
+
}
|
|
3613
|
+
function sortTreeChildren(nodes) {
|
|
3614
|
+
nodes.sort((a, b) => {
|
|
3615
|
+
const aIsReadme = a.name.toLowerCase() === "readme" || a.name.toLowerCase() === "readme.md";
|
|
3616
|
+
const bIsReadme = b.name.toLowerCase() === "readme" || b.name.toLowerCase() === "readme.md";
|
|
3617
|
+
if (aIsReadme && !bIsReadme) return -1;
|
|
3618
|
+
if (!aIsReadme && bIsReadme) return 1;
|
|
3619
|
+
if (a.type === "folder" && b.type !== "folder") return -1;
|
|
3620
|
+
if (a.type !== "folder" && b.type === "folder") return 1;
|
|
3621
|
+
const aOrder = a.sortOrder ?? Infinity;
|
|
3622
|
+
const bOrder = b.sortOrder ?? Infinity;
|
|
3623
|
+
if (aOrder !== bOrder) return aOrder - bOrder;
|
|
3624
|
+
return a.name.localeCompare(b.name, void 0, { sensitivity: "base" });
|
|
3625
|
+
});
|
|
3626
|
+
for (const node of nodes) {
|
|
3627
|
+
if (node.type === "folder" && node.children) {
|
|
3628
|
+
node.children = sortTreeChildren(node.children);
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
return nodes;
|
|
3632
|
+
}
|
|
3633
|
+
function buildDocumentTree(docs, mapFn, getParentPath, getPath) {
|
|
3634
|
+
const nodeMap = /* @__PURE__ */ new Map();
|
|
3635
|
+
const rootNodes = [];
|
|
3636
|
+
for (const doc of docs) {
|
|
3637
|
+
const node = mapFn(doc);
|
|
3638
|
+
nodeMap.set(getPath(doc), node);
|
|
3639
|
+
}
|
|
3640
|
+
for (const doc of docs) {
|
|
3641
|
+
const node = nodeMap.get(getPath(doc));
|
|
3642
|
+
let resolvedParentPath = getParentPath(doc);
|
|
3643
|
+
if (!resolvedParentPath) {
|
|
3644
|
+
const nodePath = getPath(doc);
|
|
3645
|
+
const lastSlash = nodePath.lastIndexOf("/");
|
|
3646
|
+
if (lastSlash > 0) {
|
|
3647
|
+
resolvedParentPath = nodePath.substring(0, lastSlash);
|
|
3648
|
+
}
|
|
3649
|
+
}
|
|
3650
|
+
if (resolvedParentPath) {
|
|
3651
|
+
const parent = nodeMap.get(resolvedParentPath);
|
|
3652
|
+
if (parent) {
|
|
3653
|
+
if (!parent.children) parent.children = [];
|
|
3654
|
+
parent.children.push(node);
|
|
3655
|
+
} else {
|
|
3656
|
+
rootNodes.push(node);
|
|
3657
|
+
}
|
|
3658
|
+
} else {
|
|
3659
|
+
rootNodes.push(node);
|
|
3660
|
+
}
|
|
3661
|
+
}
|
|
3662
|
+
return sortTreeChildren(rootNodes);
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
// src/utils/markdown-to-plain.ts
|
|
3666
|
+
function stripInlineMarkdown(s) {
|
|
3667
|
+
return s.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/`([^`]+)`/g, "$1");
|
|
3668
|
+
}
|
|
3669
|
+
function markdownToPlainText(markdown, options = {}) {
|
|
3670
|
+
const { mode = "article", maxChars } = options;
|
|
3671
|
+
let out = markdown.replace(/```[\s\S]*?```/g, "").replace(/!\[[^\]]*\]\([^)]+\)/g, "");
|
|
3672
|
+
out = stripInlineMarkdown(out).replace(/^#+\s*/gm, "").replace(/^\s*[-*+]\s+/gm, "");
|
|
3673
|
+
if (mode === "preview") {
|
|
3674
|
+
out = out.replace(/\s+/g, " ").trim();
|
|
3675
|
+
} else {
|
|
3676
|
+
out = out.replace(/\n{3,}/g, "\n\n").trim();
|
|
3677
|
+
}
|
|
3678
|
+
if (maxChars != null && out.length > maxChars) {
|
|
3679
|
+
out = out.slice(0, maxChars);
|
|
3680
|
+
}
|
|
3681
|
+
return out;
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
// src/utils/markdown-section-extractor.ts
|
|
3685
|
+
var DEFAULT_OPTIONS = {
|
|
3686
|
+
maxLevel: 2,
|
|
3687
|
+
removeEmojis: true,
|
|
3688
|
+
handleDuplicateIds: true,
|
|
3689
|
+
stripFormattingMarkers: true,
|
|
3690
|
+
skipCodeAndYamlBlocks: true
|
|
3691
|
+
};
|
|
3692
|
+
function extractSections(markdown, options = {}) {
|
|
3693
|
+
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
3694
|
+
const sections = [];
|
|
3695
|
+
const lines = markdown.split("\n");
|
|
3696
|
+
const idCounts = {};
|
|
3697
|
+
let inCodeBlock = false;
|
|
3698
|
+
let inYamlBlock = false;
|
|
3699
|
+
for (const line of lines) {
|
|
3700
|
+
if (opts.skipCodeAndYamlBlocks) {
|
|
3701
|
+
if (line.startsWith("```")) {
|
|
3702
|
+
inCodeBlock = !inCodeBlock;
|
|
3703
|
+
continue;
|
|
3704
|
+
}
|
|
3705
|
+
if (line === "---") {
|
|
3706
|
+
inYamlBlock = !inYamlBlock;
|
|
3707
|
+
continue;
|
|
3708
|
+
}
|
|
3709
|
+
if (inCodeBlock || inYamlBlock) continue;
|
|
3710
|
+
}
|
|
3711
|
+
const pattern = new RegExp(`^(#{1,${opts.maxLevel}})\\s+(.+)`);
|
|
3712
|
+
const match = line.match(pattern);
|
|
3713
|
+
if (!match) continue;
|
|
3714
|
+
const level = match[1].length;
|
|
3715
|
+
if (level > opts.maxLevel) continue;
|
|
3716
|
+
let title = match[2].trim();
|
|
3717
|
+
if (opts.stripFormattingMarkers) {
|
|
3718
|
+
title = stripInlineMarkdown(title).trim();
|
|
3719
|
+
}
|
|
3720
|
+
let baseId = title;
|
|
3721
|
+
if (opts.removeEmojis) {
|
|
3722
|
+
baseId = baseId.replace(
|
|
3723
|
+
/[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]/gu,
|
|
3724
|
+
""
|
|
3725
|
+
).trim();
|
|
3726
|
+
}
|
|
3727
|
+
baseId = baseId.toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/^-+|-+$/g, "");
|
|
3728
|
+
const cleanId = baseId || `section-${sections.length + 1}`;
|
|
3729
|
+
let id = cleanId;
|
|
3730
|
+
if (opts.handleDuplicateIds) {
|
|
3731
|
+
if (idCounts[cleanId]) {
|
|
3732
|
+
idCounts[cleanId]++;
|
|
3733
|
+
id = `${cleanId}-${idCounts[cleanId]}`;
|
|
3734
|
+
} else {
|
|
3735
|
+
idCounts[cleanId] = 1;
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
sections.push({ id, title, level });
|
|
3739
|
+
}
|
|
3740
|
+
return sections;
|
|
3741
|
+
}
|
|
3742
|
+
|
|
3743
|
+
// src/utils/embed-url-converters.ts
|
|
3744
|
+
function toGoogleSheetsEmbedUrl(url) {
|
|
3745
|
+
if (url.includes("/htmlembed")) return url;
|
|
3746
|
+
const match = url.match(/\/spreadsheets\/d\/([a-zA-Z0-9-_]+)/);
|
|
3747
|
+
if (!match) return url;
|
|
3748
|
+
const gidMatch = url.match(/[#?&]gid=(\d+)/);
|
|
3749
|
+
const gid = gidMatch ? gidMatch[1] : "0";
|
|
3750
|
+
return `https://docs.google.com/spreadsheets/d/${match[1]}/htmlembed?widget=true&chrome=false&headers=false&gid=${gid}`;
|
|
3751
|
+
}
|
|
3752
|
+
function toGoogleSheetsOriginalUrl(url) {
|
|
3753
|
+
const match = url.match(/\/spreadsheets\/d\/([a-zA-Z0-9-_]+)/);
|
|
3754
|
+
if (!match) return url;
|
|
3755
|
+
const gidMatch = url.match(/[#?&]gid=(\d+)/);
|
|
3756
|
+
const gid = gidMatch ? gidMatch[1] : "0";
|
|
3757
|
+
return `https://docs.google.com/spreadsheets/d/${match[1]}/edit#gid=${gid}`;
|
|
3758
|
+
}
|
|
3759
|
+
function toFigmaEmbedUrl(url, opts) {
|
|
3760
|
+
if (url.includes("embed.figma.com")) return url;
|
|
3761
|
+
if (url.includes("figma.com/embed")) return url;
|
|
3762
|
+
const match = url.match(
|
|
3763
|
+
/figma\.com\/(design|file|proto|board|slides|deck)\/([a-zA-Z0-9]+)(?:\/([^?]*))?(\?.*)?$/
|
|
3764
|
+
);
|
|
3765
|
+
if (match) {
|
|
3766
|
+
const [, urlType, fileKey, titleSlug, queryString] = match;
|
|
3767
|
+
const isSlides = urlType === "slides" || urlType === "deck";
|
|
3768
|
+
const embedType = urlType === "proto" ? "proto" : isSlides ? opts?.slidesView === "browse" ? "slides" : "deck" : "design";
|
|
3769
|
+
const pathSuffix = titleSlug ? `/${titleSlug}` : "";
|
|
3770
|
+
const params = new URLSearchParams(queryString?.replace(/^\?/, "") || "");
|
|
3771
|
+
if (!params.has("embed-host")) {
|
|
3772
|
+
params.set("embed-host", "flamingo");
|
|
3773
|
+
}
|
|
3774
|
+
const clientId = process.env.NEXT_PUBLIC_FIGMA_CLIENT_ID;
|
|
3775
|
+
if (clientId && !params.has("client-id")) {
|
|
3776
|
+
params.set("client-id", clientId);
|
|
3777
|
+
}
|
|
3778
|
+
return `https://embed.figma.com/${embedType}/${fileKey}${pathSuffix}?${params.toString()}`;
|
|
3779
|
+
}
|
|
3780
|
+
return `https://www.figma.com/embed?embed-host=flamingo&url=${encodeURIComponent(url)}`;
|
|
3781
|
+
}
|
|
3782
|
+
function isFigmaSlidesUrl(url) {
|
|
3783
|
+
if (!url) return false;
|
|
3784
|
+
return /(?:www\.|embed\.)?figma\.com\/(?:slides|deck)\/[a-zA-Z0-9]+/.test(url);
|
|
3785
|
+
}
|
|
3786
|
+
function toFigmaOriginalUrl(url) {
|
|
3787
|
+
if (url.includes("embed.figma.com")) {
|
|
3788
|
+
return url.replace("embed.figma.com", "www.figma.com").replace(/\?.*$/, "");
|
|
3789
|
+
}
|
|
3790
|
+
return url.replace(/\?.*$/, "");
|
|
3791
|
+
}
|
|
3792
|
+
|
|
3518
3793
|
exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME;
|
|
3519
3794
|
exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX;
|
|
3520
3795
|
exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN;
|
|
@@ -3524,6 +3799,7 @@ exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL
|
|
|
3524
3799
|
exports.CONTENT_REF_GROUPS = CONTENT_REF_GROUPS;
|
|
3525
3800
|
exports.CUSTOM_ITEM_ID = CUSTOM_ITEM_ID;
|
|
3526
3801
|
exports.DEFAULT_CONTENT_SUFFIXES = DEFAULT_CONTENT_SUFFIXES;
|
|
3802
|
+
exports.DEFAULT_FOLDER_INDEX_FILE = DEFAULT_FOLDER_INDEX_FILE;
|
|
3527
3803
|
exports.DEFAULT_MIN_FILL_MS = DEFAULT_MIN_FILL_MS;
|
|
3528
3804
|
exports.DEFAULT_OS_PLATFORM = DEFAULT_OS_PLATFORM;
|
|
3529
3805
|
exports.DELIVERY_TASK_TYPE_OPTIONS = DELIVERY_TASK_TYPE_OPTIONS;
|
|
@@ -3549,6 +3825,7 @@ exports.buildAutoContinuationDirective = buildAutoContinuationDirective;
|
|
|
3549
3825
|
exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl;
|
|
3550
3826
|
exports.buildDefaultHref = buildDefaultHref;
|
|
3551
3827
|
exports.buildDiscussAddendum = buildDiscussAddendum;
|
|
3828
|
+
exports.buildDocumentTree = buildDocumentTree;
|
|
3552
3829
|
exports.buildListUrl = buildListUrl;
|
|
3553
3830
|
exports.buildSuggestionUrl = buildSuggestionUrl;
|
|
3554
3831
|
exports.canonicalContentRefType = canonicalContentRefType;
|
|
@@ -3572,7 +3849,9 @@ exports.extractHumanitySignals = extractHumanitySignals;
|
|
|
3572
3849
|
exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync;
|
|
3573
3850
|
exports.extractItemId = extractItemId;
|
|
3574
3851
|
exports.extractItems = extractItems;
|
|
3852
|
+
exports.extractSections = extractSections;
|
|
3575
3853
|
exports.fetchPriorityProp = fetchPriorityProp;
|
|
3854
|
+
exports.findDocNodeByPath = findDocNodeByPath;
|
|
3576
3855
|
exports.flattenAssistantContent = flattenAssistantContent;
|
|
3577
3856
|
exports.formatAbbreviatedNumber = formatAbbreviatedNumber;
|
|
3578
3857
|
exports.formatAbsoluteDate = formatAbsoluteDate;
|
|
@@ -3590,12 +3869,14 @@ exports.formatDateSlashUTC = formatDateSlashUTC;
|
|
|
3590
3869
|
exports.formatDateTime = formatDateTime;
|
|
3591
3870
|
exports.formatDateTimeAt = formatDateTimeAt;
|
|
3592
3871
|
exports.formatDateUTC = formatDateUTC;
|
|
3872
|
+
exports.formatDocName = formatDocName;
|
|
3593
3873
|
exports.formatDuration = formatDuration;
|
|
3594
3874
|
exports.formatDurationCompact = formatDurationCompact;
|
|
3595
3875
|
exports.formatDurationFromMs = formatDurationFromMs;
|
|
3596
3876
|
exports.formatDurationFromRange = formatDurationFromRange;
|
|
3597
3877
|
exports.formatDurationMMSS = formatDurationMMSS;
|
|
3598
3878
|
exports.formatEntryMonthUTC = formatEntryMonthUTC;
|
|
3879
|
+
exports.formatFileSize = formatFileSize;
|
|
3599
3880
|
exports.formatLargeNumber = formatLargeNumber;
|
|
3600
3881
|
exports.formatLegalDate = formatLegalDate;
|
|
3601
3882
|
exports.formatNumber = formatNumber;
|
|
@@ -3631,10 +3912,13 @@ exports.getCurrentPlatform = getCurrentPlatform;
|
|
|
3631
3912
|
exports.getDefaultColorForPlatform = getDefaultColorForPlatform;
|
|
3632
3913
|
exports.getDefaultIconForPlatform = getDefaultIconForPlatform;
|
|
3633
3914
|
exports.getDetailedTimeDifference = getDetailedTimeDifference;
|
|
3915
|
+
exports.getDocAncestorNodeIds = getDocAncestorNodeIds;
|
|
3916
|
+
exports.getDocSourceDefaultPath = getDocSourceDefaultPath;
|
|
3634
3917
|
exports.getDynamicIcon = getDynamicIcon;
|
|
3635
3918
|
exports.getEmbedProxyAuth = getEmbedProxyAuth;
|
|
3636
3919
|
exports.getFirstLastInitials = getFirstLastInitials;
|
|
3637
3920
|
exports.getIconComponent = getIconComponent;
|
|
3921
|
+
exports.getInitialExpandedNodeIds = getInitialExpandedNodeIds;
|
|
3638
3922
|
exports.getOSIcon = getOSIcon;
|
|
3639
3923
|
exports.getOSLabel = getOSLabel;
|
|
3640
3924
|
exports.getOSPlatformId = getOSPlatformId;
|
|
@@ -3665,6 +3949,7 @@ exports.getTrendColors = getTrendColors;
|
|
|
3665
3949
|
exports.hasGenericEmailDomain = hasGenericEmailDomain;
|
|
3666
3950
|
exports.hexToRgb = hexToRgb;
|
|
3667
3951
|
exports.isCrossOriginUrl = isCrossOriginUrl;
|
|
3952
|
+
exports.isFigmaSlidesUrl = isFigmaSlidesUrl;
|
|
3668
3953
|
exports.isGenericDomain = isGenericDomain;
|
|
3669
3954
|
exports.isGenericWebsiteDomain = isGenericWebsiteDomain;
|
|
3670
3955
|
exports.isOSPlatform = isOSPlatform;
|
|
@@ -3673,7 +3958,9 @@ exports.isValidEmailDomain = isValidEmailDomain;
|
|
|
3673
3958
|
exports.isValidToolType = isValidToolType;
|
|
3674
3959
|
exports.isWithinMinutes = isWithinMinutes;
|
|
3675
3960
|
exports.makeComposeContentUrl = makeComposeContentUrl;
|
|
3961
|
+
exports.markdownToPlainText = markdownToPlainText;
|
|
3676
3962
|
exports.nameInitials = nameInitials;
|
|
3963
|
+
exports.normalizeDocPath = normalizeDocPath;
|
|
3677
3964
|
exports.normalizeDomain = normalizeDomain;
|
|
3678
3965
|
exports.normalizeIconKey = normalizeIconKey;
|
|
3679
3966
|
exports.normalizeOSType = normalizeOSType;
|
|
@@ -3682,6 +3969,7 @@ exports.normalizeToolTypeWithFallback = normalizeToolTypeWithFallback;
|
|
|
3682
3969
|
exports.orderContentRefTypes = orderContentRefTypes;
|
|
3683
3970
|
exports.parseScrollAnchor = parseScrollAnchor;
|
|
3684
3971
|
exports.parseWireCommandOverride = parseWireCommandOverride;
|
|
3972
|
+
exports.pathToNodeId = pathToNodeId;
|
|
3685
3973
|
exports.platformColors = platformColors;
|
|
3686
3974
|
exports.platformDescriptions = platformDescriptions;
|
|
3687
3975
|
exports.platformDisplayNames = platformDisplayNames;
|
|
@@ -3691,6 +3979,7 @@ exports.platformIcons = platformIcons;
|
|
|
3691
3979
|
exports.platformSlogans = platformSlogans;
|
|
3692
3980
|
exports.readLeadingDecisionFrame = readLeadingDecisionFrame;
|
|
3693
3981
|
exports.releaseTypeToBadgeColor = releaseTypeToBadgeColor;
|
|
3982
|
+
exports.resolveContentFetchPath = resolveContentFetchPath;
|
|
3694
3983
|
exports.resolveReleaseCover = resolveReleaseCover;
|
|
3695
3984
|
exports.rgbToHex = rgbToHex;
|
|
3696
3985
|
exports.sanitizeTitleForChat = sanitizeTitleForChat;
|
|
@@ -3699,9 +3988,17 @@ exports.serializeJsonLd = serializeJsonLd;
|
|
|
3699
3988
|
exports.setEmbedAuthAdapter = setEmbedAuthAdapter;
|
|
3700
3989
|
exports.setEmbedProxyAuth = setEmbedProxyAuth;
|
|
3701
3990
|
exports.shouldProxyImage = shouldProxyImage;
|
|
3991
|
+
exports.sortTreeChildren = sortTreeChildren;
|
|
3702
3992
|
exports.splitCsvEnv = splitCsvEnv;
|
|
3703
3993
|
exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown;
|
|
3994
|
+
exports.stripFolderIndexFromPath = stripFolderIndexFromPath;
|
|
3704
3995
|
exports.stripHtml = stripHtml;
|
|
3996
|
+
exports.stripInlineMarkdown = stripInlineMarkdown;
|
|
3997
|
+
exports.toDocSlug = toDocSlug;
|
|
3998
|
+
exports.toFigmaEmbedUrl = toFigmaEmbedUrl;
|
|
3999
|
+
exports.toFigmaOriginalUrl = toFigmaOriginalUrl;
|
|
4000
|
+
exports.toGoogleSheetsEmbedUrl = toGoogleSheetsEmbedUrl;
|
|
4001
|
+
exports.toGoogleSheetsOriginalUrl = toGoogleSheetsOriginalUrl;
|
|
3705
4002
|
exports.toToolLabel = toToolLabel;
|
|
3706
4003
|
exports.transformPlatformConfigsToOptions = transformPlatformConfigsToOptions;
|
|
3707
4004
|
exports.truncateString = truncateString;
|