@lax-wp/editor 0.4.13 → 0.4.15-beta.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.
Files changed (160) hide show
  1. package/README.md +25 -0
  2. package/dist/api/audit.d.ts +79 -0
  3. package/dist/api/derivedRulebook.d.ts +470 -0
  4. package/dist/api/documentVersions.d.ts +519 -0
  5. package/dist/api/effectiveRules.d.ts +372 -0
  6. package/dist/api/methodology.d.ts +62 -0
  7. package/dist/api/playbook.d.ts +604 -0
  8. package/dist/api/promotions.d.ts +1432 -0
  9. package/dist/api/r1.d.ts +1097 -0
  10. package/dist/api/r1.fixtures.d.ts +111 -0
  11. package/dist/api/redlineJobs.d.ts +377 -0
  12. package/dist/api/redlineStream.d.ts +2979 -0
  13. package/dist/api/redlines.d.ts +504 -0
  14. package/dist/api/regsync.d.ts +2355 -0
  15. package/dist/api/ruleAuthoring.d.ts +305 -0
  16. package/dist/api/ruleBuilder.d.ts +1009 -0
  17. package/dist/api/ruleOverrides.d.ts +31 -0
  18. package/dist/api/ruleStats.d.ts +84 -0
  19. package/dist/api/rulesCatalog.d.ts +234 -0
  20. package/dist/api/versions.d.ts +76 -0
  21. package/dist/api/workspace.d.ts +41 -0
  22. package/dist/components/EditorSidebar.d.ts +4 -1
  23. package/dist/components/audit/AuditView.d.ts +8 -0
  24. package/dist/components/capturededits/AddAsRuleModal.d.ts +8 -0
  25. package/dist/components/capturededits/CapturedEditCard.d.ts +15 -0
  26. package/dist/components/capturededits/CapturedEditsTray.d.ts +4 -0
  27. package/dist/components/capturededits/capturedEditIntent.d.ts +23 -0
  28. package/dist/components/common/EscDropdown.d.ts +2 -0
  29. package/dist/components/compliance/MethodologyPanel.d.ts +14 -0
  30. package/dist/components/compliance/RegSyncPanel.d.ts +18 -0
  31. package/dist/components/compliance/index.d.ts +8 -0
  32. package/dist/components/compliance/primitives.d.ts +41 -0
  33. package/dist/components/documents/DocumentVersionHistory.d.ts +12 -0
  34. package/dist/components/documents/documentDiff.d.ts +68 -0
  35. package/dist/components/documents/index.d.ts +4 -0
  36. package/dist/components/flowdown/FlowdownPanel.d.ts +28 -0
  37. package/dist/components/flowdown/FlowdownRowCard.d.ts +27 -0
  38. package/dist/components/flowdown/flowdownModel.d.ts +150 -0
  39. package/dist/components/history/PlaybookVersionHistory.d.ts +10 -0
  40. package/dist/components/history/versionDiff.d.ts +14 -0
  41. package/dist/components/playbook/AllPlaybooksView.d.ts +41 -0
  42. package/dist/components/playbook/DerivedRulebookView.d.ts +9 -0
  43. package/dist/components/playbook/DraftedRulePreview.d.ts +17 -0
  44. package/dist/components/playbook/EffectiveRulesView.d.ts +11 -0
  45. package/dist/components/playbook/NewRuleDrawer.d.ts +11 -0
  46. package/dist/components/playbook/PlaybookCard.d.ts +13 -0
  47. package/dist/components/playbook/PlaybookPage.d.ts +29 -0
  48. package/dist/components/playbook/PlaybookPanel.d.ts +73 -0
  49. package/dist/components/playbook/PromotionSuggestions.d.ts +1 -0
  50. package/dist/components/playbook/ReprioritizeDialog.d.ts +16 -0
  51. package/dist/components/playbook/RuleDetail.d.ts +27 -0
  52. package/dist/components/playbook/RuleEditorFields.d.ts +42 -0
  53. package/dist/components/playbook/RuleEditorModal.d.ts +27 -0
  54. package/dist/components/playbook/RulePerformancePanel.d.ts +4 -0
  55. package/dist/components/playbook/RuleRow.d.ts +26 -0
  56. package/dist/components/playbook/ThisDocumentView.d.ts +45 -0
  57. package/dist/components/playbook/ViewTabs.d.ts +8 -0
  58. package/dist/components/playbook/index.d.ts +14 -0
  59. package/dist/components/playbook/predicateSummary.d.ts +10 -0
  60. package/dist/components/playbook/primitives.d.ts +82 -0
  61. package/dist/components/playbook/useFocusTrap.d.ts +6 -0
  62. package/dist/components/playbook/usePlaybookData.d.ts +161 -0
  63. package/dist/components/playbook/usePlaybookLabel.d.ts +18 -0
  64. package/dist/components/r1/ApprovalPanel.d.ts +10 -0
  65. package/dist/components/r1/CandidateRuleCard.d.ts +8 -0
  66. package/dist/components/r1/ExecSummaryPanel.d.ts +23 -0
  67. package/dist/components/r1/PrimeUploadPanel.d.ts +8 -0
  68. package/dist/components/r1/ReviewStartControls.d.ts +24 -0
  69. package/dist/components/r1/ReviewSummaryTab.d.ts +38 -0
  70. package/dist/components/r1/index.d.ts +13 -0
  71. package/dist/components/r1/primitives.d.ts +59 -0
  72. package/dist/components/redline/AiReviewPanel.d.ts +194 -0
  73. package/dist/components/redline/RedlineHoverCard.d.ts +13 -0
  74. package/dist/components/redline/RedlineItem.d.ts +12 -0
  75. package/dist/components/redline/ReviewCard.d.ts +49 -0
  76. package/dist/components/redline/index.d.ts +6 -0
  77. package/dist/components/redline/reviewItems.d.ts +49 -0
  78. package/dist/components/redline/reviewPrefs.d.ts +18 -0
  79. package/dist/components/redline/useRunScopedCards.d.ts +16 -0
  80. package/dist/components/rulebuilder/AuthorForms.d.ts +28 -0
  81. package/dist/components/rulebuilder/CandidateQueue.d.ts +21 -0
  82. package/dist/components/rulebuilder/DraftPane.d.ts +12 -0
  83. package/dist/components/rulebuilder/RuleBuilderPanel.d.ts +6 -0
  84. package/dist/components/rulebuilder/RuleCard.d.ts +16 -0
  85. package/dist/components/rulebuilder/TestBench.d.ts +10 -0
  86. package/dist/components/rulebuilder/VocabularyPanel.d.ts +26 -0
  87. package/dist/components/rulebuilder/index.d.ts +13 -0
  88. package/dist/components/rulebuilder/primitives.d.ts +54 -0
  89. package/dist/components/rulebuilder/useRuleBuilder.d.ts +291 -0
  90. package/dist/components/sidebar/ExpandableSidebar.d.ts +2 -0
  91. package/dist/components/sidebar/WorkspaceRetentionPanel.d.ts +18 -0
  92. package/dist/components/sidebar/content/TrackChangesContent.d.ts +8 -0
  93. package/dist/components/sidebar/content/anonymization-page/PIIAnonymization.d.ts +1 -1
  94. package/dist/components/sidebar/content/anonymization-page/PiiIdleView.d.ts +12 -0
  95. package/dist/components/sidebar/content/anonymization-page/PiiRecoveryView.d.ts +16 -0
  96. package/dist/components/sidebar/content/anonymization-page/PiiSummaryView.d.ts +34 -0
  97. package/dist/components/sidebar/content/anonymization-page/PiiUnavailableView.d.ts +1 -0
  98. package/dist/components/sidebar/content/anonymization-page/RestoreConfirmDialog.d.ts +9 -0
  99. package/dist/components/sidebar/content/anonymization-page/anonymizationUtils.d.ts +38 -17
  100. package/dist/components/sidebar/content/anonymization-page/piiVault.d.ts +18 -0
  101. package/dist/components/sidebar/content/index.d.ts +0 -1
  102. package/dist/components/toolbar/AutocompletionToggle.d.ts +1 -0
  103. package/dist/components/trackChanges/TrackChangesCards.d.ts +1 -0
  104. package/dist/components/trackChanges/index.d.ts +2 -0
  105. package/dist/components/trackChanges/utils.d.ts +5 -0
  106. package/dist/config/EditorConfig.d.ts +197 -73
  107. package/dist/constants/Extensions.d.ts +12 -0
  108. package/dist/constants/playbook.d.ts +108 -0
  109. package/dist/contexts/CapturedEditsContext.d.ts +56 -0
  110. package/dist/contexts/EditorShellContext.d.ts +4 -1
  111. package/dist/editor.css +1 -1
  112. package/dist/extensions/AnonymizedText.d.ts +31 -2
  113. package/dist/extensions/VariableText.d.ts +20 -0
  114. package/dist/extensions/index.d.ts +1 -1
  115. package/dist/extensions/plugins/CapturedEditsPlugin.d.ts +90 -0
  116. package/dist/extensions/plugins/MarkHighlightPlugin.d.ts +0 -1
  117. package/dist/extensions/plugins/RedlinePlugin.d.ts +9 -0
  118. package/dist/extensions/redline/changeTypes.d.ts +70 -0
  119. package/dist/extensions/redline/constants.d.ts +25 -0
  120. package/dist/extensions/redline/engine/blockNodes.d.ts +31 -0
  121. package/dist/extensions/redline/engine/clipboard.d.ts +16 -0
  122. package/dist/extensions/redline/engine/deletion.d.ts +34 -0
  123. package/dist/extensions/redline/engine/formatSplit.d.ts +16 -0
  124. package/dist/extensions/redline/engine/insertion.d.ts +26 -0
  125. package/dist/extensions/redline/engine/predicates.d.ts +73 -0
  126. package/dist/extensions/redline/engine/textReplace.d.ts +19 -0
  127. package/dist/extensions/redline/id.d.ts +7 -0
  128. package/dist/extensions/redline/index.d.ts +36 -0
  129. package/dist/extensions/redline/plugin.d.ts +34 -0
  130. package/dist/extensions/redline/query/scan.d.ts +52 -0
  131. package/dist/extensions/redline/review/applyChange.d.ts +25 -0
  132. package/dist/extensions/redline/review/index.d.ts +1 -0
  133. package/dist/extensions/redline/review/nodeResolvers.d.ts +29 -0
  134. package/dist/extensions/redline/review/pairedNodes.d.ts +38 -0
  135. package/dist/extensions/redline/review/structuralRevert.d.ts +20 -0
  136. package/dist/extensions/redline/review/textResolver.d.ts +9 -0
  137. package/dist/extensions/redline/schema/marks.d.ts +65 -0
  138. package/dist/extensions/redline/schema/shared.d.ts +34 -0
  139. package/dist/extensions/redline/session.d.ts +71 -0
  140. package/dist/extensions/redline/types.d.ts +24 -0
  141. package/dist/extensions/trackedChanges/TrackedChanges.d.ts +64 -0
  142. package/dist/extensions/trackedChanges/constants.d.ts +34 -0
  143. package/dist/extensions/trackedChanges/engine.d.ts +32 -0
  144. package/dist/extensions/trackedChanges/index.d.ts +13 -0
  145. package/dist/extensions/trackedChanges/marks.d.ts +20 -0
  146. package/dist/extensions/trackedChanges/normalize.d.ts +2 -0
  147. package/dist/extensions/trackedChanges/plugin.d.ts +32 -0
  148. package/dist/extensions/trackedChanges/query.d.ts +3 -0
  149. package/dist/extensions/trackedChanges/review.d.ts +34 -0
  150. package/dist/extensions/trackedChanges/types.d.ts +72 -0
  151. package/dist/extensions/trackedChanges/utils.d.ts +20 -0
  152. package/dist/hooks/useMediaQuery.d.ts +2 -0
  153. package/dist/hooks/useRedlineHover.d.ts +17 -0
  154. package/dist/hooks/useRedlineReview.d.ts +83 -0
  155. package/dist/index.d.ts +46 -0
  156. package/dist/index.es.js +38491 -22189
  157. package/dist/index.umd.js +224 -125
  158. package/dist/utils/cdts.d.ts +37 -0
  159. package/dist/utils/groundingAdapter.d.ts +36 -0
  160. package/package.json +39 -33
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Workspace rule-override ("ignore rule everywhere") API module.
3
+ *
4
+ * Backend contract (internal/redlining/api/ruleoverrides.go):
5
+ * GET /v1/rule-overrides → 200 {"disabled": ["<family>", ...]}
6
+ * PUT /v1/rule-overrides/{family} → 204 (idempotent add)
7
+ * DELETE /v1/rule-overrides/{family} → 204 (idempotent remove)
8
+ *
9
+ * A family is a playbook rule id, or "grammar:<rule>" for grammar lanes
10
+ * ("grammar:lt:<ID>" for LanguageTool). Overrides are durable per workspace
11
+ * and the server unions them into every review run's disabled set — unlike
12
+ * the panel's per-document dismissal, which stays client-side and per-run.
13
+ *
14
+ * Reuses playbook.ts's request core so auth headers, the error envelope and
15
+ * zod validation follow one path (same pattern as derivedRulebook.ts).
16
+ */
17
+ import { z } from "zod";
18
+ export declare const ruleOverridesSchema: z.ZodObject<{
19
+ disabled: z.ZodArray<z.ZodString, "many">;
20
+ }, "strip", z.ZodTypeAny, {
21
+ disabled: string[];
22
+ }, {
23
+ disabled: string[];
24
+ }>;
25
+ export type RuleOverrides = z.infer<typeof ruleOverridesSchema>;
26
+ /** Lists the workspace's durably ignored rule families (sorted server-side). */
27
+ export declare const listRuleOverrides: () => Promise<string[]>;
28
+ /** Durably ignores a rule family for the whole workspace (idempotent 204). */
29
+ export declare const ignoreRule: (family: string) => Promise<void>;
30
+ /** Removes a workspace ignore so the rule fires again (idempotent 204). */
31
+ export declare const unignoreRule: (family: string) => Promise<void>;
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Rule disposition stats + reprioritize — the Rule Performance screen's wire.
3
+ *
4
+ * GET /v1/rules/stats?playbook_id=<id> {rules: [{rule_id, accepts,
5
+ * rejects, acceptance_rate, candidate}]}
6
+ * POST /v1/rules/{id}/reprioritize {severity?, action?, note}
7
+ * → 200 updated rule | 400 {"code":"invalid_reprioritize"} | 404
8
+ *
9
+ * Both routes are behind RULE_ESCALATION_ENABLED (default off): a 404 is the
10
+ * flag being off, mapped via `capabilityFromError`, never an error state.
11
+ *
12
+ * Semantics the UI must respect:
13
+ * - `acceptance_rate` is computed SERVER-side from the post-deploy pair
14
+ * accepts/(accepts+rejects_new). Never recompute a rate client-side.
15
+ * - `rejects` is the ALL-TIME total. It carries pre-deploy legacy skew and is
16
+ * display-only — never a rate denominator.
17
+ * - `candidate: null` means the warm-up gate (≥5 post-deploy dispositions) is
18
+ * not met; render neutrally, never as "healthy" or 0%.
19
+ */
20
+ import { z } from "zod";
21
+ export declare const ruleStatSchema: z.ZodObject<{
22
+ rule_id: z.ZodString;
23
+ accepts: z.ZodNumber;
24
+ rejects: z.ZodNumber;
25
+ acceptance_rate: z.ZodNumber;
26
+ candidate: z.ZodNullable<z.ZodEnum<["demote", "escalate"]>>;
27
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
28
+ rule_id: z.ZodString;
29
+ accepts: z.ZodNumber;
30
+ rejects: z.ZodNumber;
31
+ acceptance_rate: z.ZodNumber;
32
+ candidate: z.ZodNullable<z.ZodEnum<["demote", "escalate"]>>;
33
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
34
+ rule_id: z.ZodString;
35
+ accepts: z.ZodNumber;
36
+ rejects: z.ZodNumber;
37
+ acceptance_rate: z.ZodNumber;
38
+ candidate: z.ZodNullable<z.ZodEnum<["demote", "escalate"]>>;
39
+ }, z.ZodTypeAny, "passthrough">>;
40
+ export type RuleStat = z.infer<typeof ruleStatSchema>;
41
+ export declare const listRuleStats: (playbookId: string) => Promise<RuleStat[]>;
42
+ export interface ReprioritizeInput {
43
+ severity?: string;
44
+ action?: string;
45
+ note: string;
46
+ }
47
+ /** 200 body is the updated rule (contracts.PlaybookRule). */
48
+ export declare const reprioritizeRule: (ruleId: string, input: ReprioritizeInput) => Promise<z.objectOutputType<{
49
+ id: z.ZodString;
50
+ playbook_id: z.ZodString;
51
+ workspace_id: z.ZodOptional<z.ZodString>;
52
+ predicate: z.ZodOptional<z.ZodType<import("./ruleBuilder").PredicateNode, z.ZodTypeDef, import("./ruleBuilder").PredicateNode>>;
53
+ action: z.ZodOptional<z.ZodString>;
54
+ default_severity: z.ZodOptional<z.ZodString>;
55
+ category: z.ZodOptional<z.ZodString>;
56
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
57
+ semantic_intent: z.ZodOptional<z.ZodString>;
58
+ source: z.ZodOptional<z.ZodString>;
59
+ read_only: z.ZodOptional<z.ZodBoolean>;
60
+ mandatory: z.ZodOptional<z.ZodBoolean>;
61
+ authority: z.ZodOptional<z.ZodString>;
62
+ effort: z.ZodOptional<z.ZodString>;
63
+ standard_position: z.ZodOptional<z.ZodNullable<z.ZodObject<{
64
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
65
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
66
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
67
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
68
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
69
+ }, z.ZodTypeAny, "passthrough">>>>;
70
+ fallback_condition: z.ZodOptional<z.ZodNullable<z.ZodObject<{
71
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
72
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
73
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
74
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
75
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
76
+ }, z.ZodTypeAny, "passthrough">>>>;
77
+ walkaway_condition: z.ZodOptional<z.ZodNullable<z.ZodObject<{
78
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
79
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
80
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
81
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
82
+ text: z.ZodDefault<z.ZodOptional<z.ZodString>>;
83
+ }, z.ZodTypeAny, "passthrough">>>>;
84
+ }, z.ZodTypeAny, "passthrough">>;
@@ -0,0 +1,234 @@
1
+ /**
2
+ * Workspace rule catalog — `GET /v1/rules`.
3
+ *
4
+ * The backend walks every playbook the workspace can see and concatenates
5
+ * their rules (internal/playbook-engine/api/rules.go ListRules), answering
6
+ * `{"rules": [...], "count": n}`.
7
+ *
8
+ * WHY THIS EXISTS when the FE already fetches rules per playbook: the
9
+ * per-playbook path needs the playbook id up front. Reg-sync hands back
10
+ * `affected_rules` as (rule_id, playbook_id, authority) triples spread across
11
+ * an arbitrary set of playbooks, and the panel has to render a rule NAME for
12
+ * each one. Per-playbook that is N round trips whose N is dictated by the
13
+ * server's answer; here it is one. That — resolving an id set the caller did
14
+ * not choose — is the only case where this endpoint beats the per-playbook
15
+ * fetch, and it is the case it is used for.
16
+ *
17
+ * The row shape is `contracts.PlaybookRule`, identical to the per-playbook
18
+ * fetch, so this module reuses `ruleSchema`/`Rule` from ./playbook rather than
19
+ * describing the same wire shape twice.
20
+ */
21
+ import { z } from "zod";
22
+ import { type Rule } from "./playbook";
23
+ export declare const rulesCatalogSchema: z.ZodObject<{
24
+ rules: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
25
+ id: z.ZodString;
26
+ playbook_id: z.ZodString;
27
+ workspace_id: z.ZodOptional<z.ZodString>;
28
+ name: z.ZodOptional<z.ZodString>;
29
+ category: z.ZodString;
30
+ default_severity: z.ZodString;
31
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
32
+ standard_position: z.ZodOptional<z.ZodObject<{
33
+ text: z.ZodOptional<z.ZodString>;
34
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
35
+ text: z.ZodOptional<z.ZodString>;
36
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
37
+ text: z.ZodOptional<z.ZodString>;
38
+ }, z.ZodTypeAny, "passthrough">>>;
39
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
40
+ suggested_text: z.ZodOptional<z.ZodString>;
41
+ authority: z.ZodOptional<z.ZodString>;
42
+ mandatory: z.ZodOptional<z.ZodBoolean>;
43
+ read_only: z.ZodOptional<z.ZodBoolean>;
44
+ source: z.ZodOptional<z.ZodString>;
45
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
46
+ id: z.ZodString;
47
+ playbook_id: z.ZodString;
48
+ workspace_id: z.ZodOptional<z.ZodString>;
49
+ name: z.ZodOptional<z.ZodString>;
50
+ category: z.ZodString;
51
+ default_severity: z.ZodString;
52
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
53
+ standard_position: z.ZodOptional<z.ZodObject<{
54
+ text: z.ZodOptional<z.ZodString>;
55
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
56
+ text: z.ZodOptional<z.ZodString>;
57
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
58
+ text: z.ZodOptional<z.ZodString>;
59
+ }, z.ZodTypeAny, "passthrough">>>;
60
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
61
+ suggested_text: z.ZodOptional<z.ZodString>;
62
+ authority: z.ZodOptional<z.ZodString>;
63
+ mandatory: z.ZodOptional<z.ZodBoolean>;
64
+ read_only: z.ZodOptional<z.ZodBoolean>;
65
+ source: z.ZodOptional<z.ZodString>;
66
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
67
+ id: z.ZodString;
68
+ playbook_id: z.ZodString;
69
+ workspace_id: z.ZodOptional<z.ZodString>;
70
+ name: z.ZodOptional<z.ZodString>;
71
+ category: z.ZodString;
72
+ default_severity: z.ZodString;
73
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
74
+ standard_position: z.ZodOptional<z.ZodObject<{
75
+ text: z.ZodOptional<z.ZodString>;
76
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
77
+ text: z.ZodOptional<z.ZodString>;
78
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
79
+ text: z.ZodOptional<z.ZodString>;
80
+ }, z.ZodTypeAny, "passthrough">>>;
81
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
82
+ suggested_text: z.ZodOptional<z.ZodString>;
83
+ authority: z.ZodOptional<z.ZodString>;
84
+ mandatory: z.ZodOptional<z.ZodBoolean>;
85
+ read_only: z.ZodOptional<z.ZodBoolean>;
86
+ source: z.ZodOptional<z.ZodString>;
87
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
88
+ count: z.ZodOptional<z.ZodNumber>;
89
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
90
+ rules: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
91
+ id: z.ZodString;
92
+ playbook_id: z.ZodString;
93
+ workspace_id: z.ZodOptional<z.ZodString>;
94
+ name: z.ZodOptional<z.ZodString>;
95
+ category: z.ZodString;
96
+ default_severity: z.ZodString;
97
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
98
+ standard_position: z.ZodOptional<z.ZodObject<{
99
+ text: z.ZodOptional<z.ZodString>;
100
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
101
+ text: z.ZodOptional<z.ZodString>;
102
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
103
+ text: z.ZodOptional<z.ZodString>;
104
+ }, z.ZodTypeAny, "passthrough">>>;
105
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
106
+ suggested_text: z.ZodOptional<z.ZodString>;
107
+ authority: z.ZodOptional<z.ZodString>;
108
+ mandatory: z.ZodOptional<z.ZodBoolean>;
109
+ read_only: z.ZodOptional<z.ZodBoolean>;
110
+ source: z.ZodOptional<z.ZodString>;
111
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
112
+ id: z.ZodString;
113
+ playbook_id: z.ZodString;
114
+ workspace_id: z.ZodOptional<z.ZodString>;
115
+ name: z.ZodOptional<z.ZodString>;
116
+ category: z.ZodString;
117
+ default_severity: z.ZodString;
118
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
119
+ standard_position: z.ZodOptional<z.ZodObject<{
120
+ text: z.ZodOptional<z.ZodString>;
121
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
122
+ text: z.ZodOptional<z.ZodString>;
123
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
124
+ text: z.ZodOptional<z.ZodString>;
125
+ }, z.ZodTypeAny, "passthrough">>>;
126
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
127
+ suggested_text: z.ZodOptional<z.ZodString>;
128
+ authority: z.ZodOptional<z.ZodString>;
129
+ mandatory: z.ZodOptional<z.ZodBoolean>;
130
+ read_only: z.ZodOptional<z.ZodBoolean>;
131
+ source: z.ZodOptional<z.ZodString>;
132
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
133
+ id: z.ZodString;
134
+ playbook_id: z.ZodString;
135
+ workspace_id: z.ZodOptional<z.ZodString>;
136
+ name: z.ZodOptional<z.ZodString>;
137
+ category: z.ZodString;
138
+ default_severity: z.ZodString;
139
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
140
+ standard_position: z.ZodOptional<z.ZodObject<{
141
+ text: z.ZodOptional<z.ZodString>;
142
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
143
+ text: z.ZodOptional<z.ZodString>;
144
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
145
+ text: z.ZodOptional<z.ZodString>;
146
+ }, z.ZodTypeAny, "passthrough">>>;
147
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
148
+ suggested_text: z.ZodOptional<z.ZodString>;
149
+ authority: z.ZodOptional<z.ZodString>;
150
+ mandatory: z.ZodOptional<z.ZodBoolean>;
151
+ read_only: z.ZodOptional<z.ZodBoolean>;
152
+ source: z.ZodOptional<z.ZodString>;
153
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
154
+ count: z.ZodOptional<z.ZodNumber>;
155
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
156
+ rules: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
157
+ id: z.ZodString;
158
+ playbook_id: z.ZodString;
159
+ workspace_id: z.ZodOptional<z.ZodString>;
160
+ name: z.ZodOptional<z.ZodString>;
161
+ category: z.ZodString;
162
+ default_severity: z.ZodString;
163
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
164
+ standard_position: z.ZodOptional<z.ZodObject<{
165
+ text: z.ZodOptional<z.ZodString>;
166
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
167
+ text: z.ZodOptional<z.ZodString>;
168
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
169
+ text: z.ZodOptional<z.ZodString>;
170
+ }, z.ZodTypeAny, "passthrough">>>;
171
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
172
+ suggested_text: z.ZodOptional<z.ZodString>;
173
+ authority: z.ZodOptional<z.ZodString>;
174
+ mandatory: z.ZodOptional<z.ZodBoolean>;
175
+ read_only: z.ZodOptional<z.ZodBoolean>;
176
+ source: z.ZodOptional<z.ZodString>;
177
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
178
+ id: z.ZodString;
179
+ playbook_id: z.ZodString;
180
+ workspace_id: z.ZodOptional<z.ZodString>;
181
+ name: z.ZodOptional<z.ZodString>;
182
+ category: z.ZodString;
183
+ default_severity: z.ZodString;
184
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
185
+ standard_position: z.ZodOptional<z.ZodObject<{
186
+ text: z.ZodOptional<z.ZodString>;
187
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
188
+ text: z.ZodOptional<z.ZodString>;
189
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
190
+ text: z.ZodOptional<z.ZodString>;
191
+ }, z.ZodTypeAny, "passthrough">>>;
192
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
193
+ suggested_text: z.ZodOptional<z.ZodString>;
194
+ authority: z.ZodOptional<z.ZodString>;
195
+ mandatory: z.ZodOptional<z.ZodBoolean>;
196
+ read_only: z.ZodOptional<z.ZodBoolean>;
197
+ source: z.ZodOptional<z.ZodString>;
198
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
199
+ id: z.ZodString;
200
+ playbook_id: z.ZodString;
201
+ workspace_id: z.ZodOptional<z.ZodString>;
202
+ name: z.ZodOptional<z.ZodString>;
203
+ category: z.ZodString;
204
+ default_severity: z.ZodString;
205
+ verbatim_excerpt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
206
+ standard_position: z.ZodOptional<z.ZodObject<{
207
+ text: z.ZodOptional<z.ZodString>;
208
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
209
+ text: z.ZodOptional<z.ZodString>;
210
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
211
+ text: z.ZodOptional<z.ZodString>;
212
+ }, z.ZodTypeAny, "passthrough">>>;
213
+ rationale: z.ZodDefault<z.ZodOptional<z.ZodString>>;
214
+ suggested_text: z.ZodOptional<z.ZodString>;
215
+ authority: z.ZodOptional<z.ZodString>;
216
+ mandatory: z.ZodOptional<z.ZodBoolean>;
217
+ read_only: z.ZodOptional<z.ZodBoolean>;
218
+ source: z.ZodOptional<z.ZodString>;
219
+ }, z.ZodTypeAny, "passthrough">>, "many">>>;
220
+ count: z.ZodOptional<z.ZodNumber>;
221
+ }, z.ZodTypeAny, "passthrough">>;
222
+ export interface ListAllRulesOptions {
223
+ signal?: AbortSignal;
224
+ }
225
+ /**
226
+ * Every rule across every playbook visible to the configured workspace.
227
+ *
228
+ * Note the server's own failure posture: a playbook whose rule read errors is
229
+ * SKIPPED silently (`continue`), so `count` is a floor, not a guarantee. Do
230
+ * not treat a missing rule id as proof the rule does not exist.
231
+ */
232
+ export declare const listAllRules: (opts?: ListAllRulesOptions) => Promise<Rule[]>;
233
+ /** Index a rule list by id, for resolving the ids another endpoint handed us. */
234
+ export declare const indexRulesById: (rules: Rule[]) => Map<string, Rule>;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Playbook version-history API module (sprint-2 story 1).
3
+ *
4
+ * GET /v1/playbooks/{id}/versions version list
5
+ * GET /v1/playbooks/{id}/versions/{n}/rules that version's rules
6
+ *
7
+ * Response shapes verified against the playbook-engine handlers
8
+ * (internal/playbook-engine/api/versions.go / playbooks.go):
9
+ *
10
+ * versions → {"versions":[{version, effective_from?, bundle_hash?,
11
+ * source:"registry"|"bundle"|"store", active,
12
+ * changed_by?, changed_at?}]}
13
+ * rules → {"rules":[{id, ...}], "source":"cache"|"store"}
14
+ *
15
+ * Mirrors `redlines.ts`'s conventions: module-level mutable config merged
16
+ * with Vite env defaults, zod + `.passthrough()` at the boundary.
17
+ */
18
+ import { z } from "zod";
19
+ export interface VersionsApiConfig {
20
+ baseUrl?: string;
21
+ workspaceId?: string;
22
+ }
23
+ /** Configure once from the consumer (App.tsx / lax-web-portal). */
24
+ export declare const configureVersionsApi: (next: VersionsApiConfig) => void;
25
+ export declare class VersionsApiError extends Error {
26
+ readonly status?: number;
27
+ constructor(message: string, status?: number);
28
+ }
29
+ declare const versionEntrySchema: z.ZodObject<{
30
+ version: z.ZodNumber;
31
+ /** Omitted (omitzero) when the source never stamped one. */
32
+ effective_from: z.ZodOptional<z.ZodString>;
33
+ bundle_hash: z.ZodOptional<z.ZodString>;
34
+ /** "registry" (S3 version object) | "bundle" (seeded) | "store". */
35
+ source: z.ZodString;
36
+ active: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
37
+ /** Reserved — no current source records an actor, so usually absent. */
38
+ changed_by: z.ZodOptional<z.ZodString>;
39
+ changed_at: z.ZodOptional<z.ZodString>;
40
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
41
+ version: z.ZodNumber;
42
+ /** Omitted (omitzero) when the source never stamped one. */
43
+ effective_from: z.ZodOptional<z.ZodString>;
44
+ bundle_hash: z.ZodOptional<z.ZodString>;
45
+ /** "registry" (S3 version object) | "bundle" (seeded) | "store". */
46
+ source: z.ZodString;
47
+ active: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
48
+ /** Reserved — no current source records an actor, so usually absent. */
49
+ changed_by: z.ZodOptional<z.ZodString>;
50
+ changed_at: z.ZodOptional<z.ZodString>;
51
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
52
+ version: z.ZodNumber;
53
+ /** Omitted (omitzero) when the source never stamped one. */
54
+ effective_from: z.ZodOptional<z.ZodString>;
55
+ bundle_hash: z.ZodOptional<z.ZodString>;
56
+ /** "registry" (S3 version object) | "bundle" (seeded) | "store". */
57
+ source: z.ZodString;
58
+ active: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
59
+ /** Reserved — no current source records an actor, so usually absent. */
60
+ changed_by: z.ZodOptional<z.ZodString>;
61
+ changed_at: z.ZodOptional<z.ZodString>;
62
+ }, z.ZodTypeAny, "passthrough">>;
63
+ export type PlaybookVersionEntry = z.infer<typeof versionEntrySchema>;
64
+ /** Every recorded version of a playbook, sorted newest (highest) first. */
65
+ export declare const listPlaybookVersions: (playbookId: string) => Promise<PlaybookVersionEntry[]>;
66
+ declare const versionRuleSchema: z.ZodObject<{
67
+ id: z.ZodString;
68
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
69
+ id: z.ZodString;
70
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
71
+ id: z.ZodString;
72
+ }, z.ZodTypeAny, "passthrough">>;
73
+ export type VersionRule = z.infer<typeof versionRuleSchema>;
74
+ /** The rules of a playbook at version `n`. */
75
+ export declare const getVersionRules: (playbookId: string, version: number) => Promise<VersionRule[]>;
76
+ export {};
@@ -0,0 +1,41 @@
1
+ /** Why a persist attempt did not take effect. */
2
+ export type WorkspacePersistFailure =
3
+ /** 400 — the id is not `[A-Za-z0-9_.-]{1,64}`; a configuration bug. */
4
+ "invalid_id"
5
+ /** 401 — no authenticated principal reached the server. */
6
+ | "unauthorized"
7
+ /** 403 — the id exists but belongs to another account. */
8
+ | "forbidden"
9
+ /** 404 — never registered, or already swept. Nothing left to keep. */
10
+ | "not_found"
11
+ /** 500 — the server failed to record it; retrying is reasonable. */
12
+ | "internal"
13
+ /** The request never reached the server. */
14
+ | "network"
15
+ /** A status the contract does not describe. */
16
+ | "unknown";
17
+ export type WorkspacePersistResult = {
18
+ ok: true;
19
+ } | {
20
+ ok: false;
21
+ reason: WorkspacePersistFailure;
22
+ /** The server's `message`, or a fallback when there was no envelope. */
23
+ message: string;
24
+ /** Absent for `network`. */
25
+ status?: number;
26
+ };
27
+ /**
28
+ * Exempts a workspace from inactivity expiry. Idempotent — persisting an
29
+ * already-persisted workspace is another 204.
30
+ *
31
+ * TWO DIFFERENT WORKSPACES ARE IN PLAY, and keeping them separate is what
32
+ * makes this endpoint's errors mean anything. `X-Workspace-Id` — supplied by
33
+ * request()'s configured workspaceId, as in every sibling client — names the
34
+ * CALLER's workspace; the path names the TARGET. Do not "simplify" this by
35
+ * overriding the header per call: the auth middleware resolves the header
36
+ * workspace BEFORE the handler runs, and that resolver *creates* an unknown id
37
+ * on first sight and collapses malformed/foreign ids into a single
38
+ * `403 no_workspace`. Naming the target in the header therefore makes the
39
+ * handler's own 400/403/404 unreachable — measured, not theorised.
40
+ */
41
+ export declare const persistWorkspace: (workspaceId: string) => Promise<WorkspacePersistResult>;
@@ -2,6 +2,9 @@ import type { TEditorMode } from "@/constants/Toolbar";
2
2
  interface EditorSidebarProps {
3
3
  position?: 'left' | 'right';
4
4
  currentMode: TEditorMode;
5
+ /** When set, the AI review cards render in the dedicated "Redlines" tool,
6
+ * and the sidebar defaults to that tool expanded. */
7
+ aiReviewContent?: React.ReactNode;
5
8
  }
6
- export declare const EditorSidebar: ({ position, currentMode }: EditorSidebarProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const EditorSidebar: ({ position, currentMode, aiReviewContent }: EditorSidebarProps) => import("react/jsx-runtime").JSX.Element;
7
10
  export {};
@@ -0,0 +1,8 @@
1
+ import { type AuditEvent, type AuditApiConfig } from "@/api/audit";
2
+ export interface AuditViewProps {
3
+ /** API endpoint config (base URL / workspace). */
4
+ api?: AuditApiConfig;
5
+ }
6
+ /** The most specific id the event is about. */
7
+ export declare const subjectId: (e: AuditEvent) => string;
8
+ export declare const AuditView: ({ api }: AuditViewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { CapturedEdit } from "@/contexts/CapturedEditsContext";
2
+ export interface AddAsRuleModalProps {
3
+ edit: CapturedEdit;
4
+ onClose: () => void;
5
+ /** Called with the persisted rule id; the caller flips the card to resolved. */
6
+ onAdded: (ruleId: string) => void;
7
+ }
8
+ export declare const AddAsRuleModal: (props: AddAsRuleModalProps) => import("react").ReactPortal;
@@ -0,0 +1,15 @@
1
+ import type { CapturedEdit } from "@/contexts/CapturedEditsContext";
2
+ export declare const DiffBox: ({ before, after, clampLines, }: {
3
+ before: string;
4
+ after: string;
5
+ /** 6 on tray cards, 3 in the modal's compact context block. */
6
+ clampLines: 3 | 6;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export interface CapturedEditCardProps {
9
+ edit: CapturedEdit;
10
+ /** Non-null = rule drafting unavailable; the reason disables Add-as-rule. */
11
+ addDisabledReason: string | null;
12
+ onDismiss: () => void;
13
+ onAddAsRule: () => void;
14
+ }
15
+ export declare const CapturedEditCard: (props: CapturedEditCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export interface CapturedEditsTrayProps {
2
+ onClose?: () => void;
3
+ }
4
+ export declare const CapturedEditsTray: (props: CapturedEditsTrayProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The FROZEN captured-edit → from-text intent template (WS-B handoff).
3
+ *
4
+ * The backend's from-text prompt scaffold is proven against EXACTLY this
5
+ * template (mirrored test-side in `capturedEditIntent()`,
6
+ * `rules_author_capturededit_test.go`). Do not reword it — the FE test pins
7
+ * it byte-exact.
8
+ *
9
+ * Slot rules:
10
+ * - clause_context: clause heading / type + section ref if known.
11
+ * - before_text: clause text at doc-open (the card's "before"), trimmed to
12
+ * the edited clause.
13
+ * - after_text: coalesced current clause text after the human edit.
14
+ * - before/after are truncated to MAX_SLOT_CHARS with a trailing ellipsis so
15
+ * the intent stays within a few KB.
16
+ */
17
+ export declare const MAX_SLOT_CHARS = 1500;
18
+ export interface CapturedEditIntentInput {
19
+ clauseLabel: string;
20
+ before: string;
21
+ after: string;
22
+ }
23
+ export declare const capturedEditIntentText: (input: CapturedEditIntentInput) => string;
@@ -0,0 +1,2 @@
1
+ import type { DropdownProps } from "antd";
2
+ export declare const Dropdown: ({ open: controlledOpen, onOpenChange, ...rest }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { type MethodologyApiConfig } from "@/api/methodology";
2
+ export interface MethodologyPanelProps {
3
+ /**
4
+ * Pre-seed the filter — typically the category or severity of the finding
5
+ * the reviewer opened help from.
6
+ */
7
+ focusTerm?: string;
8
+ /** Fetch immediately rather than on the first expand. */
9
+ openByDefault?: boolean;
10
+ /** Auth/baseUrl pass-through for src/api/methodology.ts (the PlaybookPanel idiom). */
11
+ api?: MethodologyApiConfig;
12
+ }
13
+ export declare const MethodologyPanel: ({ focusTerm, openByDefault, api, }: MethodologyPanelProps) => import("react/jsx-runtime").JSX.Element;
14
+ export default MethodologyPanel;
@@ -0,0 +1,18 @@
1
+ import { type PlaybookApiConfig } from "@/api/playbook";
2
+ export interface RegSyncPanelProps {
3
+ /**
4
+ * Navigate to a rule (the playbook panel's rule detail). Omitted → the rule
5
+ * rows render as static text rather than fake links.
6
+ */
7
+ onOpenRule?: (ruleId: string, playbookId: string) => void;
8
+ /** Run the check on mount instead of waiting for the button. */
9
+ autoCheck?: boolean;
10
+ /**
11
+ * Auth/baseUrl pass-through (the PlaybookPanel idiom). Both API modules this
12
+ * panel calls — regsync and the rule catalog — ride src/api/playbook.ts's
13
+ * shared fetch core, so one PlaybookApiConfig configures them both.
14
+ */
15
+ api?: PlaybookApiConfig;
16
+ }
17
+ export declare const RegSyncPanel: ({ onOpenRule, autoCheck, api }: RegSyncPanelProps) => import("react/jsx-runtime").JSX.Element;
18
+ export default RegSyncPanel;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Compliance surfaces: the FAR/DFARS regulation-change alert and the
3
+ * "why was this flagged?" methodology reference.
4
+ */
5
+ export { RegSyncPanel } from "./RegSyncPanel";
6
+ export type { RegSyncPanelProps } from "./RegSyncPanel";
7
+ export { MethodologyPanel } from "./MethodologyPanel";
8
+ export type { MethodologyPanelProps } from "./MethodologyPanel";
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Shared presentational pieces for the compliance surfaces (reg-sync,
3
+ * methodology). Token-only styling per the lax design system — no hardcoded
4
+ * hex, both themes handled by the tokens themselves.
5
+ *
6
+ * Deliberately a local copy rather than an import from components/r1 or
7
+ * components/playbook: those primitives belong to their own screens and are
8
+ * moving under other workstreams. The overlap is ~40 lines of CSS.
9
+ */
10
+ import type { ReactNode } from "react";
11
+ export declare const COMPLIANCE_CSS = "\n.cmp-root{box-sizing:border-box;font-family:var(--font-ui);color:var(--pb-text-primary)}\n.cmp-root *{box-sizing:border-box}\n.cmp-btn{font-family:var(--font-ui);border-radius:var(--radius-control);cursor:pointer;font-weight:600;font-size:12px;padding:6px 13px;transition:background .15s ease, border-color .15s ease}\n.cmp-btn:disabled{opacity:.55;cursor:default}\n.cmp-primary{background:var(--action);color:var(--action-on);border:none}\n.cmp-primary:hover:not(:disabled){background:var(--action-hover)}\n.cmp-secondary{background:var(--pb-panel);color:var(--pb-text-secondary);border:1px solid var(--pb-border-strong)}\n.cmp-secondary:hover:not(:disabled){background:var(--pb-card)}\n.cmp-link{background:none;border:none;padding:0;cursor:pointer;font-family:var(--font-ui);font-size:12px;color:var(--action-link);font-weight:600;text-align:left}\n.cmp-link:hover{text-decoration:underline}\n.cmp-card{background:var(--pb-panel);border:1px solid var(--pb-border-strong);border-radius:var(--radius-control)}\n.cmp-input{width:100%;font-family:var(--font-ui);font-size:12.5px;color:var(--pb-text-body);background:var(--pb-panel);border:1px solid var(--pb-border-strong);border-radius:var(--radius-control);padding:7px 10px}\n.cmp-input:focus{outline:none;border-color:var(--action);box-shadow:0 0 0 2px var(--action-tint)}\n.cmp-scroll{scrollbar-width:thin;overflow-y:auto}\n.cmp-body{font-family:var(--font-document);font-size:12.5px;line-height:1.55;color:var(--pb-text-body);white-space:pre-wrap;word-break:break-word}\n";
12
+ /** Panel section heading — 14px/600, the design system's `--text-label`. */
13
+ export declare const SectionLabel: ({ children }: {
14
+ children: ReactNode;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ /** Muted explanatory line under a heading. */
17
+ export declare const Caption: ({ children }: {
18
+ children: ReactNode;
19
+ }) => import("react/jsx-runtime").JSX.Element;
20
+ /** Failure strip. `tone="warning"` for a degraded-but-usable state. */
21
+ export declare const NoticeStrip: ({ message, tone, action, }: {
22
+ message: ReactNode;
23
+ tone?: "error" | "warning" | "info";
24
+ action?: ReactNode;
25
+ }) => import("react/jsx-runtime").JSX.Element;
26
+ /** Monospace clause / rule identifier chip. */
27
+ export declare const RefChip: ({ children, title }: {
28
+ children: ReactNode;
29
+ title?: string;
30
+ }) => import("react/jsx-runtime").JSX.Element;
31
+ /**
32
+ * Severity chip on the 3-tier ramp (REQ-R1). Reg-sync maps change kinds onto
33
+ * the ramp by what the change costs a reviewer who relies on the clause:
34
+ * removed → T1 a rule cites a clause that no longer exists
35
+ * revised → T2 the rule's premise moved; re-read it
36
+ * added → T3 new clause in the family; nothing is wrong yet
37
+ */
38
+ export declare const TierChip: ({ tier, label }: {
39
+ tier: 1 | 2 | 3;
40
+ label: string;
41
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type DocumentVersionsApiConfig } from "@/api/documentVersions";
2
+ export interface DocumentVersionHistoryProps {
3
+ /** The git-store document whose history to show. */
4
+ docId: string;
5
+ /** Display name for the header (falls back to the id). */
6
+ documentName?: string;
7
+ /** API endpoint config (base URL / workspace). */
8
+ api?: DocumentVersionsApiConfig;
9
+ /** Called after a successful rollback, with the new head commit id. */
10
+ onRestored?: (newCommitId: string) => void;
11
+ }
12
+ export declare const DocumentVersionHistory: ({ docId, documentName, api, onRestored, }: DocumentVersionHistoryProps) => import("react/jsx-runtime").JSX.Element;