@case-framework/survey-ui 0.2.3 → 0.3.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 CHANGED
@@ -1,73 +1,40 @@
1
- # React + TypeScript + Vite
1
+ # @case-framework/survey-ui
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ React UI components for CASE surveys, including the `SurveyEditor`.
4
4
 
5
- Currently, two official plugins are available:
5
+ ## SurveyEditor styling in a host project
6
6
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
7
+ Import the package stylesheet once in your app entry point:
9
8
 
10
- ## React Compiler
9
+ ```tsx
10
+ import "@case-framework/survey-ui/css";
11
+ ```
11
12
 
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
+ If you only want the editor's default variable values as a tiny standalone asset, import:
13
14
 
14
- ## Expanding the ESLint configuration
15
+ ```tsx
16
+ import "@case-framework/survey-ui/editor-defaults.css";
17
+ ```
15
18
 
16
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
19
+ `@case-framework/survey-ui/css` already includes these defaults, so the standalone file is only needed when the host wants a separate variables-only layer.
17
20
 
18
- ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
23
- extends: [
24
- // Other configs...
21
+ If the host app uses Tailwind CSS v4, add the package as a source in the host global CSS file so Tailwind also scans the editor package:
25
22
 
26
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
28
- // Alternatively, use this for stricter rules
29
- tseslint.configs.strictTypeChecked,
30
- // Optionally, add this for stylistic rules
31
- tseslint.configs.stylisticTypeChecked,
23
+ ```css
24
+ @import "tailwindcss";
25
+ @source "../node_modules/@case-framework/survey-ui/dist";
26
+ ```
32
27
 
33
- // Other configs...
34
- ],
35
- languageOptions: {
36
- parserOptions: {
37
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
- tsconfigRootDir: import.meta.dirname,
39
- },
40
- // other options...
41
- },
42
- },
43
- ])
28
+ Override the editor-specific CSS variables on the `.survey-editor` scope in the host stylesheet:
29
+
30
+ ```css
31
+ .survey-editor {
32
+ --surface-bg-color: oklch(1 0 0);
33
+ }
44
34
  ```
45
35
 
46
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
36
+ Available editor-scoped variables:
47
37
 
48
- ```js
49
- // eslint.config.js
50
- import reactX from 'eslint-plugin-react-x'
51
- import reactDom from 'eslint-plugin-react-dom'
38
+ - `--surface-bg-color`
52
39
 
53
- export default defineConfig([
54
- globalIgnores(['dist']),
55
- {
56
- files: ['**/*.{ts,tsx}'],
57
- extends: [
58
- // Other configs...
59
- // Enable lint rules for React
60
- reactX.configs['recommended-typescript'],
61
- // Enable lint rules for React DOM
62
- reactDom.configs.recommended,
63
- ],
64
- languageOptions: {
65
- parserOptions: {
66
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
- tsconfigRootDir: import.meta.dirname,
68
- },
69
- // other options...
70
- },
71
- },
72
- ])
73
- ```
40
+ The editor also uses the shared UI theme tokens from the package stylesheet, so you can override variables such as `--background`, `--foreground`, `--card`, `--primary`, `--muted`, `--accent`, `--border`, `--input`, and `--ring` if you want the rest of the editor chrome to match your host theme.
package/dist/index.d.ts CHANGED
@@ -1,478 +1 @@
1
- import { Accept } from 'react-dropzone';
2
- import { BuildSurveyAIContextPackOptions } from '@case-framework/survey-core/editor';
3
- import { ClassProp } from 'class-variance-authority/types';
4
- import { default as default_2 } from 'react';
5
- import { FileRejection } from 'react-dropzone';
6
- import { FileWithPath } from 'react-dropzone';
7
- import { ItemCoreConstructor } from '@case-framework/survey-core';
8
- import { ItemTypeRegistry } from '@case-framework/survey-core';
9
- import { JSX } from 'react/jsx-runtime';
10
- import { RawSurveyItem } from '@case-framework/survey-core';
11
- import { RenderedSurveyItem } from '@case-framework/survey-core';
12
- import { SerializedSurveyEditor } from '@case-framework/survey-core/editor';
13
- import { Survey } from '@case-framework/survey-core';
14
- import { SurveyAIContextIndexes } from '@case-framework/survey-core/editor';
15
- import { SurveyAIContextPack } from '@case-framework/survey-core/editor';
16
- import { SurveyAIContextPurpose } from '@case-framework/survey-core/editor';
17
- import { SurveyAIContextScope } from '@case-framework/survey-core/editor';
18
- import { SurveyAIFocus } from '@case-framework/survey-core/editor';
19
- import { SurveyAIItemContextNode } from '@case-framework/survey-core/editor';
20
- import { SurveyAIKeyIndexEntry } from '@case-framework/survey-core/editor';
21
- import { SurveyAIOutlineNode } from '@case-framework/survey-core/editor';
22
- import { SurveyAITranslationSnippet } from '@case-framework/survey-core/editor';
23
- import { SurveyItemCore } from '@case-framework/survey-core';
24
- import { SurveyItemTranslations } from '@case-framework/survey-core';
25
- import { Target } from '@case-framework/survey-core/editor';
26
- import { VariantProps } from 'class-variance-authority';
27
-
28
- export declare interface AISuggestedText {
29
- text: string;
30
- }
31
-
32
- export declare interface BuildSurveyAIContextOptions {
33
- purpose?: SurveyAIContextPurpose;
34
- scope?: SurveyAIContextScope;
35
- focusItemId?: string;
36
- includeRawSurvey?: boolean;
37
- outlineLimit?: number;
38
- includeIndexes?: boolean;
39
- includeFocusItemTree?: boolean;
40
- focusItemTreeLimit?: number;
41
- translationSnippetsPerItemLimit?: number;
42
- translationSnippetTextLimit?: number;
43
- }
44
-
45
- export { BuildSurveyAIContextPackOptions }
46
-
47
- export declare function buildSurveyFileName(state: SerializedSurveyEditor, fallback?: string): string;
48
-
49
- export declare function cloneRegistryEntries(entries: readonly ItemRegistryEntry[]): ItemRegistryEntry[];
50
-
51
- export declare interface ComposedEditorItemRegistry {
52
- coreRegistry: ItemTypeRegistry;
53
- definitions: EditorItemDefinitionRegistry;
54
- }
55
-
56
- export declare function createBlankEditorState(pluginRegistry?: ItemTypeRegistry, surveyKey?: string): SerializedSurveyEditor;
57
-
58
- export declare function createComposedEditorRegistry(options?: CreateComposedEditorRegistryOptions): ComposedEditorItemRegistry;
59
-
60
- export declare type CreateComposedEditorRegistryOptions = CreateRegistryEntriesOptions & EntriesToComposedEditorRegistryOptions;
61
-
62
- export declare function createEditorStateFromRawSurvey(rawSurvey: Parameters<typeof Survey.fromJson>[0], pluginRegistry?: ItemTypeRegistry): SerializedSurveyEditor;
63
-
64
- declare interface CreateItemContext {
65
- editor: {
66
- addItem: (target: Target, item: SurveyItemCore, content?: SurveyItemTranslations) => void;
67
- };
68
- targetParentId: string;
69
- constructor: ItemCoreConstructor;
70
- }
71
-
72
- export declare function createRegistryEntries(options?: CreateRegistryEntriesOptions): ItemRegistryEntry[];
73
-
74
- export declare interface CreateRegistryEntriesOptions {
75
- /** Include default built-in entries first. Defaults to true. */
76
- includeDefaultEntries?: boolean;
77
- /** Custom entries to add/override. */
78
- entries?: ItemRegistryEntry[];
79
- /** How to handle duplicate itemType values. Defaults to override. */
80
- conflictStrategy?: RegistryConflictStrategy;
81
- }
82
-
83
- export declare function createSurveyPlayerRegistry(options?: CreateSurveyPlayerRegistryOptions): SurveyPlayerItemRegistry;
84
-
85
- export declare type CreateSurveyPlayerRegistryOptions = CreateRegistryEntriesOptions & EntriesToParticipantRegistryOptions;
86
-
87
- export declare interface EditorItemDefinition {
88
- itemType: string;
89
- infos: ItemInfos;
90
- editorComponent?: default_2.ComponentType<ItemEditorComponentProps>;
91
- renderComponent?: default_2.ComponentType<ItemRendererComponentProps>;
92
- previewComponent?: default_2.ComponentType<ItemPreviewComponentProps>;
93
- capabilities?: ItemEditorCapabilities;
94
- isRootOnly?: boolean;
95
- getInitialItem?: () => ItemInitialData;
96
- createItem?: (ctx: CreateItemContext) => string;
97
- searchAdapters?: ItemSearchAdapter[];
98
- includeDefaultSearchAdapter?: boolean;
99
- }
100
-
101
- export declare type EditorItemDefinitionRegistry = Record<string, EditorItemDefinition>;
102
-
103
- declare interface EditorItemSearchResult {
104
- matchType: SearchMatchType;
105
- matchText: string;
106
- }
107
-
108
- declare interface EditorStateChangePayload {
109
- sessionId: string | null;
110
- state: SerializedSurveyEditor;
111
- revision: number;
112
- hasUncommittedChanges: boolean;
113
- at: number;
114
- }
115
-
116
- /**
117
- * Derive ComposedEditorItemRegistry from unified entries for the editor.
118
- * Ensures Group and PageBreak have definitions; uses coreRegistry from entries.
119
- */
120
- export declare function entriesToComposedEditorRegistry(entries: ItemRegistryEntry[], options?: EntriesToComposedEditorRegistryOptions): ComposedEditorItemRegistry;
121
-
122
- export declare interface EntriesToComposedEditorRegistryOptions {
123
- /** Require built-in editor definitions for group/pageBreak. Defaults to true. */
124
- requireBuiltInTypes?: boolean;
125
- }
126
-
127
- /**
128
- * Derive ItemTypeRegistry from unified entries for Survey / SurveyEditor.
129
- * Uses built-in registry for group/pageBreak; plugin entries supply constructors for custom types.
130
- */
131
- export declare function entriesToItemTypeRegistry(entries: ItemRegistryEntry[]): ItemTypeRegistry;
132
-
133
- /**
134
- * Derive participant registry from unified entries.
135
- * Lightweight: core + renderer only. Use this for survey player / participant app.
136
- */
137
- export declare function entriesToParticipantRegistry(entries: ItemRegistryEntry[], options?: EntriesToParticipantRegistryOptions): SurveyPlayerItemRegistry;
138
-
139
- export declare interface EntriesToParticipantRegistryOptions {
140
- /** Throw when an entry in the provided list does not define a renderComponent. */
141
- requireRenderer?: boolean;
142
- }
143
-
144
- declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): JSX.Element;
145
-
146
- declare const fieldVariants: (props?: ({
147
- orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
148
- } & ClassProp) | undefined) => string;
149
-
150
- export declare function FilepickerDropzone({ id, name, label, description, error, accept, multiple, disabled, required, maxFiles, maxSize, minSize, icon, className, labelClassName, contentClassName, descriptionClassName, errorClassName, dropzoneClassName, labels, onChange, onDropRejected, ...props }: FilepickerDropzoneProps): JSX.Element;
151
-
152
- export declare interface FilepickerDropzoneLabels {
153
- upload: string;
154
- drag: string;
155
- active: string;
156
- reject: string;
157
- rejectInvalidType: string;
158
- rejectTooLarge: string;
159
- rejectTooSmall: string;
160
- rejectTooMany: string;
161
- selectedCount: string;
162
- }
163
-
164
- export declare interface FilepickerDropzoneProps extends Omit<React.ComponentProps<typeof Field>, "children" | "onChange"> {
165
- id: string;
166
- name?: string;
167
- label?: React.ReactNode;
168
- description?: React.ReactNode;
169
- error?: React.ReactNode;
170
- accept?: Accept;
171
- multiple?: boolean;
172
- disabled?: boolean;
173
- required?: boolean;
174
- maxFiles?: number;
175
- maxSize?: number;
176
- minSize?: number;
177
- icon?: React.ReactNode;
178
- labelClassName?: string;
179
- contentClassName?: string;
180
- descriptionClassName?: string;
181
- errorClassName?: string;
182
- dropzoneClassName?: string;
183
- labels?: Partial<FilepickerDropzoneLabels>;
184
- onChange?: (files: readonly FileWithPath[]) => void;
185
- onDropRejected?: (fileRejections: FileRejection[]) => void;
186
- }
187
-
188
- export declare interface GeneratedItemIntentSuggestion {
189
- tempId: string;
190
- parentTempId?: string;
191
- itemType: string;
192
- key: string;
193
- itemLabel?: string;
194
- confidence?: number;
195
- }
196
-
197
- export declare interface GenerateItemFromIntentRequest {
198
- intent: string;
199
- targetParentId: string;
200
- allowedItemTypes: string[];
201
- maxItems?: number;
202
- locale?: string;
203
- context: SurveyAIContextPack;
204
- }
205
-
206
- export declare interface GenerateItemFromIntentResult {
207
- items: GeneratedItemIntentSuggestion[];
208
- }
209
-
210
- export declare function getDefaultComposedEditorRegistry(): ComposedEditorItemRegistry;
211
-
212
- export declare function getDefaultRegistryEntries(): ItemRegistryEntry[];
213
-
214
- export declare function getDefaultSurveyPlayerRegistry(): SurveyPlayerItemRegistry;
215
-
216
- declare type ItemCategory = string;
217
-
218
- declare interface ItemEditorCapabilities {
219
- usesValidationPanel?: boolean;
220
- usesTranslationPanel?: boolean;
221
- usesConditionsPanel?: boolean;
222
- }
223
-
224
- export declare interface ItemEditorComponentProps<TItem extends SurveyItemCore = SurveyItemCore> {
225
- item: TItem;
226
- }
227
-
228
- declare interface ItemEditorLocation {
229
- view: 'item-editor';
230
- itemId?: string;
231
- }
232
-
233
- export declare type ItemIconComponent = default_2.ComponentType<{
234
- className?: string;
235
- }>;
236
-
237
- declare interface ItemInfos {
238
- icon: ItemIconComponent;
239
- labelByLocale: ItemLocaleMap;
240
- descriptionByLocale: ItemLocaleMap;
241
- defaultItemClassName?: string;
242
- categories: ItemCategory[];
243
- }
244
-
245
- declare interface ItemInitialData {
246
- rawItem: RawSurveyItem;
247
- translations?: SurveyItemTranslations;
248
- children?: ItemInitialData[];
249
- }
250
-
251
- declare type ItemLocaleMap = Record<string, string>;
252
-
253
- export declare interface ItemPreviewComponentProps<TItem extends SurveyItemCore = SurveyItemCore> {
254
- item: TItem;
255
- itemConfig: TItem["config"];
256
- itemContent?: SurveyItemTranslations;
257
- locale: string;
258
- mode?: ItemPreviewMode;
259
- }
260
-
261
- export declare type ItemPreviewMode = "interactive" | "static";
262
-
263
- /**
264
- * Unified registry entry type, reusable across contexts:
265
- *
266
- * - Participant app: needs only `constructor` + `renderComponent`
267
- * - Editor: needs constructor, infos, `previewComponent`, editorComponent, searchAdapters, etc.
268
- *
269
- * Use the mapper helpers to derive ItemTypeRegistry, participant registry, or editor registry.
270
- */
271
- export declare interface ItemRegistryEntry {
272
- itemType: string;
273
- /** Item core constructor. Omit for built-in types (group, pageBreak) — they use survey-core's built-in registry. Omit for virtual "root" — it maps to Group with isRoot. */
274
- constructor?: ItemCoreConstructor;
275
- /** Participant renderer. Required for participant app. */
276
- renderComponent?: default_2.ComponentType<ItemRendererComponentProps>;
277
- /** Editor-only: item preview renderer */
278
- previewComponent?: default_2.ComponentType<ItemPreviewComponentProps>;
279
- /** Editor-only: display metadata */
280
- infos?: ItemInfos;
281
- /** Editor-only: card/editor UI */
282
- editorComponent?: default_2.ComponentType<ItemEditorComponentProps>;
283
- /** Editor-only: search integration */
284
- searchAdapters?: ItemSearchAdapter[];
285
- /** Editor-only: include built-in key/label/itemType search adapter in addition to custom adapters. Defaults to true. */
286
- includeDefaultSearchAdapter?: boolean;
287
- /** Editor-only */
288
- capabilities?: ItemEditorCapabilities;
289
- /** Editor-only: default raw item when creating new */
290
- getInitialItem?: () => ItemInitialData;
291
- /** Editor-only: custom creation flow (advanced) */
292
- createItem?: (ctx: CreateItemContext) => string;
293
- /** Editor-only: hide from add-item options in non-root context */
294
- isRootOnly?: boolean;
295
- }
296
-
297
- export declare interface ItemRendererComponentProps {
298
- renderedItem: RenderedSurveyItem;
299
- }
300
-
301
- export declare type ItemSearchAdapter = (ctx: ItemSearchAdapterContext) => EditorItemSearchResult[] | undefined;
302
-
303
- declare interface ItemSearchAdapterContext {
304
- itemId: string;
305
- survey: Survey;
306
- searchTerm: string;
307
- }
308
-
309
- export declare interface ParsedSurveySession {
310
- format: ParsedSurveySessionFormat;
311
- state: SerializedSurveyEditor;
312
- sessionId: string;
313
- }
314
-
315
- export declare type ParsedSurveySessionFormat = 'raw-survey' | 'serialized-editor';
316
-
317
- export declare function parseEditorStateFromJsonText(jsonText: string, pluginRegistry?: ItemTypeRegistry): ParsedSurveySession;
318
-
319
- export declare type RegistryConflictStrategy = "error" | "override";
320
-
321
- export declare interface RegistryValidationIssue {
322
- code: string;
323
- message: string;
324
- itemType?: string;
325
- }
326
-
327
- export declare type RegistryValidationMode = "editor" | "player";
328
-
329
- export declare interface RegistryValidationOptions {
330
- mode: RegistryValidationMode;
331
- requireBuiltInTypes?: boolean;
332
- requireRenderer?: boolean;
333
- }
334
-
335
- export declare interface RegistryValidationResult {
336
- errors: RegistryValidationIssue[];
337
- warnings: RegistryValidationIssue[];
338
- }
339
-
340
- declare const SearchMatchType: {
341
- readonly Content: "content";
342
- readonly Label: "label";
343
- readonly Key: "key";
344
- readonly ItemType: "itemType";
345
- };
346
-
347
- declare type SearchMatchType = (typeof SearchMatchType)[keyof typeof SearchMatchType];
348
-
349
- export declare function serializeSurveyStateForFile(state: SerializedSurveyEditor): string;
350
-
351
- declare interface SimulatorLocation {
352
- view: 'simulator';
353
- }
354
-
355
- export declare interface SuggestItemKeyRequest {
356
- draftKey: string;
357
- currentKey: string;
358
- siblingKeys: string[];
359
- childContentHints?: string[];
360
- maxSuggestions?: number;
361
- context: SurveyAIContextPack;
362
- }
363
-
364
- export declare interface SuggestItemKeyResult {
365
- suggestions: SuggestItemKeySuggestion[];
366
- }
367
-
368
- export declare interface SuggestItemKeySuggestion extends AISuggestedText {
369
- rationale?: string;
370
- }
371
-
372
- export declare interface SuggestItemLabelRequest {
373
- draftLabel: string;
374
- itemType: string;
375
- locale?: string;
376
- maxSuggestions?: number;
377
- context: SurveyAIContextPack;
378
- }
379
-
380
- export declare interface SuggestItemLabelResult {
381
- suggestions: SuggestItemLabelSuggestion[];
382
- }
383
-
384
- export declare interface SuggestItemLabelSuggestion extends AISuggestedText {
385
- tone?: string;
386
- }
387
-
388
- export { SurveyAIContextIndexes }
389
-
390
- export { SurveyAIContextPack }
391
-
392
- export { SurveyAIContextPurpose }
393
-
394
- export { SurveyAIContextScope }
395
-
396
- export { SurveyAIFocus }
397
-
398
- export declare type SurveyAIInvocationMode = "user" | "background";
399
-
400
- export { SurveyAIItemContextNode }
401
-
402
- export { SurveyAIKeyIndexEntry }
403
-
404
- export { SurveyAIOutlineNode }
405
-
406
- export declare interface SurveyAIRequestOptions {
407
- signal?: AbortSignal;
408
- mode?: SurveyAIInvocationMode;
409
- }
410
-
411
- export { SurveyAITranslationSnippet }
412
-
413
- export declare const SurveyEditor: React.FC<SurveyEditorProps>;
414
-
415
- export declare interface SurveyEditorAIProvider {
416
- suggestItemKey?: (request: SuggestItemKeyRequest, options?: SurveyAIRequestOptions) => Promise<SuggestItemKeyResult>;
417
- suggestItemLabel?: (request: SuggestItemLabelRequest, options?: SurveyAIRequestOptions) => Promise<SuggestItemLabelResult>;
418
- generateItemFromIntent?: (request: GenerateItemFromIntentRequest, options?: SurveyAIRequestOptions) => Promise<GenerateItemFromIntentResult>;
419
- translateContent?: (request: TranslateContentRequest, options?: SurveyAIRequestOptions) => Promise<TranslateContentResult>;
420
- }
421
-
422
- declare type SurveyEditorLocation = ItemEditorLocation | TranslationModeLocation | SimulatorLocation;
423
-
424
- declare interface SurveyEditorNavigationAdapter {
425
- getLocation: () => SurveyEditorLocation;
426
- navigateTo: (location: SurveyEditorLocation, options?: {
427
- replace?: boolean;
428
- }) => void;
429
- subscribe(listener: (location: SurveyEditorLocation) => void): () => void;
430
- }
431
-
432
- export declare interface SurveyEditorProps {
433
- initialEditorState?: SerializedSurveyEditor;
434
- initialSessionId?: string;
435
- fallbackLocale?: string;
436
- itemRegistryEntries?: ItemRegistryEntry[];
437
- onEditorStateChange?: (change: SurveyEditorStateChange) => void;
438
- persistDebounceMs?: number;
439
- helpLink?: string;
440
- navigationAdapter?: SurveyEditorNavigationAdapter | null;
441
- aiProvider?: SurveyEditorAIProvider | null;
442
- onSaveRequested?: () => void;
443
- }
444
-
445
- export declare type SurveyEditorStateChange = EditorStateChangePayload;
446
-
447
- export declare const SurveyPlayer: default_2.FC;
448
-
449
- /** Participant registry: core + renderer per item type. Lightweight for survey player. */
450
- declare interface SurveyPlayerItemRegistry {
451
- coreRegistry: ItemTypeRegistry;
452
- getRenderer: (itemType: string) => default_2.ComponentType<ItemRendererComponentProps> | undefined;
453
- }
454
-
455
- export declare interface TranslateContentEntry {
456
- id: string;
457
- text: string;
458
- kind: string;
459
- }
460
-
461
- export declare interface TranslateContentRequest {
462
- sourceLocale: string;
463
- targetLocales: string[];
464
- entries: TranslateContentEntry[];
465
- context: SurveyAIContextPack;
466
- }
467
-
468
- export declare interface TranslateContentResult {
469
- translations: Record<string, Record<string, string>>;
470
- }
471
-
472
- declare interface TranslationModeLocation {
473
- view: 'translation-mode';
474
- }
475
-
476
- export declare function validateRegistryEntries(entries: ItemRegistryEntry[], options: RegistryValidationOptions): RegistryValidationResult;
477
-
478
1
  export { }
@@ -0,0 +1,15 @@
1
+ .survey-editor {
2
+ /* Editor card / preview canvas — neutral near-white */
3
+ --surface-bg-color: oklch(99.1% 0 0);
4
+
5
+ /*
6
+ * Rich text emphasis (Lexical + preview). Chosen for strong contrast on
7
+ * --surface-bg-color and clearly distinct hues so “primary” vs “accent” reads
8
+ * in the UI (not tied to global --primary / --accent, which are tuned for chrome).
9
+ *
10
+ * Primary — cool / structural: main wording emphasis (question tone, lead-in).
11
+ * Accent — warm / focal: secondary highlight (callouts, supplementary emphasis).
12
+ */
13
+ --rich-text-editor-primary-color: oklch(0.36 0.12 264);
14
+ --rich-text-editor-accent-color: oklch(0.44 0.15 48);
15
+ }