@aiquants/markdown-explorer 0.33.0 → 0.35.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 +795 -0
- package/README.md +119 -55
- package/dist/EditSurface-CLG70Vnn.cjs +6 -0
- package/dist/EditSurface-D2j1kCEE.js +990 -0
- package/dist/ExplorerSplit-CfP1smbT.js +1589 -0
- package/dist/ExplorerSplit-D_0VohOv.cjs +2 -0
- package/dist/{MultiLayout-DYNGlNy0.js → MultiLayout-BeJ5Lubb.js} +291 -290
- package/dist/MultiLayout-CxV5SI7f.cjs +1 -0
- package/dist/NativeScrollBar-BM5NULzg.js +62 -0
- package/dist/NativeScrollBar-RWXpVhbI.cjs +1 -0
- package/dist/TreeLayout-AxLw-36S.js +103 -0
- package/dist/TreeLayout-Bg2YH-EY.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 +7 -0
- package/dist/core/config.d.ts +7 -0
- package/dist/core/contracts.d.cts +10 -4
- package/dist/core/contracts.d.ts +10 -4
- package/dist/core/draftAnswer.d.cts +23 -0
- package/dist/core/draftAnswer.d.ts +23 -0
- package/dist/core/geometry.d.cts +1 -0
- package/dist/core/geometry.d.ts +1 -0
- package/dist/core/labels.d.cts +78 -0
- package/dist/core/labels.d.ts +78 -0
- package/dist/core/location.d.cts +3 -2
- package/dist/core/location.d.ts +3 -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 +5 -1
- package/dist/core/viewSettings.d.ts +5 -1
- package/dist/describeValue-CLlVRO8d.js +17 -0
- package/dist/describeValue-Ccvhbt36.cjs +1 -0
- package/dist/explorerCore-DLpDuSev.js +998 -0
- package/dist/explorerCore-DYrxS9ez.cjs +1 -0
- package/dist/index-C1YMH-yI.js +5816 -0
- package/dist/index-LQWQfpAf.cjs +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +47 -42
- 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--KvTA0Ri.js +726 -0
- package/dist/location-D8DyDkuA.cjs +1 -0
- package/dist/lru-DC8GBmkX.js +39 -0
- package/dist/lru-SGmUyBQU.cjs +1 -0
- package/dist/{merge-D7L_pINl.js → merge-Bb_HpPhe.js} +1 -1
- package/dist/{merge-DZI4pkWI.cjs → merge-DQUYEGCx.cjs} +1 -1
- package/dist/nestingGuardWorker.js +5511 -0
- package/dist/ownUrls-B259RGgd.cjs +1 -0
- package/dist/ownUrls-Dh5g6ZJi.js +370 -0
- package/dist/sanitizeJob-BYRk17nr.js +21 -0
- package/dist/sanitizeJob-Cs9o3Vpl.cjs +1 -0
- package/dist/sanitizePolicy-CEMdaLUB.js +139 -0
- package/dist/sanitizePolicy-CiQfnxyd.cjs +2 -0
- package/dist/sanitizeWorker.cjs +1 -1
- package/dist/sanitizeWorker.js +134 -139
- package/dist/sanitizerService-BY4CPCoA.cjs +1 -0
- package/dist/sanitizerService-KWXv7bPm.js +240 -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/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 +36 -5
- package/dist/server/ports.d.ts +36 -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-BEydRn0y.js +14 -0
- package/dist/tapScrollCircle-DdX0Wri0.cjs +1 -0
- package/dist/testing.cjs +1 -0
- package/dist/testing.d.cts +6 -0
- package/dist/testing.d.ts +6 -0
- package/dist/testing.js +4 -0
- package/dist/useSplitPersistence-B2Fj508K.cjs +1 -0
- package/dist/useSplitPersistence-Fkqak8G8.js +44 -0
- package/docs/behavior/dom-hooks.md +14 -3
- package/docs/behavior/hosting.md +123 -0
- package/docs/behavior/layout.md +69 -19
- package/docs/behavior/localization.md +28 -10
- package/docs/behavior/security.md +34 -14
- package/docs/behavior/url-contract.md +13 -6
- package/package.json +54 -16
- package/dist/EditSurface-BPqqykro.cjs +0 -6
- package/dist/EditSurface-CWq35IWQ.js +0 -972
- package/dist/ExplorerSplit-BRY4uy6x.js +0 -1493
- package/dist/ExplorerSplit-CQxr6b0v.cjs +0 -1
- package/dist/MultiLayout-TXbet9k3.cjs +0 -1
- package/dist/NativeScrollBar-BsWdvkHa.js +0 -64
- package/dist/NativeScrollBar-UpjxjLlB.cjs +0 -1
- package/dist/TreeLayout-BQEgZhz9.js +0 -72
- package/dist/TreeLayout-C0O1OGi4.cjs +0 -1
- package/dist/dataRoute-DLhQfdoW.js +0 -298
- package/dist/dataRoute-DwYtgyt6.cjs +0 -1
- package/dist/index-CO-RgTml.js +0 -4912
- package/dist/index-DSkK8iLE.cjs +0 -15
- package/dist/location-BxiJRTyw.cjs +0 -1
- package/dist/location-perTmwct.js +0 -663
- package/dist/sanitizePolicy-By0tKOpZ.js +0 -98
- package/dist/sanitizePolicy-T5T-3vV5.cjs +0 -1
- package/dist/storage-DM0EvkVf.cjs +0 -1
- package/dist/tapScrollCircle-CRKZremf.js +0 -12
- package/dist/tapScrollCircle-Cbf17x8g.cjs +0 -1
- package/dist/useSplitPersistence-Du01PHNg.js +0 -42
- package/dist/useSplitPersistence-pPmE4GTT.cjs +0 -1
package/dist/core/contracts.d.ts
CHANGED
|
@@ -120,13 +120,16 @@ export type ExplorerFailureDocument = {
|
|
|
120
120
|
readonly kind: "failure";
|
|
121
121
|
readonly failure: ExplorerFailure;
|
|
122
122
|
};
|
|
123
|
-
export type
|
|
123
|
+
export type ExplorerFileText = {
|
|
124
124
|
readonly kind: "text";
|
|
125
125
|
readonly name: string;
|
|
126
126
|
readonly text: string;
|
|
127
127
|
readonly truncated: boolean;
|
|
128
128
|
readonly url: string;
|
|
129
129
|
};
|
|
130
|
+
export type ExplorerTextDocument = ExplorerFileText & {
|
|
131
|
+
readonly lang: string;
|
|
132
|
+
};
|
|
130
133
|
export type ExplorerExternalEdit = {
|
|
131
134
|
readonly kind: "external";
|
|
132
135
|
readonly href: string;
|
|
@@ -149,6 +152,7 @@ export type ExplorerDocument = {
|
|
|
149
152
|
readonly name: string;
|
|
150
153
|
readonly htmlContent: string;
|
|
151
154
|
readonly headings: readonly ExplorerHeading[];
|
|
155
|
+
readonly lang: string;
|
|
152
156
|
readonly edit: ExplorerDocumentEdit | null;
|
|
153
157
|
} | ExplorerTextDocument | {
|
|
154
158
|
readonly kind: "image";
|
|
@@ -165,7 +169,7 @@ export type ExplorerDocument = {
|
|
|
165
169
|
readonly name: string;
|
|
166
170
|
readonly url: string;
|
|
167
171
|
} | ExplorerFailureDocument;
|
|
168
|
-
export type ExplorerTextAnswer =
|
|
172
|
+
export type ExplorerTextAnswer = ExplorerFileText | ExplorerFailureDocument;
|
|
169
173
|
export type ExplorerGrantRequired = {
|
|
170
174
|
readonly kind: "grant";
|
|
171
175
|
readonly href: string;
|
|
@@ -194,7 +198,7 @@ export type ExplorerPreviewAnswer = {
|
|
|
194
198
|
readonly htmlContent: string;
|
|
195
199
|
readonly headings: readonly ExplorerHeading[];
|
|
196
200
|
} | ExplorerFailureDocument;
|
|
197
|
-
export type
|
|
201
|
+
export type ExplorerPreviewDraft = {
|
|
198
202
|
readonly path: string;
|
|
199
203
|
readonly text: string;
|
|
200
204
|
};
|
|
@@ -206,7 +210,7 @@ export type ExplorerDraftAnswer = {
|
|
|
206
210
|
readonly kind: "unavailable";
|
|
207
211
|
};
|
|
208
212
|
export type ExplorerDraftConverter = {
|
|
209
|
-
readonly convert: (draft:
|
|
213
|
+
readonly convert: (draft: ExplorerPreviewDraft, signal: AbortSignal) => Promise<ExplorerDraftAnswer>;
|
|
210
214
|
readonly prepare?: () => void;
|
|
211
215
|
};
|
|
212
216
|
export type ExplorerRevision = {
|
|
@@ -257,6 +261,8 @@ export declare const isExplorerAncestorsResult: (value: unknown) => value is Exp
|
|
|
257
261
|
export declare const isExplorerRevealResult: (value: unknown) => value is ExplorerRevealResult;
|
|
258
262
|
export declare const isExplorerTreeResult: (value: unknown) => value is ExplorerTreeResult;
|
|
259
263
|
export declare const headingViolation: (value: unknown) => string | null;
|
|
264
|
+
export declare const isExplorerDocumentLang: (value: unknown) => value is string;
|
|
265
|
+
export declare const documentLangRefusal: (kind: "markdown" | "text", value: unknown) => string;
|
|
260
266
|
export declare const documentViolation: (value: unknown) => string | null;
|
|
261
267
|
export declare const isExplorerDocument: (value: unknown) => value is ExplorerDocument;
|
|
262
268
|
export declare const isExplorerTextAnswer: (value: unknown) => value is ExplorerTextAnswer;
|
|
@@ -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/geometry.d.cts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const FIBONACCI_DURATIONS_MS: readonly [
|
|
|
30
30
|
export declare const CONTROL_BLOCK_PIXELS = 44;
|
|
31
31
|
export declare const COARSE_TARGET_PIXELS = 44;
|
|
32
32
|
export declare const FINE_TARGET_PIXELS = 24;
|
|
33
|
+
export declare const EXPLORER_BAR_PIXELS: number;
|
|
33
34
|
export declare const PANEL_MAX_BLOCK_RATIO: number;
|
|
34
35
|
export declare const PANEL_MIN_BLOCK_RATIO: number;
|
|
35
36
|
export declare const COLUMN_MIN_MEASURE = "40ch";
|
package/dist/core/geometry.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const FIBONACCI_DURATIONS_MS: readonly [
|
|
|
30
30
|
export declare const CONTROL_BLOCK_PIXELS = 44;
|
|
31
31
|
export declare const COARSE_TARGET_PIXELS = 44;
|
|
32
32
|
export declare const FINE_TARGET_PIXELS = 24;
|
|
33
|
+
export declare const EXPLORER_BAR_PIXELS: number;
|
|
33
34
|
export declare const PANEL_MAX_BLOCK_RATIO: number;
|
|
34
35
|
export declare const PANEL_MIN_BLOCK_RATIO: number;
|
|
35
36
|
export declare const COLUMN_MIN_MEASURE = "40ch";
|
package/dist/core/labels.d.cts
CHANGED
|
@@ -21,7 +21,18 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
21
21
|
readonly refreshDocument: string;
|
|
22
22
|
readonly refreshDocumentNamed: (name: string) => string;
|
|
23
23
|
readonly documentRefreshed: (name: string) => string;
|
|
24
|
+
readonly documentMaximize: string;
|
|
25
|
+
readonly documentRestore: string;
|
|
26
|
+
readonly documentMaximized: (name: string) => string;
|
|
27
|
+
readonly documentRestored: (name: string) => string;
|
|
24
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;
|
|
25
36
|
readonly showMarkupLabel: string;
|
|
26
37
|
readonly showMarkup: string;
|
|
27
38
|
readonly showSvgMarkup: string;
|
|
@@ -78,6 +89,9 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
78
89
|
readonly draftDiscardTitle: string;
|
|
79
90
|
readonly draftDiscardBody: (names: string) => string;
|
|
80
91
|
readonly unsavedStay: string;
|
|
92
|
+
readonly unversionedSaveTitle: string;
|
|
93
|
+
readonly unversionedSaveBody: string;
|
|
94
|
+
readonly unversionedSaveConfirm: string;
|
|
81
95
|
readonly historyTitle: (name: string) => string;
|
|
82
96
|
readonly historyLoading: string;
|
|
83
97
|
readonly historyEmpty: string;
|
|
@@ -147,6 +161,7 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
147
161
|
readonly expandIconSizeValue: (pixels: number) => string;
|
|
148
162
|
readonly settingAlwaysExpanded: string;
|
|
149
163
|
readonly settingRevealDocument: string;
|
|
164
|
+
readonly settingShowFolderReadme: string;
|
|
150
165
|
readonly settingRemoveRootIndent: string;
|
|
151
166
|
readonly settingTreeLines: string;
|
|
152
167
|
readonly settingExpandIcons: string;
|
|
@@ -168,6 +183,8 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
168
183
|
readonly inertLink: string;
|
|
169
184
|
readonly failureUnauthorizedTitle: string;
|
|
170
185
|
readonly failureUnauthorizedBody: string;
|
|
186
|
+
readonly failureUnauthorizedSignInBody: string;
|
|
187
|
+
readonly failureUnauthorizedSignedOutBody: string;
|
|
171
188
|
readonly failureForbiddenTitle: string;
|
|
172
189
|
readonly failureForbiddenBody: string;
|
|
173
190
|
readonly failureNotFoundTitle: string;
|
|
@@ -184,6 +201,8 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
184
201
|
readonly failureFailedBody: string;
|
|
185
202
|
readonly retry: string;
|
|
186
203
|
readonly reloadPage: string;
|
|
204
|
+
readonly signInAgain: string;
|
|
205
|
+
readonly signIn: string;
|
|
187
206
|
readonly imageZoomIn: string;
|
|
188
207
|
readonly imageZoomOut: string;
|
|
189
208
|
readonly imageFit: string;
|
|
@@ -219,6 +238,15 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
219
238
|
readonly viewerSelectStyle: string;
|
|
220
239
|
readonly viewerPinStyle: string;
|
|
221
240
|
readonly viewerUnpinStyle: string;
|
|
241
|
+
readonly viewerStyleSectionTitle: string;
|
|
242
|
+
readonly viewerMeasureTitle: string;
|
|
243
|
+
readonly viewerColorsTitle: string;
|
|
244
|
+
readonly viewerMeasureFill: string;
|
|
245
|
+
readonly viewerMeasureReading: string;
|
|
246
|
+
readonly viewerColorsDefault: string;
|
|
247
|
+
readonly viewerColorsSepia: string;
|
|
248
|
+
readonly viewerColorsDarkLowGlare: string;
|
|
249
|
+
readonly viewerColorsHighContrast: string;
|
|
222
250
|
readonly viewerErrorTitle: string;
|
|
223
251
|
readonly viewerMissingImage: string;
|
|
224
252
|
readonly viewerOpenToc: string;
|
|
@@ -256,6 +284,46 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
256
284
|
readonly viewerMermaidFullscreenDialog: string;
|
|
257
285
|
readonly viewerMermaidDiagram: string;
|
|
258
286
|
readonly viewerMermaidRetry: string;
|
|
287
|
+
readonly viewerMermaidLoading: string;
|
|
288
|
+
readonly viewerMermaidInitializationFailed: string;
|
|
289
|
+
readonly viewerMermaidRenderFailed: string;
|
|
290
|
+
readonly viewerMermaidEmptyDrawing: string;
|
|
291
|
+
readonly viewerMermaidSource: string;
|
|
292
|
+
readonly viewerMermaidSourceRegion: string;
|
|
293
|
+
readonly viewerMermaidCopySource: string;
|
|
294
|
+
readonly viewerMermaidCopiedSource: string;
|
|
295
|
+
readonly viewerMermaidCopySourceFailed: string;
|
|
296
|
+
readonly viewerMermaidTypeC4: string;
|
|
297
|
+
readonly viewerMermaidTypeFlowchart: string;
|
|
298
|
+
readonly viewerMermaidTypeSwimlane: string;
|
|
299
|
+
readonly viewerMermaidTypeEntityRelationship: string;
|
|
300
|
+
readonly viewerMermaidTypeGitGraph: string;
|
|
301
|
+
readonly viewerMermaidTypeGantt: string;
|
|
302
|
+
readonly viewerMermaidTypeInfo: string;
|
|
303
|
+
readonly viewerMermaidTypePie: string;
|
|
304
|
+
readonly viewerMermaidTypeQuadrantChart: string;
|
|
305
|
+
readonly viewerMermaidTypeXyChart: string;
|
|
306
|
+
readonly viewerMermaidTypeRequirement: string;
|
|
307
|
+
readonly viewerMermaidTypeSequence: string;
|
|
308
|
+
readonly viewerMermaidTypeClass: string;
|
|
309
|
+
readonly viewerMermaidTypeState: string;
|
|
310
|
+
readonly viewerMermaidTypeJourney: string;
|
|
311
|
+
readonly viewerMermaidTypeTimeline: string;
|
|
312
|
+
readonly viewerMermaidTypeMindmap: string;
|
|
313
|
+
readonly viewerMermaidTypeKanban: string;
|
|
314
|
+
readonly viewerMermaidTypeSankey: string;
|
|
315
|
+
readonly viewerMermaidTypePacket: string;
|
|
316
|
+
readonly viewerMermaidTypeRadar: string;
|
|
317
|
+
readonly viewerMermaidTypeBlock: string;
|
|
318
|
+
readonly viewerMermaidTypeTreeView: string;
|
|
319
|
+
readonly viewerMermaidTypeArchitecture: string;
|
|
320
|
+
readonly viewerMermaidTypeEventModeling: string;
|
|
321
|
+
readonly viewerMermaidTypeIshikawa: string;
|
|
322
|
+
readonly viewerMermaidTypeVenn: string;
|
|
323
|
+
readonly viewerMermaidTypeTreemap: string;
|
|
324
|
+
readonly viewerMermaidTypeWardley: string;
|
|
325
|
+
readonly viewerMermaidTypeCynefin: string;
|
|
326
|
+
readonly viewerMermaidTypeRailroad: string;
|
|
259
327
|
readonly viewerEmbeddedVideo: string;
|
|
260
328
|
readonly viewerEmbeddedPost: string;
|
|
261
329
|
readonly viewerEmbeddedFrame: string;
|
|
@@ -276,6 +344,12 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
276
344
|
readonly viewerSvgImageFullscreen: string;
|
|
277
345
|
readonly viewerSvgImageExitFullscreen: string;
|
|
278
346
|
readonly viewerSvgImageFullscreenDialog: string;
|
|
347
|
+
readonly viewerCodeBlockCopy: string;
|
|
348
|
+
readonly viewerCodeBlockCopied: string;
|
|
349
|
+
readonly viewerCodeBlockCopyFailed: string;
|
|
350
|
+
readonly viewerDisplayMathCopy: string;
|
|
351
|
+
readonly viewerDisplayMathCopied: string;
|
|
352
|
+
readonly viewerDisplayMathCopyFailed: string;
|
|
279
353
|
readonly multiRegion: string;
|
|
280
354
|
readonly multiEmpty: string;
|
|
281
355
|
readonly panelLimit: (max: number) => string;
|
|
@@ -309,6 +383,10 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
309
383
|
readonly multiColumnEmpty: string;
|
|
310
384
|
readonly multiColumnRegion: string;
|
|
311
385
|
readonly panelDropHere: string;
|
|
386
|
+
readonly panelGroupMinimumExceededSummary: string;
|
|
387
|
+
readonly panelGroupMinimumExceededDetail: string;
|
|
388
|
+
readonly panelGroupMaximumInsufficientSummary: string;
|
|
389
|
+
readonly panelGroupMaximumInsufficientDetail: string;
|
|
312
390
|
};
|
|
313
391
|
export type MarkdownExplorerLabelKey = keyof MarkdownExplorerLabels;
|
|
314
392
|
export type MarkdownExplorerLabelOverrides = Partial<MarkdownExplorerLabels>;
|
package/dist/core/labels.d.ts
CHANGED
|
@@ -21,7 +21,18 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
21
21
|
readonly refreshDocument: string;
|
|
22
22
|
readonly refreshDocumentNamed: (name: string) => string;
|
|
23
23
|
readonly documentRefreshed: (name: string) => string;
|
|
24
|
+
readonly documentMaximize: string;
|
|
25
|
+
readonly documentRestore: string;
|
|
26
|
+
readonly documentMaximized: (name: string) => string;
|
|
27
|
+
readonly documentRestored: (name: string) => string;
|
|
24
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;
|
|
25
36
|
readonly showMarkupLabel: string;
|
|
26
37
|
readonly showMarkup: string;
|
|
27
38
|
readonly showSvgMarkup: string;
|
|
@@ -78,6 +89,9 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
78
89
|
readonly draftDiscardTitle: string;
|
|
79
90
|
readonly draftDiscardBody: (names: string) => string;
|
|
80
91
|
readonly unsavedStay: string;
|
|
92
|
+
readonly unversionedSaveTitle: string;
|
|
93
|
+
readonly unversionedSaveBody: string;
|
|
94
|
+
readonly unversionedSaveConfirm: string;
|
|
81
95
|
readonly historyTitle: (name: string) => string;
|
|
82
96
|
readonly historyLoading: string;
|
|
83
97
|
readonly historyEmpty: string;
|
|
@@ -147,6 +161,7 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
147
161
|
readonly expandIconSizeValue: (pixels: number) => string;
|
|
148
162
|
readonly settingAlwaysExpanded: string;
|
|
149
163
|
readonly settingRevealDocument: string;
|
|
164
|
+
readonly settingShowFolderReadme: string;
|
|
150
165
|
readonly settingRemoveRootIndent: string;
|
|
151
166
|
readonly settingTreeLines: string;
|
|
152
167
|
readonly settingExpandIcons: string;
|
|
@@ -168,6 +183,8 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
168
183
|
readonly inertLink: string;
|
|
169
184
|
readonly failureUnauthorizedTitle: string;
|
|
170
185
|
readonly failureUnauthorizedBody: string;
|
|
186
|
+
readonly failureUnauthorizedSignInBody: string;
|
|
187
|
+
readonly failureUnauthorizedSignedOutBody: string;
|
|
171
188
|
readonly failureForbiddenTitle: string;
|
|
172
189
|
readonly failureForbiddenBody: string;
|
|
173
190
|
readonly failureNotFoundTitle: string;
|
|
@@ -184,6 +201,8 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
184
201
|
readonly failureFailedBody: string;
|
|
185
202
|
readonly retry: string;
|
|
186
203
|
readonly reloadPage: string;
|
|
204
|
+
readonly signInAgain: string;
|
|
205
|
+
readonly signIn: string;
|
|
187
206
|
readonly imageZoomIn: string;
|
|
188
207
|
readonly imageZoomOut: string;
|
|
189
208
|
readonly imageFit: string;
|
|
@@ -219,6 +238,15 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
219
238
|
readonly viewerSelectStyle: string;
|
|
220
239
|
readonly viewerPinStyle: string;
|
|
221
240
|
readonly viewerUnpinStyle: string;
|
|
241
|
+
readonly viewerStyleSectionTitle: string;
|
|
242
|
+
readonly viewerMeasureTitle: string;
|
|
243
|
+
readonly viewerColorsTitle: string;
|
|
244
|
+
readonly viewerMeasureFill: string;
|
|
245
|
+
readonly viewerMeasureReading: string;
|
|
246
|
+
readonly viewerColorsDefault: string;
|
|
247
|
+
readonly viewerColorsSepia: string;
|
|
248
|
+
readonly viewerColorsDarkLowGlare: string;
|
|
249
|
+
readonly viewerColorsHighContrast: string;
|
|
222
250
|
readonly viewerErrorTitle: string;
|
|
223
251
|
readonly viewerMissingImage: string;
|
|
224
252
|
readonly viewerOpenToc: string;
|
|
@@ -256,6 +284,46 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
256
284
|
readonly viewerMermaidFullscreenDialog: string;
|
|
257
285
|
readonly viewerMermaidDiagram: string;
|
|
258
286
|
readonly viewerMermaidRetry: string;
|
|
287
|
+
readonly viewerMermaidLoading: string;
|
|
288
|
+
readonly viewerMermaidInitializationFailed: string;
|
|
289
|
+
readonly viewerMermaidRenderFailed: string;
|
|
290
|
+
readonly viewerMermaidEmptyDrawing: string;
|
|
291
|
+
readonly viewerMermaidSource: string;
|
|
292
|
+
readonly viewerMermaidSourceRegion: string;
|
|
293
|
+
readonly viewerMermaidCopySource: string;
|
|
294
|
+
readonly viewerMermaidCopiedSource: string;
|
|
295
|
+
readonly viewerMermaidCopySourceFailed: string;
|
|
296
|
+
readonly viewerMermaidTypeC4: string;
|
|
297
|
+
readonly viewerMermaidTypeFlowchart: string;
|
|
298
|
+
readonly viewerMermaidTypeSwimlane: string;
|
|
299
|
+
readonly viewerMermaidTypeEntityRelationship: string;
|
|
300
|
+
readonly viewerMermaidTypeGitGraph: string;
|
|
301
|
+
readonly viewerMermaidTypeGantt: string;
|
|
302
|
+
readonly viewerMermaidTypeInfo: string;
|
|
303
|
+
readonly viewerMermaidTypePie: string;
|
|
304
|
+
readonly viewerMermaidTypeQuadrantChart: string;
|
|
305
|
+
readonly viewerMermaidTypeXyChart: string;
|
|
306
|
+
readonly viewerMermaidTypeRequirement: string;
|
|
307
|
+
readonly viewerMermaidTypeSequence: string;
|
|
308
|
+
readonly viewerMermaidTypeClass: string;
|
|
309
|
+
readonly viewerMermaidTypeState: string;
|
|
310
|
+
readonly viewerMermaidTypeJourney: string;
|
|
311
|
+
readonly viewerMermaidTypeTimeline: string;
|
|
312
|
+
readonly viewerMermaidTypeMindmap: string;
|
|
313
|
+
readonly viewerMermaidTypeKanban: string;
|
|
314
|
+
readonly viewerMermaidTypeSankey: string;
|
|
315
|
+
readonly viewerMermaidTypePacket: string;
|
|
316
|
+
readonly viewerMermaidTypeRadar: string;
|
|
317
|
+
readonly viewerMermaidTypeBlock: string;
|
|
318
|
+
readonly viewerMermaidTypeTreeView: string;
|
|
319
|
+
readonly viewerMermaidTypeArchitecture: string;
|
|
320
|
+
readonly viewerMermaidTypeEventModeling: string;
|
|
321
|
+
readonly viewerMermaidTypeIshikawa: string;
|
|
322
|
+
readonly viewerMermaidTypeVenn: string;
|
|
323
|
+
readonly viewerMermaidTypeTreemap: string;
|
|
324
|
+
readonly viewerMermaidTypeWardley: string;
|
|
325
|
+
readonly viewerMermaidTypeCynefin: string;
|
|
326
|
+
readonly viewerMermaidTypeRailroad: string;
|
|
259
327
|
readonly viewerEmbeddedVideo: string;
|
|
260
328
|
readonly viewerEmbeddedPost: string;
|
|
261
329
|
readonly viewerEmbeddedFrame: string;
|
|
@@ -276,6 +344,12 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
276
344
|
readonly viewerSvgImageFullscreen: string;
|
|
277
345
|
readonly viewerSvgImageExitFullscreen: string;
|
|
278
346
|
readonly viewerSvgImageFullscreenDialog: string;
|
|
347
|
+
readonly viewerCodeBlockCopy: string;
|
|
348
|
+
readonly viewerCodeBlockCopied: string;
|
|
349
|
+
readonly viewerCodeBlockCopyFailed: string;
|
|
350
|
+
readonly viewerDisplayMathCopy: string;
|
|
351
|
+
readonly viewerDisplayMathCopied: string;
|
|
352
|
+
readonly viewerDisplayMathCopyFailed: string;
|
|
279
353
|
readonly multiRegion: string;
|
|
280
354
|
readonly multiEmpty: string;
|
|
281
355
|
readonly panelLimit: (max: number) => string;
|
|
@@ -309,6 +383,10 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
309
383
|
readonly multiColumnEmpty: string;
|
|
310
384
|
readonly multiColumnRegion: string;
|
|
311
385
|
readonly panelDropHere: string;
|
|
386
|
+
readonly panelGroupMinimumExceededSummary: string;
|
|
387
|
+
readonly panelGroupMinimumExceededDetail: string;
|
|
388
|
+
readonly panelGroupMaximumInsufficientSummary: string;
|
|
389
|
+
readonly panelGroupMaximumInsufficientDetail: string;
|
|
312
390
|
};
|
|
313
391
|
export type MarkdownExplorerLabelKey = keyof MarkdownExplorerLabels;
|
|
314
392
|
export type MarkdownExplorerLabelOverrides = Partial<MarkdownExplorerLabels>;
|
package/dist/core/location.d.cts
CHANGED
|
@@ -19,6 +19,7 @@ export type ExplorerLocation = {
|
|
|
19
19
|
readonly folder: string | null;
|
|
20
20
|
readonly overrides: ExplorerOverrides;
|
|
21
21
|
readonly markup: boolean;
|
|
22
|
+
readonly maximized: boolean;
|
|
22
23
|
} | {
|
|
23
24
|
readonly view: "multi";
|
|
24
25
|
readonly source: string;
|
|
@@ -48,6 +49,7 @@ export type ExplorerHrefTarget = {
|
|
|
48
49
|
readonly folder?: string | null;
|
|
49
50
|
readonly overrides?: ExplorerOverrides;
|
|
50
51
|
readonly markup?: boolean;
|
|
52
|
+
readonly maximized?: boolean;
|
|
51
53
|
} | {
|
|
52
54
|
readonly view: "multi";
|
|
53
55
|
readonly source?: string;
|
|
@@ -65,7 +67,7 @@ export type ExplorerHrefTarget = {
|
|
|
65
67
|
export type ExplorerSourcelessHrefTarget = ExplorerHrefTarget & {
|
|
66
68
|
readonly source?: undefined;
|
|
67
69
|
};
|
|
68
|
-
type ExplorerHrefWriter = {
|
|
70
|
+
export type ExplorerHrefWriter = {
|
|
69
71
|
(config: ExplorerLocationConfig, target: ExplorerHrefTarget): string;
|
|
70
72
|
(config: ExplorerConfig, target: ExplorerSourcelessHrefTarget): string;
|
|
71
73
|
};
|
|
@@ -89,4 +91,3 @@ export declare const decodeDocumentSegment: (segment: string) => string;
|
|
|
89
91
|
export declare const canonicalMultiDocuments: (config: ExplorerConfig, docs: readonly string[]) => readonly string[];
|
|
90
92
|
export declare const explorerHref: ExplorerHrefWriter;
|
|
91
93
|
export declare const resolveExplorerLocation: (config: ExplorerLocationConfig, splat: string | undefined, search: URLSearchParams) => ExplorerLocationResult;
|
|
92
|
-
export {};
|
package/dist/core/location.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export type ExplorerLocation = {
|
|
|
19
19
|
readonly folder: string | null;
|
|
20
20
|
readonly overrides: ExplorerOverrides;
|
|
21
21
|
readonly markup: boolean;
|
|
22
|
+
readonly maximized: boolean;
|
|
22
23
|
} | {
|
|
23
24
|
readonly view: "multi";
|
|
24
25
|
readonly source: string;
|
|
@@ -48,6 +49,7 @@ export type ExplorerHrefTarget = {
|
|
|
48
49
|
readonly folder?: string | null;
|
|
49
50
|
readonly overrides?: ExplorerOverrides;
|
|
50
51
|
readonly markup?: boolean;
|
|
52
|
+
readonly maximized?: boolean;
|
|
51
53
|
} | {
|
|
52
54
|
readonly view: "multi";
|
|
53
55
|
readonly source?: string;
|
|
@@ -65,7 +67,7 @@ export type ExplorerHrefTarget = {
|
|
|
65
67
|
export type ExplorerSourcelessHrefTarget = ExplorerHrefTarget & {
|
|
66
68
|
readonly source?: undefined;
|
|
67
69
|
};
|
|
68
|
-
type ExplorerHrefWriter = {
|
|
70
|
+
export type ExplorerHrefWriter = {
|
|
69
71
|
(config: ExplorerLocationConfig, target: ExplorerHrefTarget): string;
|
|
70
72
|
(config: ExplorerConfig, target: ExplorerSourcelessHrefTarget): string;
|
|
71
73
|
};
|
|
@@ -89,4 +91,3 @@ export declare const decodeDocumentSegment: (segment: string) => string;
|
|
|
89
91
|
export declare const canonicalMultiDocuments: (config: ExplorerConfig, docs: readonly string[]) => readonly string[];
|
|
90
92
|
export declare const explorerHref: ExplorerHrefWriter;
|
|
91
93
|
export declare const resolveExplorerLocation: (config: ExplorerLocationConfig, splat: string | undefined, search: URLSearchParams) => ExplorerLocationResult;
|
|
92
|
-
export {};
|
|
@@ -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,10 +1,14 @@
|
|
|
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;
|
|
5
|
+
readonly treeExplorerHidden?: boolean;
|
|
5
6
|
readonly multiExplorer?: number;
|
|
7
|
+
readonly multiExplorerHidden?: boolean;
|
|
6
8
|
readonly style?: string;
|
|
7
9
|
readonly align?: ContentAlignment;
|
|
10
|
+
readonly measure?: ContentMeasure;
|
|
11
|
+
readonly documentColors?: ContentColors;
|
|
8
12
|
};
|
|
9
13
|
export declare const VIEW_SETTINGS_MAX_AGE_SECONDS = 31536000;
|
|
10
14
|
export declare const assertCookieName: (name: unknown) => void;
|
|
@@ -1,10 +1,14 @@
|
|
|
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;
|
|
5
|
+
readonly treeExplorerHidden?: boolean;
|
|
5
6
|
readonly multiExplorer?: number;
|
|
7
|
+
readonly multiExplorerHidden?: boolean;
|
|
6
8
|
readonly style?: string;
|
|
7
9
|
readonly align?: ContentAlignment;
|
|
10
|
+
readonly measure?: ContentMeasure;
|
|
11
|
+
readonly documentColors?: ContentColors;
|
|
8
12
|
};
|
|
9
13
|
export declare const VIEW_SETTINGS_MAX_AGE_SECONDS = 31536000;
|
|
10
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;
|