@aiquants/markdown-explorer 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +121 -0
- package/LICENSE +21 -0
- package/README.md +606 -2
- package/dist/ExplorerSplit-D2plJRRe.cjs +1 -0
- package/dist/ExplorerSplit-DB37U7Kh.js +1362 -0
- package/dist/MultiLayout-DCPDu1-l.js +909 -0
- package/dist/MultiLayout-UyWxs6Xy.cjs +1 -0
- package/dist/TreeLayout-BoyFelK2.js +22 -0
- package/dist/TreeLayout-CLWbWjOc.cjs +1 -0
- package/dist/client/MarkdownExplorer.d.cts +30 -0
- package/dist/client/MarkdownExplorer.d.ts +30 -0
- package/dist/client/storage.d.cts +11 -0
- package/dist/client/storage.d.ts +11 -0
- package/dist/core/config.d.cts +77 -0
- package/dist/core/config.d.ts +77 -0
- package/dist/core/contracts.d.cts +155 -0
- package/dist/core/contracts.d.ts +155 -0
- package/dist/core/geometry.d.cts +51 -0
- package/dist/core/geometry.d.ts +51 -0
- package/dist/core/labels.d.cts +180 -0
- package/dist/core/labels.d.ts +180 -0
- package/dist/core/location.d.cts +82 -0
- package/dist/core/location.d.ts +82 -0
- package/dist/core/paths.d.cts +17 -0
- package/dist/core/paths.d.ts +17 -0
- package/dist/core/revalidation.d.cts +2 -0
- package/dist/core/revalidation.d.ts +2 -0
- package/dist/core/theme.d.cts +6 -0
- package/dist/core/theme.d.ts +6 -0
- package/dist/core/treeSettings.d.cts +48 -0
- package/dist/core/treeSettings.d.ts +48 -0
- package/dist/core/viewSettings.d.cts +15 -0
- package/dist/core/viewSettings.d.ts +15 -0
- package/dist/dataRoute-Bkfwfp1R.js +194 -0
- package/dist/dataRoute-CKbdwkQ7.cjs +1 -0
- package/dist/index-BfuAu2GV.js +2107 -0
- package/dist/index-Cx3-jSna.cjs +3 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +44 -0
- package/dist/location-Oo21lTyV.cjs +1 -0
- package/dist/location-fVl2R1ee.js +395 -0
- package/dist/sanitizeWorker.cjs +1 -0
- package/dist/sanitizeWorker.js +281 -0
- package/dist/server/anonymous.d.cts +10 -0
- package/dist/server/anonymous.d.ts +10 -0
- package/dist/server/createMarkdownExplorer.d.cts +12 -0
- package/dist/server/createMarkdownExplorer.d.ts +12 -0
- package/dist/server/errors.d.cts +26 -0
- package/dist/server/errors.d.ts +26 -0
- package/dist/server/fileSystemSource.d.cts +38 -0
- package/dist/server/fileSystemSource.d.ts +38 -0
- package/dist/server/ports.d.cts +107 -0
- package/dist/server/ports.d.ts +107 -0
- package/dist/server/sanitizeProtocol.d.cts +17 -0
- package/dist/server/sanitizeProtocol.d.ts +17 -0
- package/dist/server/sanitizer.d.cts +51 -0
- package/dist/server/sanitizer.d.ts +51 -0
- package/dist/server/workerPool.d.cts +42 -0
- package/dist/server/workerPool.d.ts +42 -0
- package/dist/server.cjs +1 -0
- package/dist/server.d.cts +7 -0
- package/dist/server.d.ts +7 -0
- package/dist/server.js +1253 -0
- package/dist/storage-Bkb2Axdi.cjs +1 -0
- package/dist/storage-DA4ItHzl.js +60 -0
- package/dist/storage.cjs +1 -0
- package/dist/storage.d.cts +1 -0
- package/dist/storage.d.ts +1 -0
- package/dist/storage.js +4 -0
- package/dist/styles/markdown-explorer.css +3 -0
- package/docs/behavior/dom-hooks.md +95 -0
- package/docs/behavior/layout.md +215 -0
- package/docs/behavior/localization.md +48 -0
- package/docs/behavior/security.md +138 -0
- package/docs/behavior/url-contract.md +135 -0
- package/package.json +141 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const GOLDEN_RATIO: number;
|
|
2
|
+
export declare const EXPLORER_DEFAULT_PERCENT: number;
|
|
3
|
+
export declare const EXPLORER_MULTI_DEFAULT_PERCENT: number;
|
|
4
|
+
export declare const EXPLORER_MAX_PERCENT: number;
|
|
5
|
+
export declare const EXPLORER_MIN_REM = 13;
|
|
6
|
+
export declare const ASSUMED_ROOT_FONT_PIXELS = 16;
|
|
7
|
+
export declare const SPLIT_HANDLE_PIXELS: Readonly<{
|
|
8
|
+
gripThickness: 5;
|
|
9
|
+
gripLength: 34;
|
|
10
|
+
barThickness: 2;
|
|
11
|
+
barLength: 21;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const FIBONACCI_SPACING_PIXELS: readonly [
|
|
14
|
+
1,
|
|
15
|
+
2,
|
|
16
|
+
3,
|
|
17
|
+
5,
|
|
18
|
+
8,
|
|
19
|
+
13,
|
|
20
|
+
21,
|
|
21
|
+
34,
|
|
22
|
+
55
|
|
23
|
+
];
|
|
24
|
+
export declare const FIBONACCI_DURATIONS_MS: readonly [
|
|
25
|
+
89,
|
|
26
|
+
144,
|
|
27
|
+
233,
|
|
28
|
+
377
|
|
29
|
+
];
|
|
30
|
+
export declare const CONTROL_BLOCK_PIXELS = 34;
|
|
31
|
+
export declare const COARSE_TARGET_PIXELS = 44;
|
|
32
|
+
export declare const FINE_TARGET_PIXELS = 24;
|
|
33
|
+
export declare const PANEL_MAX_BLOCK_RATIO: number;
|
|
34
|
+
export declare const PANEL_MIN_BLOCK_RATIO: number;
|
|
35
|
+
export declare const COLUMN_MIN_MEASURE = "40ch";
|
|
36
|
+
export declare const explorerMinPixels: (rootFontPixels: number) => number;
|
|
37
|
+
export declare const explorerSheetBelowPixels: (rootFontPixels: number) => number;
|
|
38
|
+
export declare const EXPLORER_WIDTH_PERSIST_DELAY_MS = 233;
|
|
39
|
+
export declare const PREFETCH_DWELL_MS: 89;
|
|
40
|
+
export type ColumnPlanInput = {
|
|
41
|
+
readonly trackInlineSize: number;
|
|
42
|
+
readonly gap: number;
|
|
43
|
+
readonly minColumnInlineSize: number;
|
|
44
|
+
readonly logicalColumns: number;
|
|
45
|
+
};
|
|
46
|
+
export declare const planVisibleColumns: ({ trackInlineSize, gap, minColumnInlineSize, logicalColumns }: ColumnPlanInput) => number;
|
|
47
|
+
export declare const replanVisibleColumns: (previous: number | null, input: ColumnPlanInput) => number | null;
|
|
48
|
+
export declare const columnGroups: (logicalColumns: number, visibleColumns: number) => ReadonlyArray<readonly [
|
|
49
|
+
start: number,
|
|
50
|
+
end: number
|
|
51
|
+
]>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const GOLDEN_RATIO: number;
|
|
2
|
+
export declare const EXPLORER_DEFAULT_PERCENT: number;
|
|
3
|
+
export declare const EXPLORER_MULTI_DEFAULT_PERCENT: number;
|
|
4
|
+
export declare const EXPLORER_MAX_PERCENT: number;
|
|
5
|
+
export declare const EXPLORER_MIN_REM = 13;
|
|
6
|
+
export declare const ASSUMED_ROOT_FONT_PIXELS = 16;
|
|
7
|
+
export declare const SPLIT_HANDLE_PIXELS: Readonly<{
|
|
8
|
+
gripThickness: 5;
|
|
9
|
+
gripLength: 34;
|
|
10
|
+
barThickness: 2;
|
|
11
|
+
barLength: 21;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const FIBONACCI_SPACING_PIXELS: readonly [
|
|
14
|
+
1,
|
|
15
|
+
2,
|
|
16
|
+
3,
|
|
17
|
+
5,
|
|
18
|
+
8,
|
|
19
|
+
13,
|
|
20
|
+
21,
|
|
21
|
+
34,
|
|
22
|
+
55
|
|
23
|
+
];
|
|
24
|
+
export declare const FIBONACCI_DURATIONS_MS: readonly [
|
|
25
|
+
89,
|
|
26
|
+
144,
|
|
27
|
+
233,
|
|
28
|
+
377
|
|
29
|
+
];
|
|
30
|
+
export declare const CONTROL_BLOCK_PIXELS = 34;
|
|
31
|
+
export declare const COARSE_TARGET_PIXELS = 44;
|
|
32
|
+
export declare const FINE_TARGET_PIXELS = 24;
|
|
33
|
+
export declare const PANEL_MAX_BLOCK_RATIO: number;
|
|
34
|
+
export declare const PANEL_MIN_BLOCK_RATIO: number;
|
|
35
|
+
export declare const COLUMN_MIN_MEASURE = "40ch";
|
|
36
|
+
export declare const explorerMinPixels: (rootFontPixels: number) => number;
|
|
37
|
+
export declare const explorerSheetBelowPixels: (rootFontPixels: number) => number;
|
|
38
|
+
export declare const EXPLORER_WIDTH_PERSIST_DELAY_MS = 233;
|
|
39
|
+
export declare const PREFETCH_DWELL_MS: 89;
|
|
40
|
+
export type ColumnPlanInput = {
|
|
41
|
+
readonly trackInlineSize: number;
|
|
42
|
+
readonly gap: number;
|
|
43
|
+
readonly minColumnInlineSize: number;
|
|
44
|
+
readonly logicalColumns: number;
|
|
45
|
+
};
|
|
46
|
+
export declare const planVisibleColumns: ({ trackInlineSize, gap, minColumnInlineSize, logicalColumns }: ColumnPlanInput) => number;
|
|
47
|
+
export declare const replanVisibleColumns: (previous: number | null, input: ColumnPlanInput) => number | null;
|
|
48
|
+
export declare const columnGroups: (logicalColumns: number, visibleColumns: number) => ReadonlyArray<readonly [
|
|
49
|
+
start: number,
|
|
50
|
+
end: number
|
|
51
|
+
]>;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export declare const MARKDOWN_EXPLORER_LOCALES: readonly [
|
|
2
|
+
"en",
|
|
3
|
+
"ja"
|
|
4
|
+
];
|
|
5
|
+
export type MarkdownExplorerLocale = (typeof MARKDOWN_EXPLORER_LOCALES)[number];
|
|
6
|
+
export declare const DEFAULT_MARKDOWN_EXPLORER_LOCALE: MarkdownExplorerLocale;
|
|
7
|
+
export type MarkdownExplorerLabels = {
|
|
8
|
+
readonly explorerRegion: string;
|
|
9
|
+
readonly sourceLabel: string;
|
|
10
|
+
readonly refreshTreeLabel: string;
|
|
11
|
+
readonly refreshTree: string;
|
|
12
|
+
readonly treeRefreshed: string;
|
|
13
|
+
readonly treeRefreshFailed: (reason: string) => string;
|
|
14
|
+
readonly refreshDocumentLabel: string;
|
|
15
|
+
readonly refreshDocument: string;
|
|
16
|
+
readonly refreshDocumentNamed: (name: string) => string;
|
|
17
|
+
readonly documentRefreshed: (name: string) => string;
|
|
18
|
+
readonly documentRefreshFailed: (reason: string) => string;
|
|
19
|
+
readonly expandAll: string;
|
|
20
|
+
readonly collapseAll: string;
|
|
21
|
+
readonly treeSettings: string;
|
|
22
|
+
readonly switchToMulti: string;
|
|
23
|
+
readonly switchToTree: string;
|
|
24
|
+
readonly resizeExplorer: string;
|
|
25
|
+
readonly showExplorer: string;
|
|
26
|
+
readonly hideExplorer: string;
|
|
27
|
+
readonly treeRegion: string;
|
|
28
|
+
readonly treeLoading: string;
|
|
29
|
+
readonly treeEmptyTitle: string;
|
|
30
|
+
readonly treeEmptyBody: string;
|
|
31
|
+
readonly folderLoadFailed: string;
|
|
32
|
+
readonly loopFolderName: (name: string) => string;
|
|
33
|
+
readonly foldersLoadFailedNamed: (names: readonly string[]) => string;
|
|
34
|
+
readonly foldersLoading: (count: number) => string;
|
|
35
|
+
readonly expandAllStarted: string;
|
|
36
|
+
readonly expandAllProgress: (opened: number, loading: number) => string;
|
|
37
|
+
readonly expandAllDone: (opened: number, failed: number, complete: boolean) => string;
|
|
38
|
+
readonly expandAllFolderLimit: (opened: number, limit: number, expandAll: string) => string;
|
|
39
|
+
readonly expandAllDepthLimit: (opened: number, depth: number) => string;
|
|
40
|
+
readonly treeEntryKindDirectory: string;
|
|
41
|
+
readonly treeEntryKindFile: string;
|
|
42
|
+
readonly treeScrollUp: string;
|
|
43
|
+
readonly treeScrollDown: string;
|
|
44
|
+
readonly treeScrollToTop: string;
|
|
45
|
+
readonly treeScrollToBottom: string;
|
|
46
|
+
readonly selectionTitle: (count: number) => string;
|
|
47
|
+
readonly clearSelection: string;
|
|
48
|
+
readonly openSelectionInMulti: (count: number) => string;
|
|
49
|
+
readonly removeFromSelection: (name: string) => string;
|
|
50
|
+
readonly settingSortMode: string;
|
|
51
|
+
readonly sortNative: string;
|
|
52
|
+
readonly sortAscending: string;
|
|
53
|
+
readonly sortDescending: string;
|
|
54
|
+
readonly settingDirectoriesFirst: string;
|
|
55
|
+
readonly settingSelectionMode: string;
|
|
56
|
+
readonly selectionSingle: string;
|
|
57
|
+
readonly selectionMultiple: string;
|
|
58
|
+
readonly selectionNone: string;
|
|
59
|
+
readonly settingDoubleClick: string;
|
|
60
|
+
readonly doubleClickRecursive: string;
|
|
61
|
+
readonly doubleClickToggle: string;
|
|
62
|
+
readonly settingExpandIconSize: string;
|
|
63
|
+
readonly expandIconSizeValue: (pixels: number) => string;
|
|
64
|
+
readonly settingAlwaysExpanded: string;
|
|
65
|
+
readonly settingRemoveRootIndent: string;
|
|
66
|
+
readonly settingTreeLines: string;
|
|
67
|
+
readonly settingExpandIcons: string;
|
|
68
|
+
readonly settingDirectoryIcons: string;
|
|
69
|
+
readonly settingFileIcons: string;
|
|
70
|
+
readonly settingOn: string;
|
|
71
|
+
readonly settingOff: string;
|
|
72
|
+
readonly settingAnnouncement: (setting: string, value: string) => string;
|
|
73
|
+
readonly documentRegion: string;
|
|
74
|
+
readonly documentEmpty: string;
|
|
75
|
+
readonly documentLoading: string;
|
|
76
|
+
readonly documentShown: (name: string) => string;
|
|
77
|
+
readonly documentFailed: (name: string, title: string) => string;
|
|
78
|
+
readonly announcementSequence: (messages: readonly string[]) => string;
|
|
79
|
+
readonly textTruncated: string;
|
|
80
|
+
readonly inertLink: string;
|
|
81
|
+
readonly failureUnauthorizedTitle: string;
|
|
82
|
+
readonly failureUnauthorizedBody: string;
|
|
83
|
+
readonly failureForbiddenTitle: string;
|
|
84
|
+
readonly failureForbiddenBody: string;
|
|
85
|
+
readonly failureNotFoundTitle: string;
|
|
86
|
+
readonly failureNotFoundBody: string;
|
|
87
|
+
readonly failureNotConfiguredTitle: string;
|
|
88
|
+
readonly failureNotConfiguredBody: string;
|
|
89
|
+
readonly failureInvalidTitle: string;
|
|
90
|
+
readonly failureInvalidBody: string;
|
|
91
|
+
readonly failureTooLargeTitle: string;
|
|
92
|
+
readonly failureTooLargeBody: string;
|
|
93
|
+
readonly failureUnsupportedTitle: string;
|
|
94
|
+
readonly failureUnsupportedBody: string;
|
|
95
|
+
readonly failureFailedTitle: string;
|
|
96
|
+
readonly failureFailedBody: string;
|
|
97
|
+
readonly retry: string;
|
|
98
|
+
readonly reloadPage: string;
|
|
99
|
+
readonly imageZoomIn: string;
|
|
100
|
+
readonly imageZoomOut: string;
|
|
101
|
+
readonly imageFit: string;
|
|
102
|
+
readonly imageFitLevel: string;
|
|
103
|
+
readonly imageZoomLevel: (percent: number) => string;
|
|
104
|
+
readonly openInNewTab: string;
|
|
105
|
+
readonly download: string;
|
|
106
|
+
readonly mediaUnsupported: string;
|
|
107
|
+
readonly fileNotShown: string;
|
|
108
|
+
readonly viewerLoading: string;
|
|
109
|
+
readonly viewerErrorPrefix: string;
|
|
110
|
+
readonly viewerStyleTitle: string;
|
|
111
|
+
readonly viewerSelectStyle: string;
|
|
112
|
+
readonly viewerPinStyle: string;
|
|
113
|
+
readonly viewerUnpinStyle: string;
|
|
114
|
+
readonly viewerErrorTitle: string;
|
|
115
|
+
readonly viewerMissingImage: string;
|
|
116
|
+
readonly viewerOpenToc: string;
|
|
117
|
+
readonly viewerTocTitle: string;
|
|
118
|
+
readonly viewerPinToc: string;
|
|
119
|
+
readonly viewerUnpinToc: string;
|
|
120
|
+
readonly viewerSelectAlign: string;
|
|
121
|
+
readonly viewerAlignTitle: string;
|
|
122
|
+
readonly viewerPinAlign: string;
|
|
123
|
+
readonly viewerUnpinAlign: string;
|
|
124
|
+
readonly viewerAlignLeft: string;
|
|
125
|
+
readonly viewerAlignCenter: string;
|
|
126
|
+
readonly viewerAlignRight: string;
|
|
127
|
+
readonly viewerMermaidInteractionMode: string;
|
|
128
|
+
readonly viewerMermaidModeNone: string;
|
|
129
|
+
readonly viewerMermaidModeZoom: string;
|
|
130
|
+
readonly viewerMermaidModePan: string;
|
|
131
|
+
readonly viewerMermaidModePanShift: string;
|
|
132
|
+
readonly viewerMermaidModeBoth: string;
|
|
133
|
+
readonly viewerMermaidModeBothShift: string;
|
|
134
|
+
readonly viewerMermaidZoomIn: string;
|
|
135
|
+
readonly viewerMermaidZoomOut: string;
|
|
136
|
+
readonly viewerMermaidResetView: string;
|
|
137
|
+
readonly viewerMermaidRetry: string;
|
|
138
|
+
readonly viewerEmbeddedVideo: string;
|
|
139
|
+
readonly viewerEmbeddedPost: string;
|
|
140
|
+
readonly viewerEmbeddedFrame: string;
|
|
141
|
+
readonly multiRegion: string;
|
|
142
|
+
readonly multiEmpty: string;
|
|
143
|
+
readonly panelLimit: (max: number) => string;
|
|
144
|
+
readonly panelOpened: (name: string) => string;
|
|
145
|
+
readonly panelClosed: (name: string) => string;
|
|
146
|
+
readonly panelAlreadyOpen: (name: string) => string;
|
|
147
|
+
readonly panelHidden: (name: string) => string;
|
|
148
|
+
readonly panelShown: (name: string) => string;
|
|
149
|
+
readonly panelMaximized: (name: string) => string;
|
|
150
|
+
readonly panelRestored: (name: string) => string;
|
|
151
|
+
readonly panelHide: string;
|
|
152
|
+
readonly panelMaximize: string;
|
|
153
|
+
readonly panelRestore: string;
|
|
154
|
+
readonly panelClose: string;
|
|
155
|
+
readonly panelSwitchToCustomDrag: string;
|
|
156
|
+
readonly panelSwitchToNormalDrag: string;
|
|
157
|
+
readonly panelCustomDragBadge: string;
|
|
158
|
+
readonly panelMovePreviousColumn: string;
|
|
159
|
+
readonly panelMoveNextColumn: string;
|
|
160
|
+
readonly panelMoveUp: string;
|
|
161
|
+
readonly panelMoveDown: string;
|
|
162
|
+
readonly panelMoved: string;
|
|
163
|
+
readonly panelMoveUnavailable: string;
|
|
164
|
+
readonly panelDragStarted: string;
|
|
165
|
+
readonly panelDragCancelled: string;
|
|
166
|
+
readonly hiddenPanelsTitle: string;
|
|
167
|
+
readonly hiddenPanelBadge: string;
|
|
168
|
+
readonly hiddenPanelNotice: string;
|
|
169
|
+
readonly multiColumnEmpty: string;
|
|
170
|
+
readonly multiColumnRegion: string;
|
|
171
|
+
readonly panelDropHere: string;
|
|
172
|
+
};
|
|
173
|
+
export type MarkdownExplorerLabelKey = keyof MarkdownExplorerLabels;
|
|
174
|
+
export type MarkdownExplorerLabelOverrides = Partial<MarkdownExplorerLabels>;
|
|
175
|
+
export declare const MARKDOWN_EXPLORER_LABEL_TEMPLATES: Readonly<Partial<Record<MarkdownExplorerLabelKey, readonly string[]>>>;
|
|
176
|
+
export declare const MARKDOWN_EXPLORER_LABEL_CATALOGS: Readonly<Record<MarkdownExplorerLocale, MarkdownExplorerLabels>>;
|
|
177
|
+
export declare const MARKDOWN_EXPLORER_LABEL_KEYS: readonly MarkdownExplorerLabelKey[];
|
|
178
|
+
export declare const resolveMarkdownExplorerLocale: (locale: unknown) => MarkdownExplorerLocale;
|
|
179
|
+
export declare const resolveMarkdownExplorerLabels: (locale: unknown, overrides: unknown) => MarkdownExplorerLabels;
|
|
180
|
+
export declare const areLabelOverridesEqual: (previous: unknown, next: unknown) => boolean;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export declare const MARKDOWN_EXPLORER_LOCALES: readonly [
|
|
2
|
+
"en",
|
|
3
|
+
"ja"
|
|
4
|
+
];
|
|
5
|
+
export type MarkdownExplorerLocale = (typeof MARKDOWN_EXPLORER_LOCALES)[number];
|
|
6
|
+
export declare const DEFAULT_MARKDOWN_EXPLORER_LOCALE: MarkdownExplorerLocale;
|
|
7
|
+
export type MarkdownExplorerLabels = {
|
|
8
|
+
readonly explorerRegion: string;
|
|
9
|
+
readonly sourceLabel: string;
|
|
10
|
+
readonly refreshTreeLabel: string;
|
|
11
|
+
readonly refreshTree: string;
|
|
12
|
+
readonly treeRefreshed: string;
|
|
13
|
+
readonly treeRefreshFailed: (reason: string) => string;
|
|
14
|
+
readonly refreshDocumentLabel: string;
|
|
15
|
+
readonly refreshDocument: string;
|
|
16
|
+
readonly refreshDocumentNamed: (name: string) => string;
|
|
17
|
+
readonly documentRefreshed: (name: string) => string;
|
|
18
|
+
readonly documentRefreshFailed: (reason: string) => string;
|
|
19
|
+
readonly expandAll: string;
|
|
20
|
+
readonly collapseAll: string;
|
|
21
|
+
readonly treeSettings: string;
|
|
22
|
+
readonly switchToMulti: string;
|
|
23
|
+
readonly switchToTree: string;
|
|
24
|
+
readonly resizeExplorer: string;
|
|
25
|
+
readonly showExplorer: string;
|
|
26
|
+
readonly hideExplorer: string;
|
|
27
|
+
readonly treeRegion: string;
|
|
28
|
+
readonly treeLoading: string;
|
|
29
|
+
readonly treeEmptyTitle: string;
|
|
30
|
+
readonly treeEmptyBody: string;
|
|
31
|
+
readonly folderLoadFailed: string;
|
|
32
|
+
readonly loopFolderName: (name: string) => string;
|
|
33
|
+
readonly foldersLoadFailedNamed: (names: readonly string[]) => string;
|
|
34
|
+
readonly foldersLoading: (count: number) => string;
|
|
35
|
+
readonly expandAllStarted: string;
|
|
36
|
+
readonly expandAllProgress: (opened: number, loading: number) => string;
|
|
37
|
+
readonly expandAllDone: (opened: number, failed: number, complete: boolean) => string;
|
|
38
|
+
readonly expandAllFolderLimit: (opened: number, limit: number, expandAll: string) => string;
|
|
39
|
+
readonly expandAllDepthLimit: (opened: number, depth: number) => string;
|
|
40
|
+
readonly treeEntryKindDirectory: string;
|
|
41
|
+
readonly treeEntryKindFile: string;
|
|
42
|
+
readonly treeScrollUp: string;
|
|
43
|
+
readonly treeScrollDown: string;
|
|
44
|
+
readonly treeScrollToTop: string;
|
|
45
|
+
readonly treeScrollToBottom: string;
|
|
46
|
+
readonly selectionTitle: (count: number) => string;
|
|
47
|
+
readonly clearSelection: string;
|
|
48
|
+
readonly openSelectionInMulti: (count: number) => string;
|
|
49
|
+
readonly removeFromSelection: (name: string) => string;
|
|
50
|
+
readonly settingSortMode: string;
|
|
51
|
+
readonly sortNative: string;
|
|
52
|
+
readonly sortAscending: string;
|
|
53
|
+
readonly sortDescending: string;
|
|
54
|
+
readonly settingDirectoriesFirst: string;
|
|
55
|
+
readonly settingSelectionMode: string;
|
|
56
|
+
readonly selectionSingle: string;
|
|
57
|
+
readonly selectionMultiple: string;
|
|
58
|
+
readonly selectionNone: string;
|
|
59
|
+
readonly settingDoubleClick: string;
|
|
60
|
+
readonly doubleClickRecursive: string;
|
|
61
|
+
readonly doubleClickToggle: string;
|
|
62
|
+
readonly settingExpandIconSize: string;
|
|
63
|
+
readonly expandIconSizeValue: (pixels: number) => string;
|
|
64
|
+
readonly settingAlwaysExpanded: string;
|
|
65
|
+
readonly settingRemoveRootIndent: string;
|
|
66
|
+
readonly settingTreeLines: string;
|
|
67
|
+
readonly settingExpandIcons: string;
|
|
68
|
+
readonly settingDirectoryIcons: string;
|
|
69
|
+
readonly settingFileIcons: string;
|
|
70
|
+
readonly settingOn: string;
|
|
71
|
+
readonly settingOff: string;
|
|
72
|
+
readonly settingAnnouncement: (setting: string, value: string) => string;
|
|
73
|
+
readonly documentRegion: string;
|
|
74
|
+
readonly documentEmpty: string;
|
|
75
|
+
readonly documentLoading: string;
|
|
76
|
+
readonly documentShown: (name: string) => string;
|
|
77
|
+
readonly documentFailed: (name: string, title: string) => string;
|
|
78
|
+
readonly announcementSequence: (messages: readonly string[]) => string;
|
|
79
|
+
readonly textTruncated: string;
|
|
80
|
+
readonly inertLink: string;
|
|
81
|
+
readonly failureUnauthorizedTitle: string;
|
|
82
|
+
readonly failureUnauthorizedBody: string;
|
|
83
|
+
readonly failureForbiddenTitle: string;
|
|
84
|
+
readonly failureForbiddenBody: string;
|
|
85
|
+
readonly failureNotFoundTitle: string;
|
|
86
|
+
readonly failureNotFoundBody: string;
|
|
87
|
+
readonly failureNotConfiguredTitle: string;
|
|
88
|
+
readonly failureNotConfiguredBody: string;
|
|
89
|
+
readonly failureInvalidTitle: string;
|
|
90
|
+
readonly failureInvalidBody: string;
|
|
91
|
+
readonly failureTooLargeTitle: string;
|
|
92
|
+
readonly failureTooLargeBody: string;
|
|
93
|
+
readonly failureUnsupportedTitle: string;
|
|
94
|
+
readonly failureUnsupportedBody: string;
|
|
95
|
+
readonly failureFailedTitle: string;
|
|
96
|
+
readonly failureFailedBody: string;
|
|
97
|
+
readonly retry: string;
|
|
98
|
+
readonly reloadPage: string;
|
|
99
|
+
readonly imageZoomIn: string;
|
|
100
|
+
readonly imageZoomOut: string;
|
|
101
|
+
readonly imageFit: string;
|
|
102
|
+
readonly imageFitLevel: string;
|
|
103
|
+
readonly imageZoomLevel: (percent: number) => string;
|
|
104
|
+
readonly openInNewTab: string;
|
|
105
|
+
readonly download: string;
|
|
106
|
+
readonly mediaUnsupported: string;
|
|
107
|
+
readonly fileNotShown: string;
|
|
108
|
+
readonly viewerLoading: string;
|
|
109
|
+
readonly viewerErrorPrefix: string;
|
|
110
|
+
readonly viewerStyleTitle: string;
|
|
111
|
+
readonly viewerSelectStyle: string;
|
|
112
|
+
readonly viewerPinStyle: string;
|
|
113
|
+
readonly viewerUnpinStyle: string;
|
|
114
|
+
readonly viewerErrorTitle: string;
|
|
115
|
+
readonly viewerMissingImage: string;
|
|
116
|
+
readonly viewerOpenToc: string;
|
|
117
|
+
readonly viewerTocTitle: string;
|
|
118
|
+
readonly viewerPinToc: string;
|
|
119
|
+
readonly viewerUnpinToc: string;
|
|
120
|
+
readonly viewerSelectAlign: string;
|
|
121
|
+
readonly viewerAlignTitle: string;
|
|
122
|
+
readonly viewerPinAlign: string;
|
|
123
|
+
readonly viewerUnpinAlign: string;
|
|
124
|
+
readonly viewerAlignLeft: string;
|
|
125
|
+
readonly viewerAlignCenter: string;
|
|
126
|
+
readonly viewerAlignRight: string;
|
|
127
|
+
readonly viewerMermaidInteractionMode: string;
|
|
128
|
+
readonly viewerMermaidModeNone: string;
|
|
129
|
+
readonly viewerMermaidModeZoom: string;
|
|
130
|
+
readonly viewerMermaidModePan: string;
|
|
131
|
+
readonly viewerMermaidModePanShift: string;
|
|
132
|
+
readonly viewerMermaidModeBoth: string;
|
|
133
|
+
readonly viewerMermaidModeBothShift: string;
|
|
134
|
+
readonly viewerMermaidZoomIn: string;
|
|
135
|
+
readonly viewerMermaidZoomOut: string;
|
|
136
|
+
readonly viewerMermaidResetView: string;
|
|
137
|
+
readonly viewerMermaidRetry: string;
|
|
138
|
+
readonly viewerEmbeddedVideo: string;
|
|
139
|
+
readonly viewerEmbeddedPost: string;
|
|
140
|
+
readonly viewerEmbeddedFrame: string;
|
|
141
|
+
readonly multiRegion: string;
|
|
142
|
+
readonly multiEmpty: string;
|
|
143
|
+
readonly panelLimit: (max: number) => string;
|
|
144
|
+
readonly panelOpened: (name: string) => string;
|
|
145
|
+
readonly panelClosed: (name: string) => string;
|
|
146
|
+
readonly panelAlreadyOpen: (name: string) => string;
|
|
147
|
+
readonly panelHidden: (name: string) => string;
|
|
148
|
+
readonly panelShown: (name: string) => string;
|
|
149
|
+
readonly panelMaximized: (name: string) => string;
|
|
150
|
+
readonly panelRestored: (name: string) => string;
|
|
151
|
+
readonly panelHide: string;
|
|
152
|
+
readonly panelMaximize: string;
|
|
153
|
+
readonly panelRestore: string;
|
|
154
|
+
readonly panelClose: string;
|
|
155
|
+
readonly panelSwitchToCustomDrag: string;
|
|
156
|
+
readonly panelSwitchToNormalDrag: string;
|
|
157
|
+
readonly panelCustomDragBadge: string;
|
|
158
|
+
readonly panelMovePreviousColumn: string;
|
|
159
|
+
readonly panelMoveNextColumn: string;
|
|
160
|
+
readonly panelMoveUp: string;
|
|
161
|
+
readonly panelMoveDown: string;
|
|
162
|
+
readonly panelMoved: string;
|
|
163
|
+
readonly panelMoveUnavailable: string;
|
|
164
|
+
readonly panelDragStarted: string;
|
|
165
|
+
readonly panelDragCancelled: string;
|
|
166
|
+
readonly hiddenPanelsTitle: string;
|
|
167
|
+
readonly hiddenPanelBadge: string;
|
|
168
|
+
readonly hiddenPanelNotice: string;
|
|
169
|
+
readonly multiColumnEmpty: string;
|
|
170
|
+
readonly multiColumnRegion: string;
|
|
171
|
+
readonly panelDropHere: string;
|
|
172
|
+
};
|
|
173
|
+
export type MarkdownExplorerLabelKey = keyof MarkdownExplorerLabels;
|
|
174
|
+
export type MarkdownExplorerLabelOverrides = Partial<MarkdownExplorerLabels>;
|
|
175
|
+
export declare const MARKDOWN_EXPLORER_LABEL_TEMPLATES: Readonly<Partial<Record<MarkdownExplorerLabelKey, readonly string[]>>>;
|
|
176
|
+
export declare const MARKDOWN_EXPLORER_LABEL_CATALOGS: Readonly<Record<MarkdownExplorerLocale, MarkdownExplorerLabels>>;
|
|
177
|
+
export declare const MARKDOWN_EXPLORER_LABEL_KEYS: readonly MarkdownExplorerLabelKey[];
|
|
178
|
+
export declare const resolveMarkdownExplorerLocale: (locale: unknown) => MarkdownExplorerLocale;
|
|
179
|
+
export declare const resolveMarkdownExplorerLabels: (locale: unknown, overrides: unknown) => MarkdownExplorerLabels;
|
|
180
|
+
export declare const areLabelOverridesEqual: (previous: unknown, next: unknown) => boolean;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ExplorerConfig, ExplorerLocationConfig } from "./config.cjs";
|
|
2
|
+
import { ContentAlignment } from "./viewSettings.cjs";
|
|
3
|
+
export type ExplorerOverrides = {
|
|
4
|
+
readonly style?: string;
|
|
5
|
+
readonly align?: ContentAlignment;
|
|
6
|
+
};
|
|
7
|
+
export type ExplorerEmbedOptions = {
|
|
8
|
+
readonly showToc?: boolean;
|
|
9
|
+
readonly showStyle?: boolean;
|
|
10
|
+
readonly showAlign?: boolean;
|
|
11
|
+
readonly padding?: number;
|
|
12
|
+
readonly width?: string;
|
|
13
|
+
readonly maxWidth?: string;
|
|
14
|
+
};
|
|
15
|
+
export type ExplorerLocation = {
|
|
16
|
+
readonly view: "tree";
|
|
17
|
+
readonly source: string;
|
|
18
|
+
readonly doc: string | null;
|
|
19
|
+
readonly overrides: ExplorerOverrides;
|
|
20
|
+
} | {
|
|
21
|
+
readonly view: "multi";
|
|
22
|
+
readonly source: string;
|
|
23
|
+
readonly docs: readonly string[];
|
|
24
|
+
readonly maximized: string | null;
|
|
25
|
+
} | {
|
|
26
|
+
readonly view: "single";
|
|
27
|
+
readonly source: string;
|
|
28
|
+
readonly doc: string;
|
|
29
|
+
readonly overrides: ExplorerOverrides;
|
|
30
|
+
readonly embed: ExplorerEmbedOptions;
|
|
31
|
+
};
|
|
32
|
+
export type ExplorerLocationResult = {
|
|
33
|
+
readonly kind: "location";
|
|
34
|
+
readonly location: ExplorerLocation;
|
|
35
|
+
} | {
|
|
36
|
+
readonly kind: "redirect";
|
|
37
|
+
readonly href: string;
|
|
38
|
+
readonly location: ExplorerLocation;
|
|
39
|
+
};
|
|
40
|
+
export type ExplorerHrefTarget = {
|
|
41
|
+
readonly view: "tree";
|
|
42
|
+
readonly source?: string;
|
|
43
|
+
readonly doc?: string | null;
|
|
44
|
+
readonly overrides?: ExplorerOverrides;
|
|
45
|
+
} | {
|
|
46
|
+
readonly view: "multi";
|
|
47
|
+
readonly source?: string;
|
|
48
|
+
readonly docs?: readonly string[];
|
|
49
|
+
readonly maximized?: string | null;
|
|
50
|
+
} | {
|
|
51
|
+
readonly view: "single";
|
|
52
|
+
readonly source?: string;
|
|
53
|
+
readonly doc: string;
|
|
54
|
+
readonly overrides?: ExplorerOverrides;
|
|
55
|
+
readonly embed?: ExplorerEmbedOptions;
|
|
56
|
+
};
|
|
57
|
+
export type ExplorerSourcelessHrefTarget = ExplorerHrefTarget & {
|
|
58
|
+
readonly source?: undefined;
|
|
59
|
+
};
|
|
60
|
+
type ExplorerHrefWriter = {
|
|
61
|
+
(config: ExplorerLocationConfig, target: ExplorerHrefTarget): string;
|
|
62
|
+
(config: ExplorerConfig, target: ExplorerSourcelessHrefTarget): string;
|
|
63
|
+
};
|
|
64
|
+
export declare const EXPLORER_QUERY: Readonly<{
|
|
65
|
+
readonly source: "source";
|
|
66
|
+
readonly doc: "doc";
|
|
67
|
+
readonly maximized: "maximized";
|
|
68
|
+
readonly style: "style";
|
|
69
|
+
readonly align: "align";
|
|
70
|
+
readonly showToc: "showToc";
|
|
71
|
+
readonly showStyle: "showStyle";
|
|
72
|
+
readonly showAlign: "showAlign";
|
|
73
|
+
readonly padding: "padding";
|
|
74
|
+
readonly width: "width";
|
|
75
|
+
readonly maxWidth: "maxWidth";
|
|
76
|
+
}>;
|
|
77
|
+
export declare const encodeDocumentSegment: (path: string) => string;
|
|
78
|
+
export declare const decodeDocumentSegment: (segment: string) => string;
|
|
79
|
+
export declare const canonicalMultiDocuments: (config: ExplorerConfig, docs: readonly string[]) => readonly string[];
|
|
80
|
+
export declare const explorerHref: ExplorerHrefWriter;
|
|
81
|
+
export declare const resolveExplorerLocation: (config: ExplorerLocationConfig, splat: string | undefined, search: URLSearchParams) => ExplorerLocationResult;
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ExplorerConfig, ExplorerLocationConfig } from "./config.js";
|
|
2
|
+
import { ContentAlignment } from "./viewSettings.js";
|
|
3
|
+
export type ExplorerOverrides = {
|
|
4
|
+
readonly style?: string;
|
|
5
|
+
readonly align?: ContentAlignment;
|
|
6
|
+
};
|
|
7
|
+
export type ExplorerEmbedOptions = {
|
|
8
|
+
readonly showToc?: boolean;
|
|
9
|
+
readonly showStyle?: boolean;
|
|
10
|
+
readonly showAlign?: boolean;
|
|
11
|
+
readonly padding?: number;
|
|
12
|
+
readonly width?: string;
|
|
13
|
+
readonly maxWidth?: string;
|
|
14
|
+
};
|
|
15
|
+
export type ExplorerLocation = {
|
|
16
|
+
readonly view: "tree";
|
|
17
|
+
readonly source: string;
|
|
18
|
+
readonly doc: string | null;
|
|
19
|
+
readonly overrides: ExplorerOverrides;
|
|
20
|
+
} | {
|
|
21
|
+
readonly view: "multi";
|
|
22
|
+
readonly source: string;
|
|
23
|
+
readonly docs: readonly string[];
|
|
24
|
+
readonly maximized: string | null;
|
|
25
|
+
} | {
|
|
26
|
+
readonly view: "single";
|
|
27
|
+
readonly source: string;
|
|
28
|
+
readonly doc: string;
|
|
29
|
+
readonly overrides: ExplorerOverrides;
|
|
30
|
+
readonly embed: ExplorerEmbedOptions;
|
|
31
|
+
};
|
|
32
|
+
export type ExplorerLocationResult = {
|
|
33
|
+
readonly kind: "location";
|
|
34
|
+
readonly location: ExplorerLocation;
|
|
35
|
+
} | {
|
|
36
|
+
readonly kind: "redirect";
|
|
37
|
+
readonly href: string;
|
|
38
|
+
readonly location: ExplorerLocation;
|
|
39
|
+
};
|
|
40
|
+
export type ExplorerHrefTarget = {
|
|
41
|
+
readonly view: "tree";
|
|
42
|
+
readonly source?: string;
|
|
43
|
+
readonly doc?: string | null;
|
|
44
|
+
readonly overrides?: ExplorerOverrides;
|
|
45
|
+
} | {
|
|
46
|
+
readonly view: "multi";
|
|
47
|
+
readonly source?: string;
|
|
48
|
+
readonly docs?: readonly string[];
|
|
49
|
+
readonly maximized?: string | null;
|
|
50
|
+
} | {
|
|
51
|
+
readonly view: "single";
|
|
52
|
+
readonly source?: string;
|
|
53
|
+
readonly doc: string;
|
|
54
|
+
readonly overrides?: ExplorerOverrides;
|
|
55
|
+
readonly embed?: ExplorerEmbedOptions;
|
|
56
|
+
};
|
|
57
|
+
export type ExplorerSourcelessHrefTarget = ExplorerHrefTarget & {
|
|
58
|
+
readonly source?: undefined;
|
|
59
|
+
};
|
|
60
|
+
type ExplorerHrefWriter = {
|
|
61
|
+
(config: ExplorerLocationConfig, target: ExplorerHrefTarget): string;
|
|
62
|
+
(config: ExplorerConfig, target: ExplorerSourcelessHrefTarget): string;
|
|
63
|
+
};
|
|
64
|
+
export declare const EXPLORER_QUERY: Readonly<{
|
|
65
|
+
readonly source: "source";
|
|
66
|
+
readonly doc: "doc";
|
|
67
|
+
readonly maximized: "maximized";
|
|
68
|
+
readonly style: "style";
|
|
69
|
+
readonly align: "align";
|
|
70
|
+
readonly showToc: "showToc";
|
|
71
|
+
readonly showStyle: "showStyle";
|
|
72
|
+
readonly showAlign: "showAlign";
|
|
73
|
+
readonly padding: "padding";
|
|
74
|
+
readonly width: "width";
|
|
75
|
+
readonly maxWidth: "maxWidth";
|
|
76
|
+
}>;
|
|
77
|
+
export declare const encodeDocumentSegment: (path: string) => string;
|
|
78
|
+
export declare const decodeDocumentSegment: (segment: string) => string;
|
|
79
|
+
export declare const canonicalMultiDocuments: (config: ExplorerConfig, docs: readonly string[]) => readonly string[];
|
|
80
|
+
export declare const explorerHref: ExplorerHrefWriter;
|
|
81
|
+
export declare const resolveExplorerLocation: (config: ExplorerLocationConfig, splat: string | undefined, search: URLSearchParams) => ExplorerLocationResult;
|
|
82
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const MAX_DOCUMENT_PATH_LENGTH = 4096;
|
|
2
|
+
export declare const DENY_DECODE_LEVELS = 3;
|
|
3
|
+
export declare const DEFAULT_DENIED_PATH_SEGMENTS: readonly string[];
|
|
4
|
+
export type ExplorerPathRules = readonly string[];
|
|
5
|
+
export type CompiledPathRules = {
|
|
6
|
+
readonly deniesPath: (path: string) => boolean;
|
|
7
|
+
readonly deniesName: (name: string) => boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const lastPathSegment: (doc: string) => string;
|
|
10
|
+
export declare const isAcceptableDocumentPath: (path: string) => boolean;
|
|
11
|
+
export declare const foldForComparison: (text: string) => string;
|
|
12
|
+
export declare const decodePercentLeniently: (text: string) => string;
|
|
13
|
+
export declare const compilePathRules: (rules: ExplorerPathRules) => CompiledPathRules;
|
|
14
|
+
export declare const DEFAULT_PATH_RULES: CompiledPathRules;
|
|
15
|
+
export declare const NO_PATH_RULES: CompiledPathRules;
|
|
16
|
+
export declare const resolvePathRules: (deny: ExplorerPathRules | false | undefined) => CompiledPathRules;
|
|
17
|
+
export declare const isDeniedPath: (rules: ExplorerPathRules, path: string) => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const MAX_DOCUMENT_PATH_LENGTH = 4096;
|
|
2
|
+
export declare const DENY_DECODE_LEVELS = 3;
|
|
3
|
+
export declare const DEFAULT_DENIED_PATH_SEGMENTS: readonly string[];
|
|
4
|
+
export type ExplorerPathRules = readonly string[];
|
|
5
|
+
export type CompiledPathRules = {
|
|
6
|
+
readonly deniesPath: (path: string) => boolean;
|
|
7
|
+
readonly deniesName: (name: string) => boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const lastPathSegment: (doc: string) => string;
|
|
10
|
+
export declare const isAcceptableDocumentPath: (path: string) => boolean;
|
|
11
|
+
export declare const foldForComparison: (text: string) => string;
|
|
12
|
+
export declare const decodePercentLeniently: (text: string) => string;
|
|
13
|
+
export declare const compilePathRules: (rules: ExplorerPathRules) => CompiledPathRules;
|
|
14
|
+
export declare const DEFAULT_PATH_RULES: CompiledPathRules;
|
|
15
|
+
export declare const NO_PATH_RULES: CompiledPathRules;
|
|
16
|
+
export declare const resolvePathRules: (deny: ExplorerPathRules | false | undefined) => CompiledPathRules;
|
|
17
|
+
export declare const isDeniedPath: (rules: ExplorerPathRules, path: string) => boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ShouldRevalidateFunctionArgs } from "react-router";
|
|
2
|
+
export declare const shouldRevalidateExplorer: ({ currentUrl, nextUrl, formMethod, defaultShouldRevalidate }: Pick<ShouldRevalidateFunctionArgs, "currentUrl" | "nextUrl" | "formMethod" | "defaultShouldRevalidate">) => boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ShouldRevalidateFunctionArgs } from "react-router";
|
|
2
|
+
export declare const shouldRevalidateExplorer: ({ currentUrl, nextUrl, formMethod, defaultShouldRevalidate }: Pick<ShouldRevalidateFunctionArgs, "currentUrl" | "nextUrl" | "formMethod" | "defaultShouldRevalidate">) => boolean;
|