@open-press/cli 1.0.0 → 1.1.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/README.md +11 -12
- package/dist/cli.js +298 -79
- package/package.json +9 -7
- package/template/core/AGENTS.md +0 -130
- package/template/core/CHANGELOG.md +0 -218
- package/template/core/README.md +0 -43
- package/template/core/engine/cli.mjs +0 -96
- package/template/core/engine/commands/_shared.mjs +0 -199
- package/template/core/engine/commands/deploy.mjs +0 -31
- package/template/core/engine/commands/dev.mjs +0 -49
- package/template/core/engine/commands/doctor.mjs +0 -229
- package/template/core/engine/commands/export.mjs +0 -8
- package/template/core/engine/commands/image.mjs +0 -29
- package/template/core/engine/commands/inspect.mjs +0 -35
- package/template/core/engine/commands/pdf.mjs +0 -26
- package/template/core/engine/commands/preview.mjs +0 -26
- package/template/core/engine/commands/render.mjs +0 -17
- package/template/core/engine/commands/replace.mjs +0 -41
- package/template/core/engine/commands/search.mjs +0 -33
- package/template/core/engine/commands/skills-sync.mjs +0 -71
- package/template/core/engine/commands/typecheck.mjs +0 -67
- package/template/core/engine/commands/upgrade.mjs +0 -159
- package/template/core/engine/commands/validate.mjs +0 -17
- package/template/core/engine/document-export.mjs +0 -15
- package/template/core/engine/output/chrome-pdf.d.mts +0 -34
- package/template/core/engine/output/chrome-pdf.mjs +0 -450
- package/template/core/engine/output/deploy-sync.mjs +0 -15
- package/template/core/engine/output/fonts.mjs +0 -62
- package/template/core/engine/output/katex-assets.mjs +0 -45
- package/template/core/engine/output/page-block.mjs +0 -30
- package/template/core/engine/output/pdf-media.mjs +0 -45
- package/template/core/engine/output/public-assets.mjs +0 -19
- package/template/core/engine/output/static-server.mjs +0 -571
- package/template/core/engine/react/caption-numbering.mjs +0 -73
- package/template/core/engine/react/comment-endpoint.d.mts +0 -11
- package/template/core/engine/react/comment-endpoint.mjs +0 -102
- package/template/core/engine/react/comment-marker.mjs +0 -374
- package/template/core/engine/react/document-entry.mjs +0 -331
- package/template/core/engine/react/document-export.mjs +0 -512
- package/template/core/engine/react/http-json.mjs +0 -24
- package/template/core/engine/react/mdx-compile.mjs +0 -629
- package/template/core/engine/react/measurement-css.mjs +0 -157
- package/template/core/engine/react/object-entities.mjs +0 -204
- package/template/core/engine/react/pagination/allocator.mjs +0 -167
- package/template/core/engine/react/pagination/regions.mjs +0 -81
- package/template/core/engine/react/pagination-constants.mjs +0 -3
- package/template/core/engine/react/pagination.mjs +0 -9
- package/template/core/engine/react/pipeline/allocate.mjs +0 -217
- package/template/core/engine/react/pipeline/final-render.mjs +0 -94
- package/template/core/engine/react/pipeline/frame-measurement.mjs +0 -306
- package/template/core/engine/react/pipeline/press-tree.mjs +0 -135
- package/template/core/engine/react/press-tree-inspection.mjs +0 -172
- package/template/core/engine/react/project-asset-endpoint.d.mts +0 -10
- package/template/core/engine/react/project-asset-endpoint.mjs +0 -361
- package/template/core/engine/react/section-css.mjs +0 -56
- package/template/core/engine/react/source-edit-endpoint.d.mts +0 -10
- package/template/core/engine/react/source-edit-endpoint.mjs +0 -75
- package/template/core/engine/react/sources/heading-numbering.mjs +0 -132
- package/template/core/engine/react/sources/mdx-resolver.mjs +0 -439
- package/template/core/engine/react/style-discovery.mjs +0 -160
- package/template/core/engine/runtime/config.d.mts +0 -48
- package/template/core/engine/runtime/config.mjs +0 -172
- package/template/core/engine/runtime/file-utils.mjs +0 -114
- package/template/core/engine/runtime/file-walk.mjs +0 -22
- package/template/core/engine/runtime/inspection.mjs +0 -328
- package/template/core/engine/runtime/issue-report.mjs +0 -44
- package/template/core/engine/runtime/page-geometry.mjs +0 -131
- package/template/core/engine/runtime/path-utils.mjs +0 -20
- package/template/core/engine/runtime/source-text-tools.d.mts +0 -102
- package/template/core/engine/runtime/source-text-tools.mjs +0 -832
- package/template/core/engine/runtime/source-workspace.mjs +0 -168
- package/template/core/engine/runtime/validation.mjs +0 -183
- package/template/core/index.html +0 -13
- package/template/core/openpress.config.mjs +0 -8
- package/template/core/package.json +0 -89
- package/template/core/src/main.tsx +0 -16
- package/template/core/src/openpress/app/OpenPressApp.tsx +0 -296
- package/template/core/src/openpress/app/OpenPressRuntime.tsx +0 -102
- package/template/core/src/openpress/app/WorkspaceGalleryPage.tsx +0 -219
- package/template/core/src/openpress/app/index.ts +0 -2
- package/template/core/src/openpress/core/Frame.tsx +0 -91
- package/template/core/src/openpress/core/FrameContext.tsx +0 -26
- package/template/core/src/openpress/core/MdxArea.tsx +0 -34
- package/template/core/src/openpress/core/Press.tsx +0 -55
- package/template/core/src/openpress/core/Workspace.tsx +0 -36
- package/template/core/src/openpress/core/cn.ts +0 -4
- package/template/core/src/openpress/core/index.tsx +0 -47
- package/template/core/src/openpress/core/primitives.tsx +0 -91
- package/template/core/src/openpress/core/types.ts +0 -236
- package/template/core/src/openpress/core/useSource.ts +0 -28
- package/template/core/src/openpress/document-model/anchorMapModel.ts +0 -27
- package/template/core/src/openpress/document-model/documentIndexes.ts +0 -329
- package/template/core/src/openpress/document-model/documentTypes.ts +0 -147
- package/template/core/src/openpress/document-model/index.ts +0 -7
- package/template/core/src/openpress/document-model/objectEntityModel.ts +0 -55
- package/template/core/src/openpress/document-model/projectIdentityModel.ts +0 -15
- package/template/core/src/openpress/document-model/reactDocumentMetadataModel.ts +0 -27
- package/template/core/src/openpress/document-model/workspaceManifestModel.ts +0 -57
- package/template/core/src/openpress/manuscript/index.tsx +0 -238
- package/template/core/src/openpress/mdx/index.ts +0 -96
- package/template/core/src/openpress/numbering/index.ts +0 -294
- package/template/core/src/openpress/reader/PageThumbnailsPanel.tsx +0 -168
- package/template/core/src/openpress/reader/PublicReaderPage.tsx +0 -267
- package/template/core/src/openpress/reader/ReaderNavigationPanel.tsx +0 -123
- package/template/core/src/openpress/reader/index.ts +0 -11
- package/template/core/src/openpress/reader/pageViewportScaleModel.ts +0 -73
- package/template/core/src/openpress/reader/readerPageRegistry.ts +0 -41
- package/template/core/src/openpress/reader/readerPageRoute.ts +0 -21
- package/template/core/src/openpress/reader/readerScroll.ts +0 -92
- package/template/core/src/openpress/reader/readerStateModel.ts +0 -15
- package/template/core/src/openpress/reader/readerTypes.ts +0 -4
- package/template/core/src/openpress/reader/usePageViewportScale.ts +0 -119
- package/template/core/src/openpress/reader/usePanelState.ts +0 -56
- package/template/core/src/openpress/reader/useReaderHashSync.ts +0 -61
- package/template/core/src/openpress/reader/useReaderKeyboardNav.ts +0 -48
- package/template/core/src/openpress/reader/useReaderRuntime.ts +0 -146
- package/template/core/src/openpress/reader/useReaderScrollAnchor.ts +0 -64
- package/template/core/src/openpress/shared/Panel.tsx +0 -77
- package/template/core/src/openpress/shared/frameScheduler.ts +0 -32
- package/template/core/src/openpress/shared/index.ts +0 -4
- package/template/core/src/openpress/shared/numberUtils.ts +0 -3
- package/template/core/src/openpress/shared/runtimeMode.ts +0 -11
- package/template/core/src/openpress/workbench/Workbench.tsx +0 -506
- package/template/core/src/openpress/workbench/actions/DeploymentControl.tsx +0 -157
- package/template/core/src/openpress/workbench/actions/ExportImageControl.tsx +0 -96
- package/template/core/src/openpress/workbench/actions/PageZoomControl.tsx +0 -182
- package/template/core/src/openpress/workbench/actions/SearchControl.tsx +0 -345
- package/template/core/src/openpress/workbench/actions/deploymentStatusModel.ts +0 -112
- package/template/core/src/openpress/workbench/actions/index.ts +0 -6
- package/template/core/src/openpress/workbench/actions/useDeploymentWorkbench.ts +0 -136
- package/template/core/src/openpress/workbench/dialog/WorkbenchDialog.tsx +0 -72
- package/template/core/src/openpress/workbench/dialog/index.ts +0 -1
- package/template/core/src/openpress/workbench/document/components/DocumentPanel.tsx +0 -127
- package/template/core/src/openpress/workbench/document/components/InlineSourceEditorLayer.tsx +0 -207
- package/template/core/src/openpress/workbench/document/components/ReaderStage.tsx +0 -9
- package/template/core/src/openpress/workbench/document/hooks/useDocumentWorkbenchModel.ts +0 -34
- package/template/core/src/openpress/workbench/document/hooks/useInlineDocumentEditor.ts +0 -525
- package/template/core/src/openpress/workbench/document/index.ts +0 -10
- package/template/core/src/openpress/workbench/index.ts +0 -2
- package/template/core/src/openpress/workbench/inspector/InlineInspectorLayer.tsx +0 -459
- package/template/core/src/openpress/workbench/inspector/index.ts +0 -5
- package/template/core/src/openpress/workbench/inspector/inlineCommentModel.ts +0 -125
- package/template/core/src/openpress/workbench/inspector/inspectorGeometryModel.ts +0 -160
- package/template/core/src/openpress/workbench/inspector/inspectorModel.ts +0 -408
- package/template/core/src/openpress/workbench/inspector/useInspectorComments.ts +0 -254
- package/template/core/src/openpress/workbench/mentions/MentionSuggestionList.tsx +0 -41
- package/template/core/src/openpress/workbench/mentions/index.ts +0 -2
- package/template/core/src/openpress/workbench/mentions/useComposerMentions.ts +0 -185
- package/template/core/src/openpress/workbench/panels/Panel.tsx +0 -1
- package/template/core/src/openpress/workbench/panels/PendingCommentsPanel.tsx +0 -80
- package/template/core/src/openpress/workbench/panels/WorkbenchControlPanel.tsx +0 -29
- package/template/core/src/openpress/workbench/panels/index.ts +0 -3
- package/template/core/src/openpress/workbench/project/ProjectEntryPanel.tsx +0 -525
- package/template/core/src/openpress/workbench/project/ProjectPreviewDialog.tsx +0 -35
- package/template/core/src/openpress/workbench/project/index.ts +0 -2
- package/template/core/src/openpress/workbench/project/projectPreviewTypes.ts +0 -11
- package/template/core/src/openpress/workbench/project/projectSourceModel.ts +0 -24
- package/template/core/src/openpress/workbench/shell/WorkbenchShell.tsx +0 -167
- package/template/core/src/openpress/workbench/shell/index.ts +0 -1
- package/template/core/src/openpress/workbench/workbenchFormatters.ts +0 -120
- package/template/core/src/openpress/workbench/workbenchTypes.ts +0 -35
- package/template/core/src/styles/openpress/app-shell.css +0 -251
- package/template/core/src/styles/openpress/media-workspace.css +0 -230
- package/template/core/src/styles/openpress/print-route.css +0 -184
- package/template/core/src/styles/openpress/project-preview-panel.css +0 -924
- package/template/core/src/styles/openpress/public-viewer.css +0 -688
- package/template/core/src/styles/openpress/reader-runtime.css +0 -989
- package/template/core/src/styles/openpress/responsive.css +0 -245
- package/template/core/src/styles/openpress/workbench-panels.css +0 -707
- package/template/core/src/styles/openpress/workbench.css +0 -1255
- package/template/core/src/styles/openpress/workspace-gallery.css +0 -300
- package/template/core/src/styles/openpress.css +0 -15
- package/template/core/src/vite-env.d.ts +0 -9
- package/template/core/tsconfig.json +0 -40
- package/template/core/vite.config.ts +0 -584
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
const CSS_LENGTH_RE = /^(\d+(?:\.\d+)?)(px|mm|cm|in|pt|pc)$/i;
|
|
2
|
-
|
|
3
|
-
export const PAGE_GEOMETRY_PRESETS = {
|
|
4
|
-
a4: {
|
|
5
|
-
id: "a4",
|
|
6
|
-
label: "A4 Page",
|
|
7
|
-
width: "210mm",
|
|
8
|
-
height: "297mm",
|
|
9
|
-
},
|
|
10
|
-
"social-square": {
|
|
11
|
-
id: "social-square",
|
|
12
|
-
label: "Social Square",
|
|
13
|
-
width: "1080px",
|
|
14
|
-
height: "1080px",
|
|
15
|
-
},
|
|
16
|
-
"slide-16-9": {
|
|
17
|
-
id: "slide-16-9",
|
|
18
|
-
label: "Slide 16:9",
|
|
19
|
-
width: "1920px",
|
|
20
|
-
height: "1080px",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export function normalizePageGeometry(value) {
|
|
25
|
-
if (value == null || value === false) return null;
|
|
26
|
-
|
|
27
|
-
if (typeof value === "string") {
|
|
28
|
-
return presetPageGeometry(value);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (typeof value !== "object" || Array.isArray(value)) {
|
|
32
|
-
throw new Error("OpenPress config page must be a preset name or an object.");
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const preset = typeof value.preset === "string" ? presetPageGeometry(value.preset) : null;
|
|
36
|
-
const width = cssLengthValue(value.width, preset?.width);
|
|
37
|
-
const height = cssLengthValue(value.height, preset?.height);
|
|
38
|
-
if (!width || !height) {
|
|
39
|
-
throw new Error("OpenPress config page requires width and height when no preset is provided.");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const id = optionalId(value.id, preset?.id ?? "custom");
|
|
43
|
-
const label = optionalLabel(value.label, preset?.label ?? "Custom Page");
|
|
44
|
-
|
|
45
|
-
return pageGeometry({
|
|
46
|
-
id,
|
|
47
|
-
label,
|
|
48
|
-
width,
|
|
49
|
-
height,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function pageGeometryToTheme(page) {
|
|
54
|
-
if (!page) return undefined;
|
|
55
|
-
return {
|
|
56
|
-
pagePreset: page.id,
|
|
57
|
-
pageLabel: page.label,
|
|
58
|
-
pageWidth: page.width,
|
|
59
|
-
pageHeight: page.height,
|
|
60
|
-
pageAspectRatio: page.aspectRatio,
|
|
61
|
-
pageHeightRatio: page.heightRatio,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function presetPageGeometry(id) {
|
|
66
|
-
const preset = PAGE_GEOMETRY_PRESETS[id];
|
|
67
|
-
if (!preset) {
|
|
68
|
-
throw new Error(
|
|
69
|
-
`Unknown OpenPress page preset: "${id}". ` +
|
|
70
|
-
`Available presets: ${Object.keys(PAGE_GEOMETRY_PRESETS).join(", ")}.`,
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
return pageGeometry(preset);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function pageGeometry({ id, label, width, height }) {
|
|
77
|
-
const ratio = sameUnitRatio(width, height);
|
|
78
|
-
return {
|
|
79
|
-
id,
|
|
80
|
-
label,
|
|
81
|
-
width,
|
|
82
|
-
height,
|
|
83
|
-
aspectRatio: ratio ? `${trimNumber(ratio.width)} / ${trimNumber(ratio.height)}` : undefined,
|
|
84
|
-
heightRatio: ratio ? trimNumber(ratio.height / ratio.width) : undefined,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function cssLengthValue(value, fallback) {
|
|
89
|
-
if (value == null) return fallback ?? null;
|
|
90
|
-
if (typeof value !== "string" || !value.trim()) {
|
|
91
|
-
throw new Error("OpenPress page width/height must be CSS length strings.");
|
|
92
|
-
}
|
|
93
|
-
const trimmed = value.trim();
|
|
94
|
-
if (!CSS_LENGTH_RE.test(trimmed)) {
|
|
95
|
-
throw new Error(`OpenPress page size must be an absolute CSS length, got: ${trimmed}`);
|
|
96
|
-
}
|
|
97
|
-
return trimmed;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function optionalId(value, fallback) {
|
|
101
|
-
if (value == null) return fallback;
|
|
102
|
-
if (typeof value !== "string" || !/^[a-z0-9][a-z0-9-]*$/i.test(value)) {
|
|
103
|
-
throw new Error("OpenPress page id must be a simple slug.");
|
|
104
|
-
}
|
|
105
|
-
return value;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function optionalLabel(value, fallback) {
|
|
109
|
-
if (value == null) return fallback;
|
|
110
|
-
if (typeof value !== "string" || !value.trim()) {
|
|
111
|
-
throw new Error("OpenPress page label must be a non-empty string.");
|
|
112
|
-
}
|
|
113
|
-
return value.trim();
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function sameUnitRatio(width, height) {
|
|
117
|
-
const w = parseCssLength(width);
|
|
118
|
-
const h = parseCssLength(height);
|
|
119
|
-
if (!w || !h || w.unit.toLowerCase() !== h.unit.toLowerCase()) return null;
|
|
120
|
-
return { width: w.value, height: h.value };
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function parseCssLength(value) {
|
|
124
|
-
const match = CSS_LENGTH_RE.exec(value);
|
|
125
|
-
if (!match) return null;
|
|
126
|
-
return { value: Number(match[1]), unit: match[2] };
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function trimNumber(value) {
|
|
130
|
-
return Number(value.toFixed(6)).toString();
|
|
131
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
|
|
3
|
-
export function rootRelativePath(config, absolutePath) {
|
|
4
|
-
return path.relative(config.root, absolutePath).replaceAll("\\", "/");
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function documentRelativePath(absolutePath, documentRoot) {
|
|
8
|
-
return path.relative(documentRoot, absolutePath).split(path.sep).join("/");
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function resolveDocumentRelativePath(documentRoot, rel, label) {
|
|
12
|
-
if (typeof rel !== "string" || !rel.trim()) throw new Error(`${label} must be a non-empty document-relative path.`);
|
|
13
|
-
if (rel.includes("..")) throw new Error(`${label} contains "..", rejected.`);
|
|
14
|
-
const absolutePath = path.resolve(documentRoot, rel);
|
|
15
|
-
const relCheck = path.relative(documentRoot, absolutePath);
|
|
16
|
-
if (relCheck.startsWith("..") || path.isAbsolute(relCheck)) {
|
|
17
|
-
throw new Error(`${label} escapes the document root.`);
|
|
18
|
-
}
|
|
19
|
-
return absolutePath;
|
|
20
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import type { ResolvedConfig } from "./config.mjs";
|
|
2
|
-
|
|
3
|
-
export type SourceTextScope = "content" | "all";
|
|
4
|
-
|
|
5
|
-
export type SourceTextMatch = {
|
|
6
|
-
id: string;
|
|
7
|
-
scope: string;
|
|
8
|
-
file: string;
|
|
9
|
-
path: string;
|
|
10
|
-
line: number;
|
|
11
|
-
column: number;
|
|
12
|
-
index: number;
|
|
13
|
-
text: string;
|
|
14
|
-
preview: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export type SourceTextFileSummary = {
|
|
18
|
-
scope: string;
|
|
19
|
-
file: string;
|
|
20
|
-
path: string;
|
|
21
|
-
matchCount: number;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type SourceSearchReport = {
|
|
25
|
-
kind: "search";
|
|
26
|
-
query: string;
|
|
27
|
-
scope: SourceTextScope;
|
|
28
|
-
caseSensitive: boolean;
|
|
29
|
-
matchCount: number;
|
|
30
|
-
files: Array<SourceTextFileSummary>;
|
|
31
|
-
matches: Array<SourceTextMatch>;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type SourceBlockTextEditInput = {
|
|
35
|
-
config: ResolvedConfig;
|
|
36
|
-
path: string;
|
|
37
|
-
source: {
|
|
38
|
-
line: number;
|
|
39
|
-
column?: number;
|
|
40
|
-
endLine?: number;
|
|
41
|
-
endColumn?: number;
|
|
42
|
-
};
|
|
43
|
-
text: string;
|
|
44
|
-
kind?: string;
|
|
45
|
-
name?: string;
|
|
46
|
-
blockId?: string;
|
|
47
|
-
cellIndex?: number;
|
|
48
|
-
sourceMode?: boolean;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export type SourceBlockTextEdit = {
|
|
52
|
-
blockId?: string;
|
|
53
|
-
path: string;
|
|
54
|
-
requestedPath: string;
|
|
55
|
-
file: string;
|
|
56
|
-
line: number;
|
|
57
|
-
column: number;
|
|
58
|
-
endLine: number;
|
|
59
|
-
endColumn: number;
|
|
60
|
-
before: string;
|
|
61
|
-
after: string;
|
|
62
|
-
text: string;
|
|
63
|
-
cellIndex?: number;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export function searchSourceText(options: {
|
|
67
|
-
config: ResolvedConfig;
|
|
68
|
-
query: string;
|
|
69
|
-
scope?: SourceTextScope;
|
|
70
|
-
caseSensitive?: boolean;
|
|
71
|
-
}): Promise<SourceSearchReport>;
|
|
72
|
-
|
|
73
|
-
export function applySourceBlockTextEdit(options: SourceBlockTextEditInput): Promise<SourceBlockTextEdit>;
|
|
74
|
-
|
|
75
|
-
export function applySourceBlockTextEditToText(documentText: string, options: Omit<SourceBlockTextEditInput, "config" | "path">): {
|
|
76
|
-
text: string;
|
|
77
|
-
edit: Omit<SourceBlockTextEdit, "path" | "requestedPath" | "file">;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export function readSourceBlockText(options: Pick<SourceBlockTextEditInput, "config" | "path" | "source">): Promise<{
|
|
81
|
-
path: string;
|
|
82
|
-
requestedPath: string;
|
|
83
|
-
file: string;
|
|
84
|
-
text: string;
|
|
85
|
-
}>;
|
|
86
|
-
|
|
87
|
-
export function readSourceBlockTextFromText(documentText: string, options: Pick<SourceBlockTextEditInput, "source">): string;
|
|
88
|
-
|
|
89
|
-
export function applySourceBlockSourceEditToText(documentText: string, options: Pick<SourceBlockTextEditInput, "source" | "text" | "blockId">): {
|
|
90
|
-
text: string;
|
|
91
|
-
edit: Omit<SourceBlockTextEdit, "path" | "requestedPath" | "file">;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export function collectSourceTextFiles(config: ResolvedConfig, options?: {
|
|
95
|
-
scope?: SourceTextScope;
|
|
96
|
-
}): Promise<Array<{
|
|
97
|
-
scope: string;
|
|
98
|
-
name: string;
|
|
99
|
-
absolutePath: string;
|
|
100
|
-
relativePath: string;
|
|
101
|
-
text: string;
|
|
102
|
-
}>>;
|