@patterkit/ops 0.20.1 → 0.21.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/dist/index.d.ts CHANGED
@@ -752,6 +752,8 @@ interface SceneReport {
752
752
  voiced: VoicedCounts;
753
753
  /** Actual WRITTEN counts. Empty for an estimated scene. */
754
754
  written: WrittenCounts;
755
+ /** Actual ACTION counts: the scene's text beats when they're action, beside `written`, never in it. */
756
+ action: WrittenCounts;
755
757
  /** The scene's estimate in written lines, when `estimated`. */
756
758
  estimate?: number;
757
759
  /** Written / voiced lines DONE and REMAINING. For an estimated scene: 0 done, the estimate remaining. */
@@ -780,6 +782,7 @@ interface LocaleReport {
780
782
  interface ReportTotals {
781
783
  voiced: VoicedCounts;
782
784
  written: WrittenCounts;
785
+ action: WrittenCounts;
783
786
  choices: number;
784
787
  writtenDone: number;
785
788
  writtenRemaining: number;
@@ -866,7 +869,41 @@ interface ApplyStats {
866
869
  updated: number;
867
870
  /** Loc shard files touched. */
868
871
  files: number;
872
+ /** Translations dropped because their beat is now action text. */
873
+ dropped: number;
869
874
  }
875
+ /** A text beat whose place in the loc files has changed since loc import last wrote them: `dropped` (its scene's
876
+ * text is now action, so its translation goes at the next import) or `added` (no longer action, so it's sent
877
+ * for translation from the next export). */
878
+ interface ActionTextChange {
879
+ id: string;
880
+ scene: string;
881
+ locale: string;
882
+ change: "dropped" | "added";
883
+ }
884
+ /**
885
+ * What a loc export tells a person beside the file, for the CLI and Patterpad alike: first, how many text lines it
886
+ * left out because they're action, and the setting that does it, so nobody wonders where they went; then what has
887
+ * dropped out of the loc files or come into them since loc import last wrote them (`actionTextChanges`), a heading
888
+ * per locale and kind of change with each beat's id and scene name indented under it. Empty when the export left
889
+ * nothing out and nothing has changed.
890
+ */
891
+ declare function describeLocExport(loaded: LoadedProject, opts?: {
892
+ locale?: string;
893
+ }): string[];
894
+ /** A scene's text beats, its option prompts left out (a prompt is always localised), in authored order. */
895
+ declare function sceneTextIds(scene: Scene): string[];
896
+ /** Each scene's action text ids (`textIsAction`), by scene id. A scene without action text isn't listed. */
897
+ declare function actionTextIds(loaded: Pick<LoadedProject, "project" | "scenes">): Map<string, Set<string>>;
898
+ /**
899
+ * The text that has dropped out of the loc files, or come into them, since loc import last wrote them, for each
900
+ * translated locale (or the one given). Dropped: a scene's text is now action, and its shard still holds a
901
+ * translation of it. Added: the shard says its scene's text was action (`textAction`) and it no longer is, so
902
+ * each of its text beats with source text is new to the translators. In scene, then authored, order.
903
+ */
904
+ declare function actionTextChanges(loaded: LoadedProject, opts?: {
905
+ locale?: string;
906
+ }): ActionTextChange[];
870
907
  /**
871
908
  * The source text of every project-level string the project defines, by id: each cast display name
872
909
  * (`cast:<NAME>`), each qualifier's name (`qualifier:<gameId>`), the speaker pattern (`speaker:pattern`), and
@@ -1002,7 +1039,7 @@ type ScriptElement = {
1002
1039
  direction?: string;
1003
1040
  runs: TextRun[];
1004
1041
  }
1005
- /** Prose narration / on-screen text (speaker-less), upright in a soft ink, flush left. `id` is the beat. */
1042
+ /** Text (speaker-less prose: on-screen text or action; the kind keeps its old name), upright in a soft ink, flush left. `id` is the beat. */
1006
1043
  | {
1007
1044
  kind: "narration";
1008
1045
  id: string;
@@ -1261,7 +1298,7 @@ interface ResolveEntry {
1261
1298
  declare function runResolve(loaded: LoadedProject, query: string): ResolveEntry[];
1262
1299
  /**
1263
1300
  * The editor's MAIN search (spec §6): content-oriented, the everyday "go to a thing" path. Matches a
1264
- * query against **Game IDs, scene / block titles, and dialogue / narration / choice text**, with the
1301
+ * query against **Game IDs, scene / block titles, and dialogue / text / choice text**, with the
1265
1302
  * "Go to ID" power-search folded in: paste an opaque id and the node it names is found. Ranking: title /
1266
1303
  * Game-ID, then dialogue / text content, then raw id.
1267
1304
  */
@@ -1938,4 +1975,4 @@ declare const REFUSE_MISSING_SHARE = 0.25;
1938
1975
  /** Plan an import. Reads the handoff record named in the document from the project. */
1939
1976
  declare function planEditableImport(loaded: LoadedProject, returned: ReturnedDoc, opts: ImportOptions): ImportPlan;
1940
1977
 
1941
- export { AUDIO_MANIFEST_FILE, AUDIO_MANIFEST_SCHEMA, AUTHORING_HANDLED, type ApplyStats, type AudioEntry, type AudioRung, type AudioSnapshot, type BuildPlan, type BundlePosture, CONFLICT_SIDECAR, type CastKeyRewrite, type CharacterReport, type Conflict, type ConflictKind, type ContentError, type CoverageAsyncHooks, type CoverageBeat, type CoverageHooks, type CoverageOptions, type CoverageOrder, type CoverageReport, type DecisionPlan, type DecisionResult, type DocumentManifest, type EditableScript, type EditableScriptOptions, type ExportOptions, type ExtensionUpgrade, type FormatResult, GAME_SCOPES_OWNER, type GameDataStageRenameResult, type GameScopes, type GameScopesIssue, HANDOFF_DIR, type HandoffIssue, type HygieneIssue, type ImportOptions, type ImportPlan, type ImportProblem, type ImportReport, type InitOptions, type InitResult, type InitVcs, type LoadedManifest, type LoadedProject, type LocCatalog, type LocEntry, type LocaleReport, type MergeFileType, type MergeResult, type MergedShard, NotAPackError, type OpenSuggestion, PATTER_SCOPES_FILE, PATTER_SCOPES_OWNER, PROJECT_HANDLED, type PinPlan, type PinnedName, type PlannedWrite, type PlayEvent, type PlayOptions, type PlayOutcome, type PlayResult, type ProvenanceCheck, RARE_REACH_PCT, REFUSE_MISSING_SHARE, type Random, type ReadBox, type ReadComment, type ReadItem, type ReadMarker, type ReadParagraph, type ReadText, type ReplaceHit, type ReplaceOptions, type ReplacePlan, type ReportData, type ReportTotals, type ResolveEntry, type ReturnedDoc, SCRIPT_FONT_FILES, SCRIPT_FONT_PACKAGES, SHARD_EXTENSIONS, type SceneReport, type ScriptDoc, type ScriptElement, type ScriptFace, type SearchFocus, type ShardText, type StageRenameResult, type StageTarget, type SuggestionDecision, type TrackedChange, type UnpackMergeResult, type UnpackResult, UnsafeEntryError, UnsupportedMergeError, type ValidateResult, type VoiceLine, type VoiceScript, type VoicedCounts, type WebExport, type WrittenCounts, applyLoc, applySceneOrder, applySuggestionDecisions, applyWrites, audioFolderRungs, audioFoldersActive, audioManifest, audioManifestWrite, authoringPath, besideBundlePath, bundleOutputPath, catalogToJson, catalogToPo, catalogToXlsx, classesForChannel, cleanCastRenames, compileLoaded, cueLabel, currentBundlePosture, defaultBundlePath, defaultGameScopesDir, detectMergeType, discoverGameScopes, drivableScopes, exportBlockers, exportEditableScript, extractLoc, findProjectFile, formatMarker, gameScopeTokens, gameScopesCatalogue, gameScopesSnapshot, handoffPath, handoffWrite, hostScopeTokens, issueMarkerCodes, jsonToCatalog, leastReachedFirst, listOpenSuggestions, listProjectTags, loadProject, loadProjectLanding, loadedExtensions, manifestPath, markerLength, moveCastKeys, newHandoffId, parseHandoff, patterScopesFile, patterScopesStale, patterScopesWrite, pickAudio, planBuild, planEditableImport, planExtensionUpgrades, planPins, planReturnedWorld, planShareScopes, planWorldSave, poToCatalog, previewRegistry, projectManifests, projectStringSources, proposeCoverageDrivers, qualifierNamer, reachabilityIssues, readEditableDocx, readGameScopes, readHandoff, readHandoffs, readMarker, readProjectManifest, renameCastInScene, renameCastKeys, renameCastStrings, renameGameDataStage, renameStage, renderCoverageText, renderPlay, renderReportText, resolveDocumentation, resolveStart, runCoverage, runCoverageAsync, runExport, runExportFull, runExportHtml, runExportWeb, runFormat, runInit, runMerge, runPack, runPlay, runPropertyUsage, runReplace, runReport, runReportXlsx, runResolve, runScriptDoc, runSearch, runStatusBrowse, runTagBrowse, runUnpack, runUnpackMerge, runValidate, runVoiceScript, scanAudio, scanAudioStatus, sceneIdForShard, scriptFontLicencePath, scriptFontLicences, scriptToDocx, scriptToPdf, serialiseHandoff, setCut, sidecarIssues, soundManifest, stageDialect, stageGateCount, staleParts, unresolvedMarkIssues, useScriptFontFiles, vcsConfigWrites, voiceScriptToXlsx, worldSettingsScopes, xlsxToCatalog };
1978
+ export { AUDIO_MANIFEST_FILE, AUDIO_MANIFEST_SCHEMA, AUTHORING_HANDLED, type ActionTextChange, type ApplyStats, type AudioEntry, type AudioRung, type AudioSnapshot, type BuildPlan, type BundlePosture, CONFLICT_SIDECAR, type CastKeyRewrite, type CharacterReport, type Conflict, type ConflictKind, type ContentError, type CoverageAsyncHooks, type CoverageBeat, type CoverageHooks, type CoverageOptions, type CoverageOrder, type CoverageReport, type DecisionPlan, type DecisionResult, type DocumentManifest, type EditableScript, type EditableScriptOptions, type ExportOptions, type ExtensionUpgrade, type FormatResult, GAME_SCOPES_OWNER, type GameDataStageRenameResult, type GameScopes, type GameScopesIssue, HANDOFF_DIR, type HandoffIssue, type HygieneIssue, type ImportOptions, type ImportPlan, type ImportProblem, type ImportReport, type InitOptions, type InitResult, type InitVcs, type LoadedManifest, type LoadedProject, type LocCatalog, type LocEntry, type LocaleReport, type MergeFileType, type MergeResult, type MergedShard, NotAPackError, type OpenSuggestion, PATTER_SCOPES_FILE, PATTER_SCOPES_OWNER, PROJECT_HANDLED, type PinPlan, type PinnedName, type PlannedWrite, type PlayEvent, type PlayOptions, type PlayOutcome, type PlayResult, type ProvenanceCheck, RARE_REACH_PCT, REFUSE_MISSING_SHARE, type Random, type ReadBox, type ReadComment, type ReadItem, type ReadMarker, type ReadParagraph, type ReadText, type ReplaceHit, type ReplaceOptions, type ReplacePlan, type ReportData, type ReportTotals, type ResolveEntry, type ReturnedDoc, SCRIPT_FONT_FILES, SCRIPT_FONT_PACKAGES, SHARD_EXTENSIONS, type SceneReport, type ScriptDoc, type ScriptElement, type ScriptFace, type SearchFocus, type ShardText, type StageRenameResult, type StageTarget, type SuggestionDecision, type TrackedChange, type UnpackMergeResult, type UnpackResult, UnsafeEntryError, UnsupportedMergeError, type ValidateResult, type VoiceLine, type VoiceScript, type VoicedCounts, type WebExport, type WrittenCounts, actionTextChanges, actionTextIds, applyLoc, applySceneOrder, applySuggestionDecisions, applyWrites, audioFolderRungs, audioFoldersActive, audioManifest, audioManifestWrite, authoringPath, besideBundlePath, bundleOutputPath, catalogToJson, catalogToPo, catalogToXlsx, classesForChannel, cleanCastRenames, compileLoaded, cueLabel, currentBundlePosture, defaultBundlePath, defaultGameScopesDir, describeLocExport, detectMergeType, discoverGameScopes, drivableScopes, exportBlockers, exportEditableScript, extractLoc, findProjectFile, formatMarker, gameScopeTokens, gameScopesCatalogue, gameScopesSnapshot, handoffPath, handoffWrite, hostScopeTokens, issueMarkerCodes, jsonToCatalog, leastReachedFirst, listOpenSuggestions, listProjectTags, loadProject, loadProjectLanding, loadedExtensions, manifestPath, markerLength, moveCastKeys, newHandoffId, parseHandoff, patterScopesFile, patterScopesStale, patterScopesWrite, pickAudio, planBuild, planEditableImport, planExtensionUpgrades, planPins, planReturnedWorld, planShareScopes, planWorldSave, poToCatalog, previewRegistry, projectManifests, projectStringSources, proposeCoverageDrivers, qualifierNamer, reachabilityIssues, readEditableDocx, readGameScopes, readHandoff, readHandoffs, readMarker, readProjectManifest, renameCastInScene, renameCastKeys, renameCastStrings, renameGameDataStage, renameStage, renderCoverageText, renderPlay, renderReportText, resolveDocumentation, resolveStart, runCoverage, runCoverageAsync, runExport, runExportFull, runExportHtml, runExportWeb, runFormat, runInit, runMerge, runPack, runPlay, runPropertyUsage, runReplace, runReport, runReportXlsx, runResolve, runScriptDoc, runSearch, runStatusBrowse, runTagBrowse, runUnpack, runUnpackMerge, runValidate, runVoiceScript, scanAudio, scanAudioStatus, sceneIdForShard, sceneTextIds, scriptFontLicencePath, scriptFontLicences, scriptToDocx, scriptToPdf, serialiseHandoff, setCut, sidecarIssues, soundManifest, stageDialect, stageGateCount, staleParts, unresolvedMarkIssues, useScriptFontFiles, vcsConfigWrites, voiceScriptToXlsx, worldSettingsScopes, xlsxToCatalog };