@aiquants/markdown-explorer 0.34.0 → 0.36.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 +608 -0
- package/README.md +121 -41
- package/dist/EditSurface-B70iRFkG.cjs +6 -0
- package/dist/EditSurface-BCFJRyIM.js +990 -0
- package/dist/ExplorerSplit-BNrHrIus.cjs +2 -0
- package/dist/ExplorerSplit-Bgccz2nm.js +1589 -0
- package/dist/MultiLayout-Bo9LAXiY.cjs +1 -0
- package/dist/{MultiLayout-kcZyVnvK.js → MultiLayout-Dy5TIC2t.js} +249 -248
- package/dist/{NativeScrollBar-pUbA4Zq3.cjs → NativeScrollBar-Bj-LKej0.cjs} +1 -1
- package/dist/{NativeScrollBar-UNed10Na.js → NativeScrollBar-DpZMYhmf.js} +2 -2
- package/dist/TreeLayout-DsSKW_Qj.js +103 -0
- package/dist/TreeLayout-T8sc_wg7.cjs +1 -0
- package/dist/client/MarkdownExplorer.d.cts +14 -1
- package/dist/client/MarkdownExplorer.d.ts +14 -1
- package/dist/client/edit/lineEndings.d.cts +4 -0
- package/dist/client/edit/lineEndings.d.ts +4 -0
- package/dist/client/hostContract.d.cts +67 -0
- package/dist/client/hostContract.d.ts +67 -0
- package/dist/core/config.d.cts +13 -0
- package/dist/core/config.d.ts +13 -0
- package/dist/core/contracts.d.cts +31 -4
- package/dist/core/contracts.d.ts +31 -4
- package/dist/core/dataRoute.d.cts +5 -1
- package/dist/core/dataRoute.d.ts +5 -1
- package/dist/core/documentId.d.cts +6 -0
- package/dist/core/documentId.d.ts +6 -0
- package/dist/core/draftAnswer.d.cts +23 -0
- package/dist/core/draftAnswer.d.ts +23 -0
- package/dist/core/labels.d.cts +78 -0
- package/dist/core/labels.d.ts +78 -0
- package/dist/core/location.d.cts +22 -2
- package/dist/core/location.d.ts +22 -2
- package/dist/core/ownUrls.d.cts +15 -0
- package/dist/core/ownUrls.d.ts +15 -0
- package/dist/core/treeSettings.d.cts +3 -2
- package/dist/core/treeSettings.d.ts +3 -2
- package/dist/core/viewSettings.d.cts +3 -1
- package/dist/core/viewSettings.d.ts +3 -1
- package/dist/describeValue-CLlVRO8d.js +17 -0
- package/dist/describeValue-Ccvhbt36.cjs +1 -0
- package/dist/explorerCore-B3RGmMG6.js +1083 -0
- package/dist/explorerCore-CUkyKtm8.cjs +1 -0
- package/dist/index-D0l_BJqb.js +5980 -0
- package/dist/index-lpL7GltU.cjs +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +53 -43
- package/dist/licenses/@heroicons/react/LICENSE +21 -0
- package/dist/licenses/entities/LICENSE +11 -0
- package/dist/licenses/parse5/LICENSE +19 -0
- package/dist/location-Dh6K-y7w.js +761 -0
- package/dist/location-DrOP6t1F.cjs +1 -0
- package/dist/lru-DC8GBmkX.js +39 -0
- package/dist/lru-SGmUyBQU.cjs +1 -0
- package/dist/{merge-C1MWvhCS.js → merge-BwcqBd4c.js} +1 -1
- package/dist/{merge-BziXxZkE.cjs → merge-Dckw7r9T.cjs} +1 -1
- package/dist/nestingGuardWorker.js +5511 -0
- package/dist/ownUrls-BTPGNhBt.cjs +1 -0
- package/dist/ownUrls-DD0cSCsF.js +409 -0
- package/dist/sanitizeJob-BYqzjFJC.js +21 -0
- package/dist/sanitizeJob-CudE1RUP.cjs +1 -0
- package/dist/sanitizePolicy-C-ehd0J_.cjs +2 -0
- package/dist/sanitizePolicy-DAPnUUVm.js +139 -0
- package/dist/sanitizeWorker.cjs +1 -1
- package/dist/sanitizeWorker.js +134 -139
- package/dist/sanitizerService-B8v4ap9t.js +240 -0
- package/dist/sanitizerService-DomN7lwC.cjs +1 -0
- package/dist/server/assetResponse.d.cts +60 -0
- package/dist/server/assetResponse.d.ts +60 -0
- package/dist/server/browser/browserPlatform.d.cts +12 -0
- package/dist/server/browser/browserPlatform.d.ts +12 -0
- package/dist/server/createMarkdownExplorer.d.cts +0 -10
- package/dist/server/createMarkdownExplorer.d.ts +0 -10
- package/dist/server/errors.d.cts +1 -1
- package/dist/server/errors.d.ts +1 -1
- package/dist/server/explorerCore.d.cts +12 -0
- package/dist/server/explorerCore.d.ts +12 -0
- package/dist/server/fileSystemSource.d.cts +1 -0
- package/dist/server/fileSystemSource.d.ts +1 -0
- package/dist/server/inProcessFetch.d.cts +5 -0
- package/dist/server/inProcessFetch.d.ts +5 -0
- package/dist/server/platform.d.cts +18 -0
- package/dist/server/platform.d.ts +18 -0
- package/dist/server/ports.d.cts +55 -5
- package/dist/server/ports.d.ts +55 -5
- package/dist/server/sanitizeProtocol.d.cts +3 -0
- package/dist/server/sanitizeProtocol.d.ts +3 -0
- package/dist/server/sanitizer.d.cts +5 -40
- package/dist/server/sanitizer.d.ts +5 -40
- package/dist/server/sanitizerOptions.d.cts +24 -0
- package/dist/server/sanitizerOptions.d.ts +24 -0
- package/dist/server/sanitizerService.d.cts +41 -0
- package/dist/server/sanitizerService.d.ts +41 -0
- package/dist/server/{workerPool.d.cts → workerJobs.d.cts} +0 -16
- package/dist/server/{workerPool.d.ts → workerJobs.d.ts} +0 -16
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +3 -1
- package/dist/server.d.ts +3 -1
- package/dist/server.js +270 -1343
- package/dist/serverBrowser.cjs +1 -0
- package/dist/serverBrowser.d.cts +1 -0
- package/dist/serverBrowser.d.ts +1 -0
- package/dist/serverBrowser.js +120 -0
- package/dist/serverCore.cjs +1 -0
- package/dist/serverCore.d.cts +14 -0
- package/dist/serverCore.d.ts +14 -0
- package/dist/serverCore.js +46 -0
- package/dist/storage-BpYsprog.cjs +1 -0
- package/dist/{storage-CmGHg7OA.js → storage-D1uSw-xj.js} +19 -18
- package/dist/storage.cjs +1 -1
- package/dist/storage.js +1 -1
- package/dist/styles/markdown-explorer.css +1 -1
- package/dist/{tapScrollCircle-DigcJCsu.cjs → tapScrollCircle-DyLInGck.cjs} +1 -1
- package/dist/{tapScrollCircle-D_BpaLwY.js → tapScrollCircle-smKLgRa2.js} +1 -1
- package/dist/testing.cjs +1 -0
- package/dist/testing.d.cts +11 -0
- package/dist/testing.d.ts +11 -0
- package/dist/testing.js +82 -0
- package/dist/useSplitPersistence-BUa_KMsV.cjs +1 -0
- package/dist/useSplitPersistence-pnb21dsr.js +44 -0
- package/docs/behavior/dom-hooks.md +5 -1
- package/docs/behavior/hosting.md +123 -0
- package/docs/behavior/layout.md +5 -3
- package/docs/behavior/localization.md +25 -8
- package/docs/behavior/security.md +55 -15
- package/docs/behavior/url-contract.md +30 -3
- package/package.json +48 -10
- package/dist/EditSurface-CF82jZQg.cjs +0 -6
- package/dist/EditSurface-CqHk2R3k.js +0 -982
- package/dist/ExplorerSplit-D325YGEf.cjs +0 -1
- package/dist/ExplorerSplit-DGH9bckm.js +0 -1500
- package/dist/MultiLayout-CzR7yJ0m.cjs +0 -1
- package/dist/TreeLayout-BnIU87HX.js +0 -96
- package/dist/TreeLayout-DtvIpuOe.cjs +0 -1
- package/dist/dataRoute-D6KiSHIc.js +0 -298
- package/dist/dataRoute-DwYtgyt6.cjs +0 -1
- package/dist/index-BDCbvHDs.cjs +0 -15
- package/dist/index-DR31S_-4.js +0 -5012
- package/dist/location-C44b9H1S.js +0 -676
- package/dist/location-hGLhCCg4.cjs +0 -1
- package/dist/sanitizePolicy-CwvyPpp5.js +0 -98
- package/dist/sanitizePolicy-T5T-3vV5.cjs +0 -1
- package/dist/storage-DM0EvkVf.cjs +0 -1
- package/dist/useSplitPersistence-DCeYbJMx.js +0 -38
- package/dist/useSplitPersistence-QGcvyMAa.cjs +0 -1
|
@@ -13,7 +13,9 @@ export declare const EXPLORER_DATA_OPERATIONS: readonly [
|
|
|
13
13
|
"revision",
|
|
14
14
|
"refresh",
|
|
15
15
|
"asset",
|
|
16
|
-
"link-card"
|
|
16
|
+
"link-card",
|
|
17
|
+
"issue-id",
|
|
18
|
+
"resolve-id"
|
|
17
19
|
];
|
|
18
20
|
export type ExplorerDataOperation = (typeof EXPLORER_DATA_OPERATIONS)[number];
|
|
19
21
|
export declare const EXPLORER_DATA_QUERY: Readonly<{
|
|
@@ -23,6 +25,7 @@ export declare const EXPLORER_DATA_QUERY: Readonly<{
|
|
|
23
25
|
readonly base: "base";
|
|
24
26
|
readonly revision: "revision";
|
|
25
27
|
readonly display: "as";
|
|
28
|
+
readonly id: "id";
|
|
26
29
|
}>;
|
|
27
30
|
export declare const explorerAssetHref: (dataPath: string, path: string, version: string | null) => string;
|
|
28
31
|
export type ExplorerAssetDisplay = "file" | "text" | "workbook";
|
|
@@ -34,6 +37,7 @@ export declare const EXPLORER_SCOPE_HEADER = "X-Markdown-Explorer-Scope";
|
|
|
34
37
|
export declare const EXPLORER_PROOF_HEADER = "X-Markdown-Explorer";
|
|
35
38
|
export declare const EXPLORER_REFRESH_PROOF = "refresh";
|
|
36
39
|
export declare const EXPLORER_EDIT_PROOF = "edit";
|
|
40
|
+
export declare const EXPLORER_DOCUMENT_ID_PROOF = "document-id";
|
|
37
41
|
export declare const EXPLORER_DRAFT_MEDIA_TYPE = "text/markdown";
|
|
38
42
|
export declare const isExplorerDataOperation: (segment: string | undefined) => segment is ExplorerDataOperation;
|
|
39
43
|
export declare const EXPLORER_FAILURE_STATUS: Readonly<Record<ExplorerFailureReason, number>>;
|
package/dist/core/dataRoute.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ export declare const EXPLORER_DATA_OPERATIONS: readonly [
|
|
|
13
13
|
"revision",
|
|
14
14
|
"refresh",
|
|
15
15
|
"asset",
|
|
16
|
-
"link-card"
|
|
16
|
+
"link-card",
|
|
17
|
+
"issue-id",
|
|
18
|
+
"resolve-id"
|
|
17
19
|
];
|
|
18
20
|
export type ExplorerDataOperation = (typeof EXPLORER_DATA_OPERATIONS)[number];
|
|
19
21
|
export declare const EXPLORER_DATA_QUERY: Readonly<{
|
|
@@ -23,6 +25,7 @@ export declare const EXPLORER_DATA_QUERY: Readonly<{
|
|
|
23
25
|
readonly base: "base";
|
|
24
26
|
readonly revision: "revision";
|
|
25
27
|
readonly display: "as";
|
|
28
|
+
readonly id: "id";
|
|
26
29
|
}>;
|
|
27
30
|
export declare const explorerAssetHref: (dataPath: string, path: string, version: string | null) => string;
|
|
28
31
|
export type ExplorerAssetDisplay = "file" | "text" | "workbook";
|
|
@@ -34,6 +37,7 @@ export declare const EXPLORER_SCOPE_HEADER = "X-Markdown-Explorer-Scope";
|
|
|
34
37
|
export declare const EXPLORER_PROOF_HEADER = "X-Markdown-Explorer";
|
|
35
38
|
export declare const EXPLORER_REFRESH_PROOF = "refresh";
|
|
36
39
|
export declare const EXPLORER_EDIT_PROOF = "edit";
|
|
40
|
+
export declare const EXPLORER_DOCUMENT_ID_PROOF = "document-id";
|
|
37
41
|
export declare const EXPLORER_DRAFT_MEDIA_TYPE = "text/markdown";
|
|
38
42
|
export declare const isExplorerDataOperation: (segment: string | undefined) => segment is ExplorerDataOperation;
|
|
39
43
|
export declare const EXPLORER_FAILURE_STATUS: Readonly<Record<ExplorerFailureReason, number>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DOCUMENT_ID_ALPHABET = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
2
|
+
export declare const DOCUMENT_ID_LENGTH = 12;
|
|
3
|
+
export declare const isCanonicalDocumentId: (value: unknown) => value is string;
|
|
4
|
+
export declare const parseDocumentId: (written: string) => string | null;
|
|
5
|
+
export declare const createDocumentId: (fillRandom: (bytes: Uint8Array<ArrayBuffer>) => void) => string;
|
|
6
|
+
export declare const groupDocumentId: (id: string) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DOCUMENT_ID_ALPHABET = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
2
|
+
export declare const DOCUMENT_ID_LENGTH = 12;
|
|
3
|
+
export declare const isCanonicalDocumentId: (value: unknown) => value is string;
|
|
4
|
+
export declare const parseDocumentId: (written: string) => string | null;
|
|
5
|
+
export declare const createDocumentId: (fillRandom: (bytes: Uint8Array<ArrayBuffer>) => void) => string;
|
|
6
|
+
export declare const groupDocumentId: (id: string) => string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ExplorerDraftAnswer } from "./contracts.cjs";
|
|
2
|
+
import { ExplorerPathRules } from "./paths.cjs";
|
|
3
|
+
export type MarkdownConversionLimits = {
|
|
4
|
+
readonly maxSourceBytes: number;
|
|
5
|
+
readonly maxHtmlBytes: number;
|
|
6
|
+
readonly deadlineMs: number;
|
|
7
|
+
};
|
|
8
|
+
export type DraftConversionSetup = {
|
|
9
|
+
readonly deny: ExplorerPathRules;
|
|
10
|
+
readonly conversion: MarkdownConversionLimits;
|
|
11
|
+
};
|
|
12
|
+
export type ExplorerDraftConversionOptions = {
|
|
13
|
+
readonly timeoutMs: number;
|
|
14
|
+
readonly options: {
|
|
15
|
+
readonly deniedPathSegments: readonly string[];
|
|
16
|
+
readonly maxHtmlBytes: number;
|
|
17
|
+
readonly includeSourceLines: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const draftAnswerOf: (error: unknown) => Exclude<ExplorerDraftAnswer, {
|
|
21
|
+
readonly kind: "preview";
|
|
22
|
+
}>;
|
|
23
|
+
export declare const draftConversionOf: (setup: DraftConversionSetup) => ExplorerDraftConversionOptions;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ExplorerDraftAnswer } from "./contracts.js";
|
|
2
|
+
import { ExplorerPathRules } from "./paths.js";
|
|
3
|
+
export type MarkdownConversionLimits = {
|
|
4
|
+
readonly maxSourceBytes: number;
|
|
5
|
+
readonly maxHtmlBytes: number;
|
|
6
|
+
readonly deadlineMs: number;
|
|
7
|
+
};
|
|
8
|
+
export type DraftConversionSetup = {
|
|
9
|
+
readonly deny: ExplorerPathRules;
|
|
10
|
+
readonly conversion: MarkdownConversionLimits;
|
|
11
|
+
};
|
|
12
|
+
export type ExplorerDraftConversionOptions = {
|
|
13
|
+
readonly timeoutMs: number;
|
|
14
|
+
readonly options: {
|
|
15
|
+
readonly deniedPathSegments: readonly string[];
|
|
16
|
+
readonly maxHtmlBytes: number;
|
|
17
|
+
readonly includeSourceLines: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const draftAnswerOf: (error: unknown) => Exclude<ExplorerDraftAnswer, {
|
|
21
|
+
readonly kind: "preview";
|
|
22
|
+
}>;
|
|
23
|
+
export declare const draftConversionOf: (setup: DraftConversionSetup) => ExplorerDraftConversionOptions;
|
package/dist/core/labels.d.cts
CHANGED
|
@@ -26,6 +26,13 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
26
26
|
readonly documentMaximized: (name: string) => string;
|
|
27
27
|
readonly documentRestored: (name: string) => string;
|
|
28
28
|
readonly documentRefreshFailed: (reason: string) => string;
|
|
29
|
+
readonly documentReloadedAfterChange: (name: string) => string;
|
|
30
|
+
readonly documentChangedElsewhere: (name: string) => string;
|
|
31
|
+
readonly reload: string;
|
|
32
|
+
readonly mediaLoadFailed: (name: string) => string;
|
|
33
|
+
readonly mediaLoadFailedCount: (count: number) => string;
|
|
34
|
+
readonly mediaUnplayable: (name: string) => string;
|
|
35
|
+
readonly mediaUnplayableCount: (count: number) => string;
|
|
29
36
|
readonly showMarkupLabel: string;
|
|
30
37
|
readonly showMarkup: string;
|
|
31
38
|
readonly showSvgMarkup: string;
|
|
@@ -82,6 +89,9 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
82
89
|
readonly draftDiscardTitle: string;
|
|
83
90
|
readonly draftDiscardBody: (names: string) => string;
|
|
84
91
|
readonly unsavedStay: string;
|
|
92
|
+
readonly unversionedSaveTitle: string;
|
|
93
|
+
readonly unversionedSaveBody: string;
|
|
94
|
+
readonly unversionedSaveConfirm: string;
|
|
85
95
|
readonly historyTitle: (name: string) => string;
|
|
86
96
|
readonly historyLoading: string;
|
|
87
97
|
readonly historyEmpty: string;
|
|
@@ -151,6 +161,7 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
151
161
|
readonly expandIconSizeValue: (pixels: number) => string;
|
|
152
162
|
readonly settingAlwaysExpanded: string;
|
|
153
163
|
readonly settingRevealDocument: string;
|
|
164
|
+
readonly settingShowFolderReadme: string;
|
|
154
165
|
readonly settingRemoveRootIndent: string;
|
|
155
166
|
readonly settingTreeLines: string;
|
|
156
167
|
readonly settingExpandIcons: string;
|
|
@@ -172,6 +183,8 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
172
183
|
readonly inertLink: string;
|
|
173
184
|
readonly failureUnauthorizedTitle: string;
|
|
174
185
|
readonly failureUnauthorizedBody: string;
|
|
186
|
+
readonly failureUnauthorizedSignInBody: string;
|
|
187
|
+
readonly failureUnauthorizedSignedOutBody: string;
|
|
175
188
|
readonly failureForbiddenTitle: string;
|
|
176
189
|
readonly failureForbiddenBody: string;
|
|
177
190
|
readonly failureNotFoundTitle: string;
|
|
@@ -188,6 +201,8 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
188
201
|
readonly failureFailedBody: string;
|
|
189
202
|
readonly retry: string;
|
|
190
203
|
readonly reloadPage: string;
|
|
204
|
+
readonly signInAgain: string;
|
|
205
|
+
readonly signIn: string;
|
|
191
206
|
readonly imageZoomIn: string;
|
|
192
207
|
readonly imageZoomOut: string;
|
|
193
208
|
readonly imageFit: string;
|
|
@@ -198,6 +213,16 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
198
213
|
readonly copyText: string;
|
|
199
214
|
readonly copiedText: string;
|
|
200
215
|
readonly copyTextFailed: string;
|
|
216
|
+
readonly copyPermalinkLabel: string;
|
|
217
|
+
readonly copyPermalink: string;
|
|
218
|
+
readonly copyPermalinkNamed: (name: string) => string;
|
|
219
|
+
readonly permalinkCopied: (groupedId: string) => string;
|
|
220
|
+
readonly permalinkCopyFailed: (reason: string) => string;
|
|
221
|
+
readonly permalinkClipboardRefused: string;
|
|
222
|
+
readonly documentIdFailedTitle: string;
|
|
223
|
+
readonly documentIdInvalid: string;
|
|
224
|
+
readonly documentIdNotFound: string;
|
|
225
|
+
readonly documentIdForbidden: string;
|
|
201
226
|
readonly mediaUnsupported: string;
|
|
202
227
|
readonly fileNotShown: string;
|
|
203
228
|
readonly pdfNotShown: string;
|
|
@@ -223,6 +248,15 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
223
248
|
readonly viewerSelectStyle: string;
|
|
224
249
|
readonly viewerPinStyle: string;
|
|
225
250
|
readonly viewerUnpinStyle: string;
|
|
251
|
+
readonly viewerStyleSectionTitle: string;
|
|
252
|
+
readonly viewerMeasureTitle: string;
|
|
253
|
+
readonly viewerColorsTitle: string;
|
|
254
|
+
readonly viewerMeasureFill: string;
|
|
255
|
+
readonly viewerMeasureReading: string;
|
|
256
|
+
readonly viewerColorsDefault: string;
|
|
257
|
+
readonly viewerColorsSepia: string;
|
|
258
|
+
readonly viewerColorsDarkLowGlare: string;
|
|
259
|
+
readonly viewerColorsHighContrast: string;
|
|
226
260
|
readonly viewerErrorTitle: string;
|
|
227
261
|
readonly viewerMissingImage: string;
|
|
228
262
|
readonly viewerOpenToc: string;
|
|
@@ -260,6 +294,46 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
260
294
|
readonly viewerMermaidFullscreenDialog: string;
|
|
261
295
|
readonly viewerMermaidDiagram: string;
|
|
262
296
|
readonly viewerMermaidRetry: string;
|
|
297
|
+
readonly viewerMermaidLoading: string;
|
|
298
|
+
readonly viewerMermaidInitializationFailed: string;
|
|
299
|
+
readonly viewerMermaidRenderFailed: string;
|
|
300
|
+
readonly viewerMermaidEmptyDrawing: string;
|
|
301
|
+
readonly viewerMermaidSource: string;
|
|
302
|
+
readonly viewerMermaidSourceRegion: string;
|
|
303
|
+
readonly viewerMermaidCopySource: string;
|
|
304
|
+
readonly viewerMermaidCopiedSource: string;
|
|
305
|
+
readonly viewerMermaidCopySourceFailed: string;
|
|
306
|
+
readonly viewerMermaidTypeC4: string;
|
|
307
|
+
readonly viewerMermaidTypeFlowchart: string;
|
|
308
|
+
readonly viewerMermaidTypeSwimlane: string;
|
|
309
|
+
readonly viewerMermaidTypeEntityRelationship: string;
|
|
310
|
+
readonly viewerMermaidTypeGitGraph: string;
|
|
311
|
+
readonly viewerMermaidTypeGantt: string;
|
|
312
|
+
readonly viewerMermaidTypeInfo: string;
|
|
313
|
+
readonly viewerMermaidTypePie: string;
|
|
314
|
+
readonly viewerMermaidTypeQuadrantChart: string;
|
|
315
|
+
readonly viewerMermaidTypeXyChart: string;
|
|
316
|
+
readonly viewerMermaidTypeRequirement: string;
|
|
317
|
+
readonly viewerMermaidTypeSequence: string;
|
|
318
|
+
readonly viewerMermaidTypeClass: string;
|
|
319
|
+
readonly viewerMermaidTypeState: string;
|
|
320
|
+
readonly viewerMermaidTypeJourney: string;
|
|
321
|
+
readonly viewerMermaidTypeTimeline: string;
|
|
322
|
+
readonly viewerMermaidTypeMindmap: string;
|
|
323
|
+
readonly viewerMermaidTypeKanban: string;
|
|
324
|
+
readonly viewerMermaidTypeSankey: string;
|
|
325
|
+
readonly viewerMermaidTypePacket: string;
|
|
326
|
+
readonly viewerMermaidTypeRadar: string;
|
|
327
|
+
readonly viewerMermaidTypeBlock: string;
|
|
328
|
+
readonly viewerMermaidTypeTreeView: string;
|
|
329
|
+
readonly viewerMermaidTypeArchitecture: string;
|
|
330
|
+
readonly viewerMermaidTypeEventModeling: string;
|
|
331
|
+
readonly viewerMermaidTypeIshikawa: string;
|
|
332
|
+
readonly viewerMermaidTypeVenn: string;
|
|
333
|
+
readonly viewerMermaidTypeTreemap: string;
|
|
334
|
+
readonly viewerMermaidTypeWardley: string;
|
|
335
|
+
readonly viewerMermaidTypeCynefin: string;
|
|
336
|
+
readonly viewerMermaidTypeRailroad: string;
|
|
263
337
|
readonly viewerEmbeddedVideo: string;
|
|
264
338
|
readonly viewerEmbeddedPost: string;
|
|
265
339
|
readonly viewerEmbeddedFrame: string;
|
|
@@ -319,6 +393,10 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
319
393
|
readonly multiColumnEmpty: string;
|
|
320
394
|
readonly multiColumnRegion: string;
|
|
321
395
|
readonly panelDropHere: string;
|
|
396
|
+
readonly panelGroupMinimumExceededSummary: string;
|
|
397
|
+
readonly panelGroupMinimumExceededDetail: string;
|
|
398
|
+
readonly panelGroupMaximumInsufficientSummary: string;
|
|
399
|
+
readonly panelGroupMaximumInsufficientDetail: string;
|
|
322
400
|
};
|
|
323
401
|
export type MarkdownExplorerLabelKey = keyof MarkdownExplorerLabels;
|
|
324
402
|
export type MarkdownExplorerLabelOverrides = Partial<MarkdownExplorerLabels>;
|
package/dist/core/labels.d.ts
CHANGED
|
@@ -26,6 +26,13 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
26
26
|
readonly documentMaximized: (name: string) => string;
|
|
27
27
|
readonly documentRestored: (name: string) => string;
|
|
28
28
|
readonly documentRefreshFailed: (reason: string) => string;
|
|
29
|
+
readonly documentReloadedAfterChange: (name: string) => string;
|
|
30
|
+
readonly documentChangedElsewhere: (name: string) => string;
|
|
31
|
+
readonly reload: string;
|
|
32
|
+
readonly mediaLoadFailed: (name: string) => string;
|
|
33
|
+
readonly mediaLoadFailedCount: (count: number) => string;
|
|
34
|
+
readonly mediaUnplayable: (name: string) => string;
|
|
35
|
+
readonly mediaUnplayableCount: (count: number) => string;
|
|
29
36
|
readonly showMarkupLabel: string;
|
|
30
37
|
readonly showMarkup: string;
|
|
31
38
|
readonly showSvgMarkup: string;
|
|
@@ -82,6 +89,9 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
82
89
|
readonly draftDiscardTitle: string;
|
|
83
90
|
readonly draftDiscardBody: (names: string) => string;
|
|
84
91
|
readonly unsavedStay: string;
|
|
92
|
+
readonly unversionedSaveTitle: string;
|
|
93
|
+
readonly unversionedSaveBody: string;
|
|
94
|
+
readonly unversionedSaveConfirm: string;
|
|
85
95
|
readonly historyTitle: (name: string) => string;
|
|
86
96
|
readonly historyLoading: string;
|
|
87
97
|
readonly historyEmpty: string;
|
|
@@ -151,6 +161,7 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
151
161
|
readonly expandIconSizeValue: (pixels: number) => string;
|
|
152
162
|
readonly settingAlwaysExpanded: string;
|
|
153
163
|
readonly settingRevealDocument: string;
|
|
164
|
+
readonly settingShowFolderReadme: string;
|
|
154
165
|
readonly settingRemoveRootIndent: string;
|
|
155
166
|
readonly settingTreeLines: string;
|
|
156
167
|
readonly settingExpandIcons: string;
|
|
@@ -172,6 +183,8 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
172
183
|
readonly inertLink: string;
|
|
173
184
|
readonly failureUnauthorizedTitle: string;
|
|
174
185
|
readonly failureUnauthorizedBody: string;
|
|
186
|
+
readonly failureUnauthorizedSignInBody: string;
|
|
187
|
+
readonly failureUnauthorizedSignedOutBody: string;
|
|
175
188
|
readonly failureForbiddenTitle: string;
|
|
176
189
|
readonly failureForbiddenBody: string;
|
|
177
190
|
readonly failureNotFoundTitle: string;
|
|
@@ -188,6 +201,8 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
188
201
|
readonly failureFailedBody: string;
|
|
189
202
|
readonly retry: string;
|
|
190
203
|
readonly reloadPage: string;
|
|
204
|
+
readonly signInAgain: string;
|
|
205
|
+
readonly signIn: string;
|
|
191
206
|
readonly imageZoomIn: string;
|
|
192
207
|
readonly imageZoomOut: string;
|
|
193
208
|
readonly imageFit: string;
|
|
@@ -198,6 +213,16 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
198
213
|
readonly copyText: string;
|
|
199
214
|
readonly copiedText: string;
|
|
200
215
|
readonly copyTextFailed: string;
|
|
216
|
+
readonly copyPermalinkLabel: string;
|
|
217
|
+
readonly copyPermalink: string;
|
|
218
|
+
readonly copyPermalinkNamed: (name: string) => string;
|
|
219
|
+
readonly permalinkCopied: (groupedId: string) => string;
|
|
220
|
+
readonly permalinkCopyFailed: (reason: string) => string;
|
|
221
|
+
readonly permalinkClipboardRefused: string;
|
|
222
|
+
readonly documentIdFailedTitle: string;
|
|
223
|
+
readonly documentIdInvalid: string;
|
|
224
|
+
readonly documentIdNotFound: string;
|
|
225
|
+
readonly documentIdForbidden: string;
|
|
201
226
|
readonly mediaUnsupported: string;
|
|
202
227
|
readonly fileNotShown: string;
|
|
203
228
|
readonly pdfNotShown: string;
|
|
@@ -223,6 +248,15 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
223
248
|
readonly viewerSelectStyle: string;
|
|
224
249
|
readonly viewerPinStyle: string;
|
|
225
250
|
readonly viewerUnpinStyle: string;
|
|
251
|
+
readonly viewerStyleSectionTitle: string;
|
|
252
|
+
readonly viewerMeasureTitle: string;
|
|
253
|
+
readonly viewerColorsTitle: string;
|
|
254
|
+
readonly viewerMeasureFill: string;
|
|
255
|
+
readonly viewerMeasureReading: string;
|
|
256
|
+
readonly viewerColorsDefault: string;
|
|
257
|
+
readonly viewerColorsSepia: string;
|
|
258
|
+
readonly viewerColorsDarkLowGlare: string;
|
|
259
|
+
readonly viewerColorsHighContrast: string;
|
|
226
260
|
readonly viewerErrorTitle: string;
|
|
227
261
|
readonly viewerMissingImage: string;
|
|
228
262
|
readonly viewerOpenToc: string;
|
|
@@ -260,6 +294,46 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
260
294
|
readonly viewerMermaidFullscreenDialog: string;
|
|
261
295
|
readonly viewerMermaidDiagram: string;
|
|
262
296
|
readonly viewerMermaidRetry: string;
|
|
297
|
+
readonly viewerMermaidLoading: string;
|
|
298
|
+
readonly viewerMermaidInitializationFailed: string;
|
|
299
|
+
readonly viewerMermaidRenderFailed: string;
|
|
300
|
+
readonly viewerMermaidEmptyDrawing: string;
|
|
301
|
+
readonly viewerMermaidSource: string;
|
|
302
|
+
readonly viewerMermaidSourceRegion: string;
|
|
303
|
+
readonly viewerMermaidCopySource: string;
|
|
304
|
+
readonly viewerMermaidCopiedSource: string;
|
|
305
|
+
readonly viewerMermaidCopySourceFailed: string;
|
|
306
|
+
readonly viewerMermaidTypeC4: string;
|
|
307
|
+
readonly viewerMermaidTypeFlowchart: string;
|
|
308
|
+
readonly viewerMermaidTypeSwimlane: string;
|
|
309
|
+
readonly viewerMermaidTypeEntityRelationship: string;
|
|
310
|
+
readonly viewerMermaidTypeGitGraph: string;
|
|
311
|
+
readonly viewerMermaidTypeGantt: string;
|
|
312
|
+
readonly viewerMermaidTypeInfo: string;
|
|
313
|
+
readonly viewerMermaidTypePie: string;
|
|
314
|
+
readonly viewerMermaidTypeQuadrantChart: string;
|
|
315
|
+
readonly viewerMermaidTypeXyChart: string;
|
|
316
|
+
readonly viewerMermaidTypeRequirement: string;
|
|
317
|
+
readonly viewerMermaidTypeSequence: string;
|
|
318
|
+
readonly viewerMermaidTypeClass: string;
|
|
319
|
+
readonly viewerMermaidTypeState: string;
|
|
320
|
+
readonly viewerMermaidTypeJourney: string;
|
|
321
|
+
readonly viewerMermaidTypeTimeline: string;
|
|
322
|
+
readonly viewerMermaidTypeMindmap: string;
|
|
323
|
+
readonly viewerMermaidTypeKanban: string;
|
|
324
|
+
readonly viewerMermaidTypeSankey: string;
|
|
325
|
+
readonly viewerMermaidTypePacket: string;
|
|
326
|
+
readonly viewerMermaidTypeRadar: string;
|
|
327
|
+
readonly viewerMermaidTypeBlock: string;
|
|
328
|
+
readonly viewerMermaidTypeTreeView: string;
|
|
329
|
+
readonly viewerMermaidTypeArchitecture: string;
|
|
330
|
+
readonly viewerMermaidTypeEventModeling: string;
|
|
331
|
+
readonly viewerMermaidTypeIshikawa: string;
|
|
332
|
+
readonly viewerMermaidTypeVenn: string;
|
|
333
|
+
readonly viewerMermaidTypeTreemap: string;
|
|
334
|
+
readonly viewerMermaidTypeWardley: string;
|
|
335
|
+
readonly viewerMermaidTypeCynefin: string;
|
|
336
|
+
readonly viewerMermaidTypeRailroad: string;
|
|
263
337
|
readonly viewerEmbeddedVideo: string;
|
|
264
338
|
readonly viewerEmbeddedPost: string;
|
|
265
339
|
readonly viewerEmbeddedFrame: string;
|
|
@@ -319,6 +393,10 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
319
393
|
readonly multiColumnEmpty: string;
|
|
320
394
|
readonly multiColumnRegion: string;
|
|
321
395
|
readonly panelDropHere: string;
|
|
396
|
+
readonly panelGroupMinimumExceededSummary: string;
|
|
397
|
+
readonly panelGroupMinimumExceededDetail: string;
|
|
398
|
+
readonly panelGroupMaximumInsufficientSummary: string;
|
|
399
|
+
readonly panelGroupMaximumInsufficientDetail: string;
|
|
322
400
|
};
|
|
323
401
|
export type MarkdownExplorerLabelKey = keyof MarkdownExplorerLabels;
|
|
324
402
|
export type MarkdownExplorerLabelOverrides = Partial<MarkdownExplorerLabels>;
|
package/dist/core/location.d.cts
CHANGED
|
@@ -34,6 +34,14 @@ export type ExplorerLocation = {
|
|
|
34
34
|
readonly embed: ExplorerEmbedOptions;
|
|
35
35
|
readonly markup: boolean;
|
|
36
36
|
};
|
|
37
|
+
export type ExplorerDocumentIdOpening = {
|
|
38
|
+
readonly view: "tree";
|
|
39
|
+
readonly overrides: ExplorerOverrides;
|
|
40
|
+
} | {
|
|
41
|
+
readonly view: "single";
|
|
42
|
+
readonly overrides: ExplorerOverrides;
|
|
43
|
+
readonly embed: ExplorerEmbedOptions;
|
|
44
|
+
};
|
|
37
45
|
export type ExplorerLocationResult = {
|
|
38
46
|
readonly kind: "location";
|
|
39
47
|
readonly location: ExplorerLocation;
|
|
@@ -41,6 +49,11 @@ export type ExplorerLocationResult = {
|
|
|
41
49
|
readonly kind: "redirect";
|
|
42
50
|
readonly href: string;
|
|
43
51
|
readonly location: ExplorerLocation;
|
|
52
|
+
} | {
|
|
53
|
+
readonly kind: "document-id";
|
|
54
|
+
readonly id: string | null;
|
|
55
|
+
readonly opens: ExplorerDocumentIdOpening;
|
|
56
|
+
readonly location: ExplorerLocation;
|
|
44
57
|
};
|
|
45
58
|
export type ExplorerHrefTarget = {
|
|
46
59
|
readonly view: "tree";
|
|
@@ -63,11 +76,17 @@ export type ExplorerHrefTarget = {
|
|
|
63
76
|
readonly overrides?: ExplorerOverrides;
|
|
64
77
|
readonly embed?: ExplorerEmbedOptions;
|
|
65
78
|
readonly markup?: boolean;
|
|
79
|
+
} | {
|
|
80
|
+
readonly view: "document-id";
|
|
81
|
+
readonly id: string;
|
|
82
|
+
readonly opens?: "single";
|
|
83
|
+
readonly overrides?: ExplorerOverrides;
|
|
84
|
+
readonly embed?: ExplorerEmbedOptions;
|
|
66
85
|
};
|
|
67
86
|
export type ExplorerSourcelessHrefTarget = ExplorerHrefTarget & {
|
|
68
87
|
readonly source?: undefined;
|
|
69
88
|
};
|
|
70
|
-
type ExplorerHrefWriter = {
|
|
89
|
+
export type ExplorerHrefWriter = {
|
|
71
90
|
(config: ExplorerLocationConfig, target: ExplorerHrefTarget): string;
|
|
72
91
|
(config: ExplorerConfig, target: ExplorerSourcelessHrefTarget): string;
|
|
73
92
|
};
|
|
@@ -89,6 +108,7 @@ export declare const FOLDER_SEGMENT_MARK = "/";
|
|
|
89
108
|
export declare const encodeDocumentSegment: (path: string) => string;
|
|
90
109
|
export declare const decodeDocumentSegment: (segment: string) => string;
|
|
91
110
|
export declare const canonicalMultiDocuments: (config: ExplorerConfig, docs: readonly string[]) => readonly string[];
|
|
111
|
+
export declare const hasDocumentUrl: (path: string) => boolean;
|
|
92
112
|
export declare const explorerHref: ExplorerHrefWriter;
|
|
93
113
|
export declare const resolveExplorerLocation: (config: ExplorerLocationConfig, splat: string | undefined, search: URLSearchParams) => ExplorerLocationResult;
|
|
94
|
-
export
|
|
114
|
+
export declare const documentIdOpeningTarget: (opens: ExplorerDocumentIdOpening, path: string, source: string) => ExplorerHrefTarget;
|
package/dist/core/location.d.ts
CHANGED
|
@@ -34,6 +34,14 @@ export type ExplorerLocation = {
|
|
|
34
34
|
readonly embed: ExplorerEmbedOptions;
|
|
35
35
|
readonly markup: boolean;
|
|
36
36
|
};
|
|
37
|
+
export type ExplorerDocumentIdOpening = {
|
|
38
|
+
readonly view: "tree";
|
|
39
|
+
readonly overrides: ExplorerOverrides;
|
|
40
|
+
} | {
|
|
41
|
+
readonly view: "single";
|
|
42
|
+
readonly overrides: ExplorerOverrides;
|
|
43
|
+
readonly embed: ExplorerEmbedOptions;
|
|
44
|
+
};
|
|
37
45
|
export type ExplorerLocationResult = {
|
|
38
46
|
readonly kind: "location";
|
|
39
47
|
readonly location: ExplorerLocation;
|
|
@@ -41,6 +49,11 @@ export type ExplorerLocationResult = {
|
|
|
41
49
|
readonly kind: "redirect";
|
|
42
50
|
readonly href: string;
|
|
43
51
|
readonly location: ExplorerLocation;
|
|
52
|
+
} | {
|
|
53
|
+
readonly kind: "document-id";
|
|
54
|
+
readonly id: string | null;
|
|
55
|
+
readonly opens: ExplorerDocumentIdOpening;
|
|
56
|
+
readonly location: ExplorerLocation;
|
|
44
57
|
};
|
|
45
58
|
export type ExplorerHrefTarget = {
|
|
46
59
|
readonly view: "tree";
|
|
@@ -63,11 +76,17 @@ export type ExplorerHrefTarget = {
|
|
|
63
76
|
readonly overrides?: ExplorerOverrides;
|
|
64
77
|
readonly embed?: ExplorerEmbedOptions;
|
|
65
78
|
readonly markup?: boolean;
|
|
79
|
+
} | {
|
|
80
|
+
readonly view: "document-id";
|
|
81
|
+
readonly id: string;
|
|
82
|
+
readonly opens?: "single";
|
|
83
|
+
readonly overrides?: ExplorerOverrides;
|
|
84
|
+
readonly embed?: ExplorerEmbedOptions;
|
|
66
85
|
};
|
|
67
86
|
export type ExplorerSourcelessHrefTarget = ExplorerHrefTarget & {
|
|
68
87
|
readonly source?: undefined;
|
|
69
88
|
};
|
|
70
|
-
type ExplorerHrefWriter = {
|
|
89
|
+
export type ExplorerHrefWriter = {
|
|
71
90
|
(config: ExplorerLocationConfig, target: ExplorerHrefTarget): string;
|
|
72
91
|
(config: ExplorerConfig, target: ExplorerSourcelessHrefTarget): string;
|
|
73
92
|
};
|
|
@@ -89,6 +108,7 @@ export declare const FOLDER_SEGMENT_MARK = "/";
|
|
|
89
108
|
export declare const encodeDocumentSegment: (path: string) => string;
|
|
90
109
|
export declare const decodeDocumentSegment: (segment: string) => string;
|
|
91
110
|
export declare const canonicalMultiDocuments: (config: ExplorerConfig, docs: readonly string[]) => readonly string[];
|
|
111
|
+
export declare const hasDocumentUrl: (path: string) => boolean;
|
|
92
112
|
export declare const explorerHref: ExplorerHrefWriter;
|
|
93
113
|
export declare const resolveExplorerLocation: (config: ExplorerLocationConfig, splat: string | undefined, search: URLSearchParams) => ExplorerLocationResult;
|
|
94
|
-
export
|
|
114
|
+
export declare const documentIdOpeningTarget: (opens: ExplorerDocumentIdOpening, path: string, source: string) => ExplorerHrefTarget;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ExplorerOwnUrls = {
|
|
2
|
+
readonly origins: readonly string[];
|
|
3
|
+
readonly resources: readonly string[];
|
|
4
|
+
readonly links: readonly string[];
|
|
5
|
+
readonly media: readonly string[];
|
|
6
|
+
};
|
|
7
|
+
export type OwnUrlUse = "link" | "document-link" | "resource" | "svg-reference" | "media";
|
|
8
|
+
export type OwnUrlRule = (url: string, use: OwnUrlUse) => boolean;
|
|
9
|
+
export declare const isMountPath: (value: string) => boolean;
|
|
10
|
+
export declare const isBrowserOrigin: (value: string) => boolean;
|
|
11
|
+
export declare const isMediaDataUrl: (value: string) => boolean;
|
|
12
|
+
export declare const isExplorerOwnUrls: (value: unknown) => value is ExplorerOwnUrls;
|
|
13
|
+
export declare const isUnder: (pathname: string, paths: readonly string[]) => boolean;
|
|
14
|
+
export declare const readOwnUrls: (value: unknown) => ExplorerOwnUrls;
|
|
15
|
+
export declare const createOwnUrlRule: (ownUrls: ExplorerOwnUrls) => OwnUrlRule;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ExplorerOwnUrls = {
|
|
2
|
+
readonly origins: readonly string[];
|
|
3
|
+
readonly resources: readonly string[];
|
|
4
|
+
readonly links: readonly string[];
|
|
5
|
+
readonly media: readonly string[];
|
|
6
|
+
};
|
|
7
|
+
export type OwnUrlUse = "link" | "document-link" | "resource" | "svg-reference" | "media";
|
|
8
|
+
export type OwnUrlRule = (url: string, use: OwnUrlUse) => boolean;
|
|
9
|
+
export declare const isMountPath: (value: string) => boolean;
|
|
10
|
+
export declare const isBrowserOrigin: (value: string) => boolean;
|
|
11
|
+
export declare const isMediaDataUrl: (value: string) => boolean;
|
|
12
|
+
export declare const isExplorerOwnUrls: (value: unknown) => value is ExplorerOwnUrls;
|
|
13
|
+
export declare const isUnder: (pathname: string, paths: readonly string[]) => boolean;
|
|
14
|
+
export declare const readOwnUrls: (value: unknown) => ExplorerOwnUrls;
|
|
15
|
+
export declare const createOwnUrlRule: (ownUrls: ExplorerOwnUrls) => OwnUrlRule;
|
|
@@ -13,6 +13,7 @@ export type TreeSettings = {
|
|
|
13
13
|
readonly expandIconSize: number;
|
|
14
14
|
readonly alwaysExpanded: boolean;
|
|
15
15
|
readonly revealDocument: boolean;
|
|
16
|
+
readonly showFolderReadme: boolean;
|
|
16
17
|
readonly removeRootIndent: boolean;
|
|
17
18
|
readonly lines: boolean;
|
|
18
19
|
readonly expandIcons: boolean;
|
|
@@ -26,13 +27,13 @@ type DescriptorFor<K extends TreeSettingKey> = {
|
|
|
26
27
|
readonly labelKey: keyof MarkdownExplorerLabels;
|
|
27
28
|
readonly values: readonly TreeSettings[K][];
|
|
28
29
|
readonly formatValue: (labels: MarkdownExplorerLabels, value: TreeSettings[K]) => string;
|
|
29
|
-
readonly
|
|
30
|
+
readonly requiresTreeView: boolean;
|
|
30
31
|
};
|
|
31
32
|
export type TreeSettingDescriptor = {
|
|
32
33
|
[K in TreeSettingKey]: DescriptorFor<K>;
|
|
33
34
|
}[TreeSettingKey];
|
|
34
35
|
export declare const TREE_SETTING_DESCRIPTORS: readonly TreeSettingDescriptor[];
|
|
35
|
-
export declare const visibleTreeSettingDescriptors: (
|
|
36
|
+
export declare const visibleTreeSettingDescriptors: (mode: "tree" | "multi") => readonly TreeSettingDescriptor[];
|
|
36
37
|
export declare const advanceTreeSetting: (settings: TreeSettings, key: TreeSettingKey) => TreeSettings;
|
|
37
38
|
export declare const formatTreeSettingValue: (labels: MarkdownExplorerLabels, settings: TreeSettings, key: TreeSettingKey) => string;
|
|
38
39
|
export declare const TREE_SETTINGS_STORAGE_VERSION = 2;
|
|
@@ -13,6 +13,7 @@ export type TreeSettings = {
|
|
|
13
13
|
readonly expandIconSize: number;
|
|
14
14
|
readonly alwaysExpanded: boolean;
|
|
15
15
|
readonly revealDocument: boolean;
|
|
16
|
+
readonly showFolderReadme: boolean;
|
|
16
17
|
readonly removeRootIndent: boolean;
|
|
17
18
|
readonly lines: boolean;
|
|
18
19
|
readonly expandIcons: boolean;
|
|
@@ -26,13 +27,13 @@ type DescriptorFor<K extends TreeSettingKey> = {
|
|
|
26
27
|
readonly labelKey: keyof MarkdownExplorerLabels;
|
|
27
28
|
readonly values: readonly TreeSettings[K][];
|
|
28
29
|
readonly formatValue: (labels: MarkdownExplorerLabels, value: TreeSettings[K]) => string;
|
|
29
|
-
readonly
|
|
30
|
+
readonly requiresTreeView: boolean;
|
|
30
31
|
};
|
|
31
32
|
export type TreeSettingDescriptor = {
|
|
32
33
|
[K in TreeSettingKey]: DescriptorFor<K>;
|
|
33
34
|
}[TreeSettingKey];
|
|
34
35
|
export declare const TREE_SETTING_DESCRIPTORS: readonly TreeSettingDescriptor[];
|
|
35
|
-
export declare const visibleTreeSettingDescriptors: (
|
|
36
|
+
export declare const visibleTreeSettingDescriptors: (mode: "tree" | "multi") => readonly TreeSettingDescriptor[];
|
|
36
37
|
export declare const advanceTreeSetting: (settings: TreeSettings, key: TreeSettingKey) => TreeSettings;
|
|
37
38
|
export declare const formatTreeSettingValue: (labels: MarkdownExplorerLabels, settings: TreeSettings, key: TreeSettingKey) => string;
|
|
38
39
|
export declare const TREE_SETTINGS_STORAGE_VERSION = 2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentAlign } from "@aiquants/markdown/viewer-settings";
|
|
1
|
+
import { ContentAlign, ContentColors, ContentMeasure } from "@aiquants/markdown/viewer-settings";
|
|
2
2
|
export type ContentAlignment = ContentAlign;
|
|
3
3
|
export type ExplorerViewSettings = {
|
|
4
4
|
readonly treeExplorer?: number;
|
|
@@ -7,6 +7,8 @@ export type ExplorerViewSettings = {
|
|
|
7
7
|
readonly multiExplorerHidden?: boolean;
|
|
8
8
|
readonly style?: string;
|
|
9
9
|
readonly align?: ContentAlignment;
|
|
10
|
+
readonly measure?: ContentMeasure;
|
|
11
|
+
readonly documentColors?: ContentColors;
|
|
10
12
|
};
|
|
11
13
|
export declare const VIEW_SETTINGS_MAX_AGE_SECONDS = 31536000;
|
|
12
14
|
export declare const assertCookieName: (name: unknown) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContentAlign } from "@aiquants/markdown/viewer-settings";
|
|
1
|
+
import { ContentAlign, ContentColors, ContentMeasure } from "@aiquants/markdown/viewer-settings";
|
|
2
2
|
export type ContentAlignment = ContentAlign;
|
|
3
3
|
export type ExplorerViewSettings = {
|
|
4
4
|
readonly treeExplorer?: number;
|
|
@@ -7,6 +7,8 @@ export type ExplorerViewSettings = {
|
|
|
7
7
|
readonly multiExplorerHidden?: boolean;
|
|
8
8
|
readonly style?: string;
|
|
9
9
|
readonly align?: ContentAlignment;
|
|
10
|
+
readonly measure?: ContentMeasure;
|
|
11
|
+
readonly documentColors?: ContentColors;
|
|
10
12
|
};
|
|
11
13
|
export declare const VIEW_SETTINGS_MAX_AGE_SECONDS = 31536000;
|
|
12
14
|
export declare const assertCookieName: (name: unknown) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const i = (t) => {
|
|
2
|
+
if (t === null || typeof t != "object") return !1;
|
|
3
|
+
const n = Object.getPrototypeOf(t);
|
|
4
|
+
return n === Object.prototype || n === null;
|
|
5
|
+
};
|
|
6
|
+
const e = (t) => {
|
|
7
|
+
let n = 0, r = 0;
|
|
8
|
+
for (const o of t) {
|
|
9
|
+
if (n === 80) return JSON.stringify(`${t.slice(0, r)}…`);
|
|
10
|
+
n += 1, r += o.length;
|
|
11
|
+
}
|
|
12
|
+
return JSON.stringify(t);
|
|
13
|
+
}, c = (t) => typeof t == "string" ? e(t) : typeof t == "bigint" ? `${String(t)}n` : Object.is(t, -0) ? "-0" : typeof t == "function" ? "a function" : Array.isArray(t) ? "an array" : t !== null && typeof t == "object" ? i(t) ? "a plain object" : `a non-plain object (${Object.prototype.toString.call(t)})` : String(t);
|
|
14
|
+
export {
|
|
15
|
+
c as d,
|
|
16
|
+
i
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=t=>{if(t===null||typeof t!="object")return!1;const n=Object.getPrototypeOf(t);return n===Object.prototype||n===null};const e=t=>{let n=0,r=0;for(const o of t){if(n===80)return JSON.stringify(`${t.slice(0,r)}…`);n+=1,r+=o.length}return JSON.stringify(t)},c=t=>typeof t=="string"?e(t):typeof t=="bigint"?`${String(t)}n`:Object.is(t,-0)?"-0":typeof t=="function"?"a function":Array.isArray(t)?"an array":t!==null&&typeof t=="object"?i(t)?"a plain object":`a non-plain object (${Object.prototype.toString.call(t)})`:String(t);exports.describeValue=c;exports.isPlainObject=i;
|