@case-framework/survey-ui 0.6.2 → 0.8.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 (228) hide show
  1. package/README.md +40 -34
  2. package/dist/src/index.d.ts +7 -13
  3. package/dist/src/lib/survey-assets.d.ts +2 -0
  4. package/dist/src/modules/survey-player/index.d.ts +2 -0
  5. package/dist/src/modules/survey-player/registry.d.ts +23 -0
  6. package/dist/src/modules/survey-player/survey-context.d.ts +1 -1
  7. package/dist/src/modules/survey-player/survey-item/survey-item-types/placeholder-item-renderers.d.ts +1 -1
  8. package/dist/src/modules/survey-player/survey-player.d.ts +1 -1
  9. package/dist/survey-ui.cjs +47 -0
  10. package/dist/survey-ui.cjs.map +1 -0
  11. package/dist/survey-ui.css +1 -1
  12. package/dist/survey-ui.js +14136 -0
  13. package/dist/survey-ui.js.map +1 -0
  14. package/package.json +25 -64
  15. package/dist/default-item-cores-C6VK2LFe.js +0 -10
  16. package/dist/default-item-cores-C6VK2LFe.js.map +0 -1
  17. package/dist/default-item-cores-gdu37TFX.mjs +0 -3988
  18. package/dist/default-item-cores-gdu37TFX.mjs.map +0 -1
  19. package/dist/item-core-registry.cjs.js +0 -2
  20. package/dist/item-core-registry.cjs.js.map +0 -1
  21. package/dist/item-core-registry.es.js +0 -11
  22. package/dist/item-core-registry.es.js.map +0 -1
  23. package/dist/src/components/c-ui/alert-provider.d.ts +0 -18
  24. package/dist/src/components/c-ui/dot-background.d.ts +0 -72
  25. package/dist/src/components/c-ui/filepicker-dropzone.d.ts +0 -38
  26. package/dist/src/components/c-ui/loading-button.d.ts +0 -9
  27. package/dist/src/components/common/content-editable-plain.d.ts +0 -17
  28. package/dist/src/components/common/sortable-tree.d.ts +0 -59
  29. package/dist/src/components/hooks/use-button-shortcut.d.ts +0 -18
  30. package/dist/src/components/hooks/use-document-keydown.d.ts +0 -7
  31. package/dist/src/components/rich-text/content-policy.d.ts +0 -19
  32. package/dist/src/components/rich-text/index.d.ts +0 -6
  33. package/dist/src/components/rich-text/nodes/rich-text-image-node.d.ts +0 -40
  34. package/dist/src/components/rich-text/nodes/rich-text-info-box-node.d.ts +0 -45
  35. package/dist/src/components/rich-text/nodes/survey-rich-text-heading-node.d.ts +0 -27
  36. package/dist/src/components/rich-text/rich-text-block-editor.d.ts +0 -8
  37. package/dist/src/components/rich-text/rich-text-editor-context.d.ts +0 -23
  38. package/dist/src/components/rich-text/rich-text-survey-content.d.ts +0 -7
  39. package/dist/src/components/rich-text/types.d.ts +0 -6
  40. package/dist/src/components/rich-text-editor/index.d.ts +0 -3
  41. package/dist/src/components/rich-text-editor/plugins/command-handler-plugin.d.ts +0 -5
  42. package/dist/src/components/rich-text-editor/plugins/editable-mode-plugin.d.ts +0 -3
  43. package/dist/src/components/rich-text-editor/plugins/floating-toolbar-plugin.d.ts +0 -11
  44. package/dist/src/components/rich-text-editor/plugins/image-dialog-plugin.d.ts +0 -4
  45. package/dist/src/components/rich-text-editor/plugins/info-box-popover-plugin.d.ts +0 -6
  46. package/dist/src/components/rich-text-editor/plugins/link-popover-plugin.d.ts +0 -6
  47. package/dist/src/components/rich-text-editor/plugins/rich-text-image-asset-deletion-plugin.d.ts +0 -1
  48. package/dist/src/components/rich-text-editor/plugins/slash-command-menu-plugin.d.ts +0 -15
  49. package/dist/src/components/rich-text-editor/plugins/sync-editor-value-plugin.d.ts +0 -4
  50. package/dist/src/components/rich-text-editor/rich-text-editor-utils.d.ts +0 -205
  51. package/dist/src/components/rich-text-editor/rich-text-editor.d.ts +0 -43
  52. package/dist/src/components/rich-text-editor/rich-text-image-editor-commands.d.ts +0 -12
  53. package/dist/src/components/rich-text-editor/rich-text-info-box-commands.d.ts +0 -20
  54. package/dist/src/components/rich-text-editor/style-control-icon.d.ts +0 -5
  55. package/dist/src/components/ui/alert.d.ts +0 -10
  56. package/dist/src/components/ui/badge.d.ts +0 -9
  57. package/dist/src/components/ui/breadcrumb.d.ts +0 -11
  58. package/dist/src/components/ui/card.d.ts +0 -11
  59. package/dist/src/components/ui/command.d.ts +0 -18
  60. package/dist/src/components/ui/context-menu.d.ts +0 -31
  61. package/dist/src/components/ui/dialog.d.ts +0 -20
  62. package/dist/src/components/ui/dropdown-menu.d.ts +0 -29
  63. package/dist/src/components/ui/kbd.d.ts +0 -3
  64. package/dist/src/components/ui/resizable.d.ts +0 -7
  65. package/dist/src/components/ui/scroll-area.d.ts +0 -5
  66. package/dist/src/components/ui/skeleton.d.ts +0 -2
  67. package/dist/src/components/ui/sonner.d.ts +0 -3
  68. package/dist/src/components/ui/tabs.d.ts +0 -11
  69. package/dist/src/components/ui/toggle-group.d.ts +0 -10
  70. package/dist/src/components/ui/toggle.d.ts +0 -9
  71. package/dist/src/components/ui/tooltip.d.ts +0 -7
  72. package/dist/src/dev/_components/nav-input.d.ts +0 -35
  73. package/dist/src/dev/app.d.ts +0 -2
  74. package/dist/src/dev/localizations/de.d.ts +0 -2
  75. package/dist/src/dev/main.d.ts +0 -0
  76. package/dist/src/item-core-registry.d.ts +0 -4
  77. package/dist/src/modules/default-item-registry/default-registry-entries.d.ts +0 -2
  78. package/dist/src/modules/default-item-registry/index.d.ts +0 -19
  79. package/dist/src/modules/default-item-registry/item-authoring-state.d.ts +0 -15
  80. package/dist/src/modules/default-item-registry/items/choice/editor/card.d.ts +0 -3
  81. package/dist/src/modules/default-item-registry/items/choice/editor/option-create.d.ts +0 -11
  82. package/dist/src/modules/default-item-registry/items/choice/editor/option-edit-dialog.d.ts +0 -21
  83. package/dist/src/modules/default-item-registry/items/choice/editor/option-editor-fields.d.ts +0 -17
  84. package/dist/src/modules/default-item-registry/items/choice/editor/response-options-list.d.ts +0 -20
  85. package/dist/src/modules/default-item-registry/items/choice/expression-registry.d.ts +0 -3
  86. package/dist/src/modules/default-item-registry/items/choice/preview/item.d.ts +0 -2
  87. package/dist/src/modules/default-item-registry/items/choice/search-adapter.d.ts +0 -2
  88. package/dist/src/modules/default-item-registry/items/form/editor/card.d.ts +0 -3
  89. package/dist/src/modules/default-item-registry/items/form/editor/config-editor.d.ts +0 -12
  90. package/dist/src/modules/default-item-registry/items/form/editor/field-edit-dialog.d.ts +0 -10
  91. package/dist/src/modules/default-item-registry/items/form/editor/field-group-header-dialog.d.ts +0 -12
  92. package/dist/src/modules/default-item-registry/items/form/editor/field-group-layout-dialog.d.ts +0 -9
  93. package/dist/src/modules/default-item-registry/items/form/editor/field-item-preview.d.ts +0 -15
  94. package/dist/src/modules/default-item-registry/items/form/editor/field-key-dialog.d.ts +0 -10
  95. package/dist/src/modules/default-item-registry/items/form/editor/field-sort-dialog.d.ts +0 -11
  96. package/dist/src/modules/default-item-registry/items/form/editor/field-type-shared.d.ts +0 -12
  97. package/dist/src/modules/default-item-registry/items/form/editor/response-field-groups-list.d.ts +0 -16
  98. package/dist/src/modules/default-item-registry/items/form/preview/item.d.ts +0 -2
  99. package/dist/src/modules/default-item-registry/items/form/search-adapter.d.ts +0 -2
  100. package/dist/src/modules/default-item-registry/items/info/editor-card.d.ts +0 -3
  101. package/dist/src/modules/default-item-registry/items/info/preview/item.d.ts +0 -2
  102. package/dist/src/modules/default-item-registry/items/info/search-adapter.d.ts +0 -2
  103. package/dist/src/modules/default-item-registry/items/structure/group/editor-card.d.ts +0 -3
  104. package/dist/src/modules/default-item-registry/items/structure/page-break/editor-card.d.ts +0 -3
  105. package/dist/src/modules/default-item-registry/items/structure/preview-renderers.d.ts +0 -3
  106. package/dist/src/modules/default-item-registry/items/structure/root/editor-card.d.ts +0 -3
  107. package/dist/src/modules/default-item-registry/shared/preview/question-header.d.ts +0 -6
  108. package/dist/src/modules/default-item-registry/shared/preview/utils.d.ts +0 -3
  109. package/dist/src/modules/default-item-registry/shared/question-editor/deferred-localized-rich-text-field.d.ts +0 -26
  110. package/dist/src/modules/default-item-registry/shared/question-editor/header-editor.d.ts +0 -6
  111. package/dist/src/modules/default-item-registry/shared/question-editor/layout.d.ts +0 -8
  112. package/dist/src/modules/default-item-registry/shared/question-editor/rich-text-editors.d.ts +0 -23
  113. package/dist/src/modules/default-item-registry/shared/question-editor/rich-text-policies.d.ts +0 -8
  114. package/dist/src/modules/default-item-registry/shared/question-editor/toolbar.d.ts +0 -10
  115. package/dist/src/modules/survey-editor/ai/create-provider.d.ts +0 -22
  116. package/dist/src/modules/survey-editor/ai/types.d.ts +0 -11
  117. package/dist/src/modules/survey-editor/ai/use-survey-assistant-integration.d.ts +0 -16
  118. package/dist/src/modules/survey-editor/assets/index.d.ts +0 -4
  119. package/dist/src/modules/survey-editor/assets/survey-image-asset-manager.d.ts +0 -4
  120. package/dist/src/modules/survey-editor/assets/use-survey-assets.d.ts +0 -4
  121. package/dist/src/modules/survey-editor/assets/utils.d.ts +0 -5
  122. package/dist/src/modules/survey-editor/assistant/apply.d.ts +0 -24
  123. package/dist/src/modules/survey-editor/assistant/index.d.ts +0 -2
  124. package/dist/src/modules/survey-editor/assistant/snapshot.d.ts +0 -39
  125. package/dist/src/modules/survey-editor/editor-card/add-items/constants.d.ts +0 -5
  126. package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-add-item-actions.d.ts +0 -24
  127. package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-add-item-target.d.ts +0 -9
  128. package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-option-group-navigation.d.ts +0 -20
  129. package/dist/src/modules/survey-editor/editor-card/add-items/types.d.ts +0 -21
  130. package/dist/src/modules/survey-editor/editor-card/add-items/views/back-button.d.ts +0 -5
  131. package/dist/src/modules/survey-editor/editor-card/add-items/views/blank-item-view.d.ts +0 -13
  132. package/dist/src/modules/survey-editor/editor-card/add-items/views/entry-view.d.ts +0 -15
  133. package/dist/src/modules/survey-editor/editor-card/add-items/views/item-type-grid-view.d.ts +0 -30
  134. package/dist/src/modules/survey-editor/editor-card/add-items/views/structure-view.d.ts +0 -16
  135. package/dist/src/modules/survey-editor/editor-card/add-items.d.ts +0 -1
  136. package/dist/src/modules/survey-editor/editor-card/copy-item-dropdown-menu.d.ts +0 -5
  137. package/dist/src/modules/survey-editor/editor-card/delete-item-context-menu.d.ts +0 -5
  138. package/dist/src/modules/survey-editor/editor-card/delete-item-dropdown-menu.d.ts +0 -7
  139. package/dist/src/modules/survey-editor/editor-card/editor-card-tab-trigger.d.ts +0 -15
  140. package/dist/src/modules/survey-editor/editor-card/expression-pseudo-code.d.ts +0 -8
  141. package/dist/src/modules/survey-editor/editor-card/group-items.d.ts +0 -2
  142. package/dist/src/modules/survey-editor/editor-card/hooks/use-armed-shortcut-sequence.d.ts +0 -11
  143. package/dist/src/modules/survey-editor/editor-card/hooks/use-group-list-keyboard.d.ts +0 -30
  144. package/dist/src/modules/survey-editor/editor-card/index.d.ts +0 -2
  145. package/dist/src/modules/survey-editor/editor-card/item-authoring-state-preview.d.ts +0 -16
  146. package/dist/src/modules/survey-editor/editor-card/item-color-menu.d.ts +0 -6
  147. package/dist/src/modules/survey-editor/editor-card/item-color-selector.d.ts +0 -5
  148. package/dist/src/modules/survey-editor/editor-card/item-editor-card-skeleton.d.ts +0 -2
  149. package/dist/src/modules/survey-editor/editor-card/item-editor-card.d.ts +0 -34
  150. package/dist/src/modules/survey-editor/editor-card/item-editor-context.d.ts +0 -23
  151. package/dist/src/modules/survey-editor/editor-card/item-expression-overview.d.ts +0 -33
  152. package/dist/src/modules/survey-editor/editor-card/item-key-editor.d.ts +0 -9
  153. package/dist/src/modules/survey-editor/editor-card/item-label-preview-and-editor.d.ts +0 -10
  154. package/dist/src/modules/survey-editor/editor-card/item-preview.d.ts +0 -8
  155. package/dist/src/modules/survey-editor/editor-card/item-sibling-navigation.d.ts +0 -5
  156. package/dist/src/modules/survey-editor/editor-card/item-type-icon-with-tooltip.d.ts +0 -8
  157. package/dist/src/modules/survey-editor/editor-card/survey-player-item-preview.d.ts +0 -6
  158. package/dist/src/modules/survey-editor/editor-instance-provider.d.ts +0 -9
  159. package/dist/src/modules/survey-editor/hooks/useClipboardValue.d.ts +0 -2
  160. package/dist/src/modules/survey-editor/hooks/useDeleteItem.d.ts +0 -11
  161. package/dist/src/modules/survey-editor/hooks/useEditor.d.ts +0 -12
  162. package/dist/src/modules/survey-editor/hooks/useEditorStateChange.d.ts +0 -18
  163. package/dist/src/modules/survey-editor/hooks/useKeyboardShortcuts.d.ts +0 -7
  164. package/dist/src/modules/survey-editor/index.d.ts +0 -20
  165. package/dist/src/modules/survey-editor/localization/date-fns.d.ts +0 -5
  166. package/dist/src/modules/survey-editor/localization/default-all.d.ts +0 -2
  167. package/dist/src/modules/survey-editor/localization/default-en.d.ts +0 -3
  168. package/dist/src/modules/survey-editor/localization/default-nl.d.ts +0 -2
  169. package/dist/src/modules/survey-editor/localization/index.d.ts +0 -5
  170. package/dist/src/modules/survey-editor/localization/runtime.d.ts +0 -4
  171. package/dist/src/modules/survey-editor/navigation/location.d.ts +0 -6
  172. package/dist/src/modules/survey-editor/navigation/navigation-provider.d.ts +0 -12
  173. package/dist/src/modules/survey-editor/navigation/navigation.d.ts +0 -22
  174. package/dist/src/modules/survey-editor/navigation/types.d.ts +0 -23
  175. package/dist/src/modules/survey-editor/primitives/input-with-ai-popover.d.ts +0 -35
  176. package/dist/src/modules/survey-editor/registry/authoring-state.d.ts +0 -17
  177. package/dist/src/modules/survey-editor/registry/index.d.ts +0 -8
  178. package/dist/src/modules/survey-editor/registry/registry-mappers.d.ts +0 -25
  179. package/dist/src/modules/survey-editor/registry/search-adapter.d.ts +0 -19
  180. package/dist/src/modules/survey-editor/registry/types.d.ts +0 -218
  181. package/dist/src/modules/survey-editor/routes/editor/_components/assistant-authoring-lock.d.ts +0 -7
  182. package/dist/src/modules/survey-editor/routes/editor/_components/editor-assistant-slot-context.d.ts +0 -6
  183. package/dist/src/modules/survey-editor/routes/editor/_components/editor-assistant-slot.d.ts +0 -8
  184. package/dist/src/modules/survey-editor/routes/editor/_components/editor-mode-switch.d.ts +0 -7
  185. package/dist/src/modules/survey-editor/routes/editor/_components/editor-workspace.d.ts +0 -30
  186. package/dist/src/modules/survey-editor/routes/editor/_components/footer.d.ts +0 -2
  187. package/dist/src/modules/survey-editor/routes/editor/_components/history-stack.d.ts +0 -2
  188. package/dist/src/modules/survey-editor/routes/editor/_components/main.d.ts +0 -7
  189. package/dist/src/modules/survey-editor/routes/editor/_components/workspace-presets.d.ts +0 -75
  190. package/dist/src/modules/survey-editor/routes/editor/asset-manager/index.d.ts +0 -2
  191. package/dist/src/modules/survey-editor/routes/editor/index.d.ts +0 -7
  192. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/breadcrumbs-nav.d.ts +0 -2
  193. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/item-editor-toolbar.d.ts +0 -6
  194. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/language-picker.d.ts +0 -2
  195. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/search-trigger.d.ts +0 -3
  196. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/survey-search.d.ts +0 -7
  197. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/survey-outline.d.ts +0 -3
  198. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/survey-workspace.d.ts +0 -12
  199. package/dist/src/modules/survey-editor/routes/editor/item-editor/index.d.ts +0 -6
  200. package/dist/src/modules/survey-editor/routes/editor/preview-mode/index.d.ts +0 -7
  201. package/dist/src/modules/survey-editor/routes/editor/preview-mode/page-break-divider.d.ts +0 -6
  202. package/dist/src/modules/survey-editor/routes/editor/preview-mode/preview-controls.d.ts +0 -15
  203. package/dist/src/modules/survey-editor/routes/editor/preview-mode/preview-tree.d.ts +0 -26
  204. package/dist/src/modules/survey-editor/routes/editor/preview-mode/survey-preview-canvas.d.ts +0 -16
  205. package/dist/src/modules/survey-editor/routes/editor/preview-mode/survey-preview-item.d.ts +0 -13
  206. package/dist/src/modules/survey-editor/routes/editor/preview-mode/use-preview-preferences.d.ts +0 -14
  207. package/dist/src/modules/survey-editor/routes/editor/translation-mode/index.d.ts +0 -2
  208. package/dist/src/modules/survey-editor/session-file.d.ts +0 -13
  209. package/dist/src/modules/survey-editor/store/editor-store-context.d.ts +0 -10
  210. package/dist/src/modules/survey-editor/store/editor-store-provider.d.ts +0 -7
  211. package/dist/src/modules/survey-editor/store/editor-store.d.ts +0 -109
  212. package/dist/src/modules/survey-editor/store/use-editor-store.d.ts +0 -4
  213. package/dist/src/modules/survey-editor/store/useItemNavigation.d.ts +0 -7
  214. package/dist/src/modules/survey-editor/survey-editor-config.d.ts +0 -38
  215. package/dist/src/modules/survey-editor/survey-editor.d.ts +0 -40
  216. package/dist/src/modules/survey-editor/utils/item-type-infos.d.ts +0 -23
  217. package/dist/src/modules/survey-editor/workspace.d.ts +0 -17
  218. package/dist/src/modules/survey-player/survey-item/survey-item-types/question-wrapper.d.ts +0 -5
  219. package/dist/survey-editor-animations.css +0 -87
  220. package/dist/survey-editor-animations.css.d.ts +0 -2
  221. package/dist/survey-editor-defaults.css +0 -15
  222. package/dist/survey-editor-defaults.css.d.ts +0 -2
  223. package/dist/survey-ui.cjs.js +0 -199
  224. package/dist/survey-ui.cjs.js.map +0 -1
  225. package/dist/survey-ui.es.js +0 -57954
  226. package/dist/survey-ui.es.js.map +0 -1
  227. package/dist/vite.svg +0 -1
  228. /package/dist/src/{components/rich-text/rich-text-link-utils.d.ts → lib/rich-text-link-url.d.ts} +0 -0
package/README.md CHANGED
@@ -1,48 +1,54 @@
1
- # @case-framework/survey-ui
1
+ # `@case-framework/survey-ui`
2
2
 
3
- React UI components for CASE surveys, including the `SurveyEditor`.
3
+ Participant-facing React components for rendering and completing CASE surveys.
4
+ This package intentionally excludes the Survey Editor and Survey Assistant.
4
5
 
5
- ## SurveyEditor styling in a host project
6
+ ## Styling in a Tailwind CSS v4 / shadcn host
6
7
 
7
- Import the package stylesheet once in your app entry point:
8
+ Import the React API normally:
8
9
 
9
10
  ```tsx
10
- import "@case-framework/survey-ui/css";
11
+ import { SurveyPlayer } from "@case-framework/survey-ui";
11
12
  ```
12
13
 
13
- If you only want the editor's default variable values as a tiny standalone asset, import:
14
+ Do not import `@case-framework/survey-ui/css` in a standard shadcn application.
15
+ The host already owns Tailwind, shadcn's semantic theme tokens, Preflight, and
16
+ the global `:root`/`.dark` theme. Importing another complete generated
17
+ stylesheet can duplicate those layers and overwrite host variables or base
18
+ element styles.
14
19
 
15
- ```tsx
16
- import "@case-framework/survey-ui/editor-defaults.css";
17
- ```
18
-
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.
20
-
21
- If the host already provides the package's UI styles and only needs the editor's
22
- mode-switch animations, import the animation rules without the package's global
23
- stylesheet:
24
-
25
- ```tsx
26
- import "@case-framework/survey-ui/editor-animations.css";
27
- ```
28
-
29
- 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:
20
+ Instead, explicitly register the installed package as a Tailwind source in the
21
+ host's existing global stylesheet:
30
22
 
31
23
  ```css
32
24
  @import "tailwindcss";
33
- @source "../node_modules/@case-framework/survey-ui/dist";
34
- ```
25
+ @import "tw-animate-css";
26
+ @import "shadcn/tailwind.css";
35
27
 
36
- Override the editor-specific CSS variables on the `.survey-editor` scope in the host stylesheet:
37
-
38
- ```css
39
- .survey-editor {
40
- --surface-bg-color: oklch(1 0 0);
41
- }
28
+ @source "../node_modules/@case-framework/survey-ui/dist";
42
29
  ```
43
30
 
44
- Available editor-scoped variables:
45
-
46
- - `--surface-bg-color`
47
-
48
- 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.
31
+ The path is relative to the stylesheet containing `@source`; adjust it for the
32
+ host's directory layout. Tailwind generates only the utilities it detects in
33
+ the package, using the host application's theme.
34
+
35
+ `@case-framework/survey-ui/css` is currently a complete precompiled stylesheet
36
+ for standalone/non-Tailwind integrations. It includes global theme and base
37
+ rules, so treat it as an application-level stylesheet, import it only once, and
38
+ do not combine it with an existing shadcn global stylesheet without first
39
+ reviewing the cascade.
40
+
41
+ Install `@case-framework/survey-editor-ui` only in authoring applications.
42
+
43
+ ## Why this integration
44
+
45
+ - [Tailwind: detecting classes in source files](https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-registering-sources)
46
+ documents `@source` specifically for external UI libraries because
47
+ dependencies under `node_modules` are ignored by automatic source detection.
48
+ - [Tailwind: Preflight](https://tailwindcss.com/docs/preflight) documents that
49
+ `@import "tailwindcss"` includes global base styles by default.
50
+ - [shadcn: theming](https://ui.shadcn.com/docs/theming) recommends that the
51
+ application own semantic CSS variables such as `--background`, `--primary`,
52
+ and `--border`.
53
+ - [shadcn: Tailwind v4](https://ui.shadcn.com/docs/tailwind-v4) shows those
54
+ variables and `@theme inline` in the application's global stylesheet.
@@ -1,13 +1,7 @@
1
- export { SurveyPlayer, SurveyContextProvider, SurveyItemRenderer, useSurveyCtx, useSurveyTranslation, } from './modules/survey-player';
2
- export { SurveyEditor } from './modules/survey-editor';
3
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './components/ui/dialog';
4
- export { APPLY_RICH_TEXT_STYLE_COMMAND, buildSurveyFileName, buildSurveyAssistantItemRegistryManifest, buildSurveyAssistantSnapshot, createSnapshotSurveyEditorAIProvider, useSurveyEditorAssistantIntegration, createBlankEditorState, createEditorStateFromRawSurvey, createRichTextEditorValueFromContent, createRichTextEditorValueFromPlainText, createRichTextEditorValueFromText, DEFAULT_EDITOR_LANGUAGE, DEFAULT_DATE_FNS_LOCALES, DEFAULT_CATEGORY_LABELS, DEFAULT_BLOCK_CONTENT_POLICY, DEFAULT_COMPACT_CONTENT_POLICY, defaultSurveyEditorLocalizations, RichTextEditor, RichTextBlockEditor, CONVERT_RICH_TEXT_LINK_TO_TEXT_COMMAND, INSERT_RICH_TEXT_LINK_COMMAND, INSERT_RICH_TEXT_TEMPLATE_VARIABLE_COMMAND, getDateFnsLocale, isBlockContentPolicyVariant, mergeDateFnsLocales, mergeEditorLocalizations, mergeRichTextContentPolicy, OPEN_RICH_TEXT_LINK_EDITOR_COMMAND, RichTextContentView, sanitizeContentForPolicy, SurveyImageAssetManager, surveyEditorEnMessages, surveyEditorNlMessages, UPDATE_RICH_TEXT_LINK_COMMAND, entriesToComposedEditorRegistry, entriesToParticipantRegistry, entriesToItemTypeRegistry, getRichTextContentFromEditorState, parseEditorStateFromJsonText, resolveCategoryLabel, serializeSurveyStateForFile, useSurveyAssets, useSurveyImageAssets, useUnusedSurveyAssetCount, validateRegistryEntries, } from './modules/survey-editor';
5
- export { FilepickerDropzone } from './components/c-ui/filepicker-dropzone';
6
- export { SortableTree } from './components/common/sortable-tree';
7
- export type { SortableTreeDropEvent, SortableTreeDropPosition, SortableTreeEmptyGroupProps, SortableTreeMoveEvent, SortableTreePosition, SortableTreeProps, SortableTreeRenderItemProps, } from './components/common/sortable-tree';
8
- export { cloneRegistryEntries, createComposedEditorRegistry, createRegistryEntries, createSurveyPlayerRegistry, getDefaultComposedEditorRegistry, getDefaultRegistryEntries, getDefaultSurveyPlayerRegistry, } from './modules/default-item-registry';
9
- export type { CreateComposedEditorRegistryOptions, CreateRegistryEntriesOptions, CreateSurveyPlayerRegistryOptions, RegistryConflictStrategy, } from './modules/default-item-registry';
10
- export type { SurveyEditorProps, SurveyEditorStateChange, SurveyEditorWorkspace, SurveyEditorWorkspacePanelOptions, SurveyEditorAssistantController, SurveyAssistantSnapshotOptions, CreateSnapshotSurveyEditorAIProviderOptions, UseSurveyEditorAssistantIntegrationOptions, SurveyEditorAITaskCacheOptions, SurveyEditorAITaskExecution, SurveyEditorAITaskExecutor, SurveyEditorLocation, EditorItemDefinition, EditorItemDefinitionRegistry, ComposedEditorItemRegistry, EntriesToComposedEditorRegistryOptions, EntriesToParticipantRegistryOptions, ItemEditorComponentProps, ItemIconComponent, ItemPreviewComponentProps, ItemPreviewMode, ItemRegistryEntry, ItemRendererComponentProps, ItemSearchAdapter, RegistryValidationIssue, RegistryValidationMode, RegistryValidationOptions, RegistryValidationResult, SurveyPlayerItemRegistry, SurveyEditorAIProvider, SurveyAIRequestOptions, RichTextEditorChange, RichTextEditorProps, RichTextBlockEditorChange, RichTextBlockEditorProps, RichTextContentPolicy, RichTextLinkPayload, RichTextStyleControl, RichTextTemplateVariable, RichTextContentViewProps, RichTextEditorVariant, RichTextStyleAttribute, RichTextSupportedBlockType, SerializedRichTextLinkNode, SerializedTemplateVariableNode, SurveyImageAssetManagerProps, ParsedSurveySession, ParsedSurveySessionFormat, } from './modules/survey-editor';
11
- export type { SurveyPlayerProps, SurveyContextProviderProps, SurveyItemRendererProps, } from './modules/survey-player';
12
- export type { SurveyEditorDateLocales } from './modules/survey-editor/localization/date-fns';
13
- export type { FilepickerDropzoneLabels, FilepickerDropzoneProps, } from './components/c-ui/filepicker-dropzone';
1
+ export { SurveyPlayer, SurveyContextProvider, SurveyItemRenderer, createSurveyPlayerRegistry, getDefaultSurveyPlayerRegistry, useSurveyCtx, useSurveyTranslation, } from './modules/survey-player';
2
+ export type { CreateSurveyPlayerRegistryOptions, ItemRendererComponentProps, SurveyContextProviderProps, SurveyItemRendererProps, SurveyPlayerItemRegistry, SurveyPlayerProps, SurveyPlayerRegistryEntry, } from './modules/survey-player';
3
+ export { ChoiceItemCore, FormItemCore, InfoItemCore, } from './modules/default-item-registry/default-item-cores';
4
+ export { ChoiceItemRenderer, FormItemRenderer, InfoItemRenderer, } from './modules/survey-player/survey-item/survey-item-types/placeholder-item-renderers';
5
+ export { createSurveyTranslator, mergeSurveyPlayerLocalizationSources, mergeSurveyPlayerLocalizations, } from './modules/survey-player/localization/runtime';
6
+ export { DEFAULT_SURVEY_PLAYER_LANGUAGE, defaultSurveyPlayerLocalizations, } from './modules/survey-player/localization/default-en';
7
+ export { InfoItemCardField } from './modules/default-item-registry/items/info/player/card-field';
@@ -0,0 +1,2 @@
1
+ import { RawSurveyAsset } from '@case-framework/survey-core';
2
+ export declare function getSurveyImageAssetUrl(asset?: RawSurveyAsset): string | undefined;
@@ -2,3 +2,5 @@ export { SurveyPlayer } from './survey-player';
2
2
  export { SurveyContextProvider, useSurveyCtx, useSurveyTranslation, type SurveyContextProviderProps, } from './survey-context';
3
3
  export { SurveyItemRenderer, type SurveyItemRendererProps } from './survey-item/survey-item';
4
4
  export type { SurveyPlayerProps } from './survey-player';
5
+ export { createSurveyPlayerRegistry, getDefaultSurveyPlayerRegistry } from './registry';
6
+ export type { CreateSurveyPlayerRegistryOptions, ItemRendererComponentProps, SurveyPlayerItemRegistry, SurveyPlayerRegistryEntry, } from './registry';
@@ -0,0 +1,23 @@
1
+ import { ItemCoreConstructor, ItemTypeRegistry, RenderedSurveyItem } from '@case-framework/survey-core';
2
+ import { LocalizationCatalog } from '@case-framework/ui-localization';
3
+ import { default as React } from 'react';
4
+ export interface ItemRendererComponentProps {
5
+ renderedItem: RenderedSurveyItem;
6
+ }
7
+ export interface SurveyPlayerRegistryEntry {
8
+ itemType: string;
9
+ constructor?: ItemCoreConstructor;
10
+ renderComponent?: React.ComponentType<ItemRendererComponentProps>;
11
+ playerLocalizations?: LocalizationCatalog;
12
+ }
13
+ export interface SurveyPlayerItemRegistry {
14
+ coreRegistry: ItemTypeRegistry;
15
+ getRenderer: (itemType: string) => React.ComponentType<ItemRendererComponentProps> | undefined;
16
+ localizations: LocalizationCatalog;
17
+ }
18
+ export interface CreateSurveyPlayerRegistryOptions {
19
+ includeDefaultEntries?: boolean;
20
+ entries?: SurveyPlayerRegistryEntry[];
21
+ }
22
+ export declare function createSurveyPlayerRegistry(options?: CreateSurveyPlayerRegistryOptions): SurveyPlayerItemRegistry;
23
+ export declare function getDefaultSurveyPlayerRegistry(): SurveyPlayerItemRegistry;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { Survey, SurveyEngineCore } from '@case-framework/survey-core';
3
- import { SurveyPlayerItemRegistry } from '../../../modules/survey-editor/registry';
3
+ import { SurveyPlayerItemRegistry } from './registry';
4
4
  import { LocalizationCatalog, LocalizationTranslate } from '@case-framework/ui-localization';
5
5
  export type HandlerFuncArgType = string | number | boolean | null | undefined;
6
6
  export type HandlerFunction = (handlerId: string, args?: HandlerFuncArgType[]) => Promise<{
@@ -1,4 +1,4 @@
1
- import { ItemRendererComponentProps } from '../../../../../modules/survey-editor/registry';
1
+ import { ItemRendererComponentProps } from '../../../../../modules/survey-player/registry';
2
2
  export declare function InfoItemRenderer(props: ItemRendererComponentProps): import("react/jsx-runtime").JSX.Element;
3
3
  export declare function FormItemRenderer(props: ItemRendererComponentProps): import("react/jsx-runtime").JSX.Element;
4
4
  export declare function ChoiceItemRenderer(props: ItemRendererComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { Survey, SurveyEngineCore, ScreenSize, SurveyItemResponse } from '@case-framework/survey-core';
2
- import { SurveyPlayerItemRegistry } from '../../../modules/survey-editor/registry';
2
+ import { SurveyPlayerItemRegistry } from '../../../modules/survey-player/registry';
3
3
  import { LocalizationCatalog } from '@case-framework/ui-localization';
4
4
  export interface SurveyPlayerProps {
5
5
  survey: Survey;