@aiquants/markdown-explorer 0.34.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 +515 -0
- package/README.md +90 -39
- 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-kcZyVnvK.js → MultiLayout-BeJ5Lubb.js} +249 -248
- package/dist/MultiLayout-CxV5SI7f.cjs +1 -0
- package/dist/{NativeScrollBar-UNed10Na.js → NativeScrollBar-BM5NULzg.js} +2 -2
- package/dist/{NativeScrollBar-pUbA4Zq3.cjs → NativeScrollBar-RWXpVhbI.cjs} +1 -1
- 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/labels.d.cts +68 -0
- package/dist/core/labels.d.ts +68 -0
- package/dist/core/location.d.cts +1 -2
- package/dist/core/location.d.ts +1 -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-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 +49 -44
- 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-C1MWvhCS.js → merge-Bb_HpPhe.js} +1 -1
- package/dist/{merge-BziXxZkE.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-D_BpaLwY.js → tapScrollCircle-BEydRn0y.js} +1 -1
- package/dist/{tapScrollCircle-DigcJCsu.cjs → tapScrollCircle-DdX0Wri0.cjs} +1 -1
- 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 +2 -0
- 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 +32 -13
- package/docs/behavior/url-contract.md +4 -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
|
@@ -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;
|
|
@@ -223,6 +238,15 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
223
238
|
readonly viewerSelectStyle: string;
|
|
224
239
|
readonly viewerPinStyle: string;
|
|
225
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;
|
|
226
250
|
readonly viewerErrorTitle: string;
|
|
227
251
|
readonly viewerMissingImage: string;
|
|
228
252
|
readonly viewerOpenToc: string;
|
|
@@ -260,6 +284,46 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
260
284
|
readonly viewerMermaidFullscreenDialog: string;
|
|
261
285
|
readonly viewerMermaidDiagram: string;
|
|
262
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;
|
|
263
327
|
readonly viewerEmbeddedVideo: string;
|
|
264
328
|
readonly viewerEmbeddedPost: string;
|
|
265
329
|
readonly viewerEmbeddedFrame: string;
|
|
@@ -319,6 +383,10 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
319
383
|
readonly multiColumnEmpty: string;
|
|
320
384
|
readonly multiColumnRegion: string;
|
|
321
385
|
readonly panelDropHere: string;
|
|
386
|
+
readonly panelGroupMinimumExceededSummary: string;
|
|
387
|
+
readonly panelGroupMinimumExceededDetail: string;
|
|
388
|
+
readonly panelGroupMaximumInsufficientSummary: string;
|
|
389
|
+
readonly panelGroupMaximumInsufficientDetail: string;
|
|
322
390
|
};
|
|
323
391
|
export type MarkdownExplorerLabelKey = keyof MarkdownExplorerLabels;
|
|
324
392
|
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;
|
|
@@ -223,6 +238,15 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
223
238
|
readonly viewerSelectStyle: string;
|
|
224
239
|
readonly viewerPinStyle: string;
|
|
225
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;
|
|
226
250
|
readonly viewerErrorTitle: string;
|
|
227
251
|
readonly viewerMissingImage: string;
|
|
228
252
|
readonly viewerOpenToc: string;
|
|
@@ -260,6 +284,46 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
260
284
|
readonly viewerMermaidFullscreenDialog: string;
|
|
261
285
|
readonly viewerMermaidDiagram: string;
|
|
262
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;
|
|
263
327
|
readonly viewerEmbeddedVideo: string;
|
|
264
328
|
readonly viewerEmbeddedPost: string;
|
|
265
329
|
readonly viewerEmbeddedFrame: string;
|
|
@@ -319,6 +383,10 @@ export type MarkdownExplorerLabels = MarkdownExplorerSpreadsheetLabels & {
|
|
|
319
383
|
readonly multiColumnEmpty: string;
|
|
320
384
|
readonly multiColumnRegion: string;
|
|
321
385
|
readonly panelDropHere: string;
|
|
386
|
+
readonly panelGroupMinimumExceededSummary: string;
|
|
387
|
+
readonly panelGroupMinimumExceededDetail: string;
|
|
388
|
+
readonly panelGroupMaximumInsufficientSummary: string;
|
|
389
|
+
readonly panelGroupMaximumInsufficientDetail: string;
|
|
322
390
|
};
|
|
323
391
|
export type MarkdownExplorerLabelKey = keyof MarkdownExplorerLabels;
|
|
324
392
|
export type MarkdownExplorerLabelOverrides = Partial<MarkdownExplorerLabels>;
|
package/dist/core/location.d.cts
CHANGED
|
@@ -67,7 +67,7 @@ export type ExplorerHrefTarget = {
|
|
|
67
67
|
export type ExplorerSourcelessHrefTarget = ExplorerHrefTarget & {
|
|
68
68
|
readonly source?: undefined;
|
|
69
69
|
};
|
|
70
|
-
type ExplorerHrefWriter = {
|
|
70
|
+
export type ExplorerHrefWriter = {
|
|
71
71
|
(config: ExplorerLocationConfig, target: ExplorerHrefTarget): string;
|
|
72
72
|
(config: ExplorerConfig, target: ExplorerSourcelessHrefTarget): string;
|
|
73
73
|
};
|
|
@@ -91,4 +91,3 @@ export declare const decodeDocumentSegment: (segment: string) => string;
|
|
|
91
91
|
export declare const canonicalMultiDocuments: (config: ExplorerConfig, docs: readonly string[]) => readonly string[];
|
|
92
92
|
export declare const explorerHref: ExplorerHrefWriter;
|
|
93
93
|
export declare const resolveExplorerLocation: (config: ExplorerLocationConfig, splat: string | undefined, search: URLSearchParams) => ExplorerLocationResult;
|
|
94
|
-
export {};
|
package/dist/core/location.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export type ExplorerHrefTarget = {
|
|
|
67
67
|
export type ExplorerSourcelessHrefTarget = ExplorerHrefTarget & {
|
|
68
68
|
readonly source?: undefined;
|
|
69
69
|
};
|
|
70
|
-
type ExplorerHrefWriter = {
|
|
70
|
+
export type ExplorerHrefWriter = {
|
|
71
71
|
(config: ExplorerLocationConfig, target: ExplorerHrefTarget): string;
|
|
72
72
|
(config: ExplorerConfig, target: ExplorerSourcelessHrefTarget): string;
|
|
73
73
|
};
|
|
@@ -91,4 +91,3 @@ export declare const decodeDocumentSegment: (segment: string) => string;
|
|
|
91
91
|
export declare const canonicalMultiDocuments: (config: ExplorerConfig, docs: readonly string[]) => readonly string[];
|
|
92
92
|
export declare const explorerHref: ExplorerHrefWriter;
|
|
93
93
|
export declare const resolveExplorerLocation: (config: ExplorerLocationConfig, splat: string | undefined, search: URLSearchParams) => ExplorerLocationResult;
|
|
94
|
-
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,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;
|