@synopackageland/ui 0.17.9 → 0.17.11

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 (47) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +51 -17
  3. package/dist/components/composite/comment-item/CommentItem.vue.d.ts +5 -1
  4. package/dist/components/composite/copy-button/CopyButton.vue.d.ts +2 -2
  5. package/dist/components/composite/file-picker/FilePicker.vue.d.ts +5 -2
  6. package/dist/components/composite/file-thumbs/FileThumbs.vue.d.ts +24 -0
  7. package/dist/components/composite/form/FormItem.vue.d.ts +1 -1
  8. package/dist/components/composite/form-note/FormNote.vue.d.ts +6 -2
  9. package/dist/components/composite/image-lightbox/ImageLightbox.vue.d.ts +19 -0
  10. package/dist/components/composite/mention-list/MentionList.vue.d.ts +31 -0
  11. package/dist/components/composite/rich-text-view/RichTextBlocks.vue.d.ts +14 -0
  12. package/dist/components/composite/rich-text-view/RichTextImage.vue.d.ts +12 -0
  13. package/dist/components/composite/rich-text-view/RichTextInline.vue.d.ts +23 -0
  14. package/dist/components/composite/rich-text-view/RichTextView.vue.d.ts +28 -0
  15. package/dist/components/composite/stat-tile/StatTile.vue.d.ts +1 -1
  16. package/dist/components/composite/upload-queue/UploadQueue.vue.d.ts +36 -0
  17. package/dist/components/composite/wizard/WizardStep.vue.d.ts +1 -1
  18. package/dist/components/containers/fieldset/Fieldset.vue.d.ts +6 -2
  19. package/dist/components/primitives/input/Input.vue.d.ts +13 -1
  20. package/dist/components/rich-text-editor/RichTextEditor.vue.d.ts +83 -0
  21. package/dist/components/rich-text-editor/extensions.d.ts +30 -0
  22. package/dist/components/rich-text-editor/markdown.d.ts +22 -0
  23. package/dist/i18n/filePicker.d.ts +3 -0
  24. package/dist/i18n/text.d.ts +48 -0
  25. package/dist/index.d.ts +15 -4
  26. package/dist/index.js +11305 -10025
  27. package/dist/json/catalog.d.ts +2 -2
  28. package/dist/json/registry.d.ts +34 -34
  29. package/dist/json-preview/preview.js +3608 -3161
  30. package/dist/lib/files.d.ts +28 -0
  31. package/dist/lib/mentions.d.ts +0 -10
  32. package/dist/lib/richText.d.ts +66 -0
  33. package/dist/lib/uploadQueue.d.ts +39 -0
  34. package/dist/reka-runtime.json +1 -1
  35. package/dist/rich-text.d.ts +3 -0
  36. package/dist/rich-text.js +1075 -0
  37. package/dist/theme.css +1 -1
  38. package/dist/themes/dsm7-embedded-theme.css +1 -1
  39. package/dist/themes/dsm7-embedded.css +1 -1
  40. package/dist/themes/dsm7.css +1 -1
  41. package/docs/layout-rules.md +7 -3
  42. package/docs/theme-hooks.md +14 -3
  43. package/package.json +14 -1
  44. package/dist/components/composite/comment-item/CommentInlineParts.vue.d.ts +0 -7
  45. package/dist/components/composite/mention-textarea/MentionTextarea.vue.d.ts +0 -52
  46. package/dist/lib/commentMarkdown.d.ts +0 -34
  47. /package/dist/components/composite/{mention-textarea → comment-item}/PersonInitials.vue.d.ts +0 -0
@@ -40,9 +40,13 @@ These rules keep pages built from `@synopackageland/ui` consistent. The componen
40
40
  - Colours are fixed by role: section title `--ui-text` semibold 14px, label and value `--ui-text`, help text `--ui-text-secondary` 12px.
41
41
  - A `SettingsRow` with a `description` aligns its label with the control's first line, not the middle of control and description.
42
42
  - A row that is only a button: give it a `SettingsRow` label when it acts on one thing, or put it in the section `#footer`. Inside a horizontal form, use `FormActions inset` so the button starts on the value edge.
43
- - A DSM-native settings page reads its structure from indentation and spacing. Each section is a `Fieldset` (blue title over a dashed divider, collapsible); sections one after another keep a 20px gap. Fields are a `Form` with one `labelWidth` (or the theme's column) and `FormItem`s.
44
- - Options that only matter while a checkbox or switch is on go in a `FormGroup` right after it, with `:disabled="!on"`: one 28px indent, every control inside disabled and dimmed, and the labels inside give up the indent so the controls stay on the form's column. Nest a `FormGroup` for a second level. Do not indent with your own padding or disable each child by hand.
45
- - Explanation is a short `description` under its field. A note the user should read before changing a section is a `FormNote` (DSM's teal "Note:" with bullets) after the fields; facts to read or copy (addresses, paths) go in an `InfoBox`. A warning or an error is a `Callout`. Do not write long full-width paragraphs between fields.
43
+ - A DSM-native settings page reads its structure from indentation and spacing (Control Panel > Network > General). Each section is a `Fieldset`: a blue title with a chevron (up while open) over a dashed divider across the whole width, collapsible. Sections one after another keep a 20px gap. A one-line explanation of the section is the Fieldset's `description`, directly under the title and across the whole width, not in the label column. Fields are one `Form` with one `labelWidth` (or the theme's column) and `FormItem`s; one `Form` may hold several Fieldsets.
44
+ - A read-only value is a `FormItem` with `text-only`: plain text in the control column, level with its label. A button that acts on it (Edit) goes in the item's `#after` slot and follows the field column.
45
+ - Options that only matter while a checkbox or switch is on go in a `FormGroup` right after it, with `:disabled="!on"`. The parent is a `FormItem :label="false"`, so it starts at the section's left edge. The group indents one 28px step, disables and dims every control inside, and the labels inside give up the indent so the controls stay on the form's column, as DSM draws them. Nest a `FormGroup` for a second level. Do not indent with your own padding or disable each child by hand.
46
+ - A section button such as Advanced Settings goes inside the `FormGroup` it belongs to, after its fields, as a plain `Button`: it starts on the group's indent and follows the group's disabled state. Do not centre it or put it in the label column.
47
+ - A unit goes in the `Input`'s `unit` (or `#unit` slot): `<Input v-model="timeout" type="number" unit="s" />` puts "s" right after the field. Do not put units in the FormItem's `#after` slot, which starts after the whole field column.
48
+ - Explanation is a short `description` under its field. A note is a `FormNote`: one remark reads "Note: …" on one line, two or more `items` become a list under the heading. Put it under the field it is about with `inset` (it starts on the field column), or at the end of the section without. Facts to read or copy (addresses, paths) go in an `InfoBox`. A warning or an error is a `Callout`. Do not write long full-width paragraphs or a separate "Note:" heading between fields.
49
+ - A settings page has one Apply. On a page or window, put Reset then Apply in the footer (`Footbar`, `AppActionBar`), as Control Panel does; inside a form that ends the page, use `FormActions inset`. Do not put a Save between the fields of a section.
46
50
 
47
51
  ## Tables
48
52
 
@@ -94,8 +94,10 @@ here stay implementation details and can change in any release.
94
94
  | `data-ui-stat-tile-label`, `-value`, `-unit`, `-note` | `StatTile` parts | present |
95
95
  | `data-ui-stat-tile-group` | `StatTileGroup` | present |
96
96
  | `data-ui-fieldset` | `Fieldset` | present |
97
+ | `data-fieldset-description` | `Fieldset` description under the title | present |
97
98
  | `data-ui-form-group` | `FormGroup` (`data-disabled` while disabled) | present |
98
- | `data-ui-form-note`, `data-ui-form-note-title` | `FormNote` and its heading | present |
99
+ | `data-ui-form-note`, `data-ui-form-note-title` | `FormNote` and its heading (`data-inset` with `inset`) | present |
100
+ | `data-ui-input-unit` | `Input` unit after the field | present |
99
101
  | `data-ui-info-box`, `data-ui-info-box-title` | `InfoBox` and its title | present |
100
102
  | `data-ui-stacked-bar`, `-track`, `-segment`, `-legend`, `-remainder` | `StackedBar` parts (a segment has `data-key` and `data-tone`) | present |
101
103
  | `data-ui-section-tabs-row`, `data-ui-section-tabs-actions` | `SectionTabs` with `#actions`: the row and the actions | present |
@@ -103,8 +105,17 @@ here stay implementation details and can change in any release.
103
105
  | `data-ui-tab-bar-item`, `-more`, `-label`, `-badge` | `AppTabBar` parts (an item's value is its key) | key / present |
104
106
  | `--ui-tab-bar-height`, `--ui-tab-bar-bg`, `--ui-tab-bar-border` | `AppTabBar` height (56px), fill and top border | CSS tokens |
105
107
  | `data-ui-completion-toggle` | `CompletionToggle` (`data-state` `idle` / `done`, `data-error`) | present |
106
- | `data-ui-mention-textarea`, `-input`, `-count`, `-list`, `-option`, `-empty` | `MentionTextarea` parts (`data-over` past `maxlength`) | present |
107
- | `data-ui-comment`, `-author`, `-time`, `-edited`, `-body`, `-mention`, `-link`, `-code`, `-list`, `-actions` | `CommentItem` parts (`data-deleted`, `data-highlighted`) | present |
108
+ | `data-ui-mention-list`, `data-ui-mention-option`, `data-ui-mention-empty` | `MentionList` parts (an option's value is the person's id) | id / present |
109
+ | `data-ui-comment`, `-author`, `-time`, `-edited`, `-body`, `-actions` | `CommentItem` parts (`data-deleted`, `data-highlighted`); the body is a `RichTextView` | present |
110
+ | `data-ui-rich-text-view` | `RichTextView` | present |
111
+ | `data-ui-rich-paragraph`, `-heading`, `-list`, `-quote`, `-code-block`, `-code`, `-link` | `RichTextView` blocks and inline parts | present |
112
+ | `data-ui-rich-mention`, `data-ui-rich-image` | a mention (`data-inactive`) and an image (`data-state`) in a `RichTextView` | id |
113
+ | `data-ui-file-thumbs`, `data-ui-file-thumb`, `-thumb-remove`, `-thumbs-more` | `FileThumbs` parts | present |
114
+ | `data-ui-lightbox`, `-overlay`, `-name`, `-count`, `-download`, `-close`, `-stage`, `-image`, `-file`, `-processing`, `-previous`, `-next` | `ImageLightbox` parts | present |
115
+ | `data-ui-upload-queue`, `-summary`, `-list`, `-task`, `-status`, `-retry`, `-cancel`, `-retry-all`, `-cancel-all`, `-fold`, `-close` | `UploadQueue` parts (a task has `data-status`) | present |
116
+ | `data-ui-rich-editor` | `RichTextEditor` (`data-variant` `compact` / `full`, `data-over` past `maxlength`) | present |
117
+ | `data-ui-rich-editor-content`, `data-ui-rich-toolbar`, `-more`, `-bubble`, `-format-row`, `-format-toggle`, `-link-row`, `-actions`, `-send`, `-count`, `-notes` | `RichTextEditor` parts | present |
118
+ | `data-ui-rich-tool`, `data-ui-rich-attachment`, `data-ui-rich-editor-image` | an editor format button (its key), an image under a compact box (its file id) and an image in a full one (`data-state`) | key / id / present |
108
119
  | `data-tone` | `Callout` | `info`, `success`, `warning`, `danger` |
109
120
  | `data-variant` | `Callout` | `soft`, `inline` |
110
121
  | `data-fill` | `Callout` | present when it spans its container |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/ui",
3
- "version": "0.17.9",
3
+ "version": "0.17.11",
4
4
  "description": "Shared Vue 3 UI component library with a DSM 7 inspired application theme",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,6 +40,10 @@
40
40
  "types": "./dist/json.d.ts",
41
41
  "import": "./dist/json.js"
42
42
  },
43
+ "./rich-text": {
44
+ "types": "./dist/rich-text.d.ts",
45
+ "import": "./dist/rich-text.js"
46
+ },
43
47
  "./json-catalog.schema.json": "./dist/json-catalog.schema.json",
44
48
  "./json-ai-prompt.md": "./dist/json-ai-prompt.md",
45
49
  "./theme.css": "./dist/theme.css",
@@ -52,10 +56,19 @@
52
56
  "vue": "^3.5.0"
53
57
  },
54
58
  "dependencies": {
59
+ "@floating-ui/dom": "1.8.0",
55
60
  "@internationalized/date": "3.12.4",
56
61
  "@json-render/core": "0.21.0",
57
62
  "@json-render/vue": "0.21.0",
58
63
  "@lucide/vue": "1.48.0",
64
+ "@tiptap/core": "3.32.1",
65
+ "@tiptap/extension-bubble-menu": "3.32.1",
66
+ "@tiptap/extension-mention": "3.32.1",
67
+ "@tiptap/extensions": "3.32.1",
68
+ "@tiptap/pm": "3.32.1",
69
+ "@tiptap/starter-kit": "3.32.1",
70
+ "@tiptap/suggestion": "3.32.1",
71
+ "@tiptap/vue-3": "3.32.1",
59
72
  "zod": "^4.6.5"
60
73
  },
61
74
  "engines": {
@@ -1,7 +0,0 @@
1
- import { CommentInline } from '../../../lib/commentMarkdown';
2
- type __VLS_Props = {
3
- parts: CommentInline[];
4
- };
5
- declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
- declare const _default: typeof __VLS_export;
7
- export default _default;
@@ -1,52 +0,0 @@
1
- import { MentionCandidate } from '../../../lib/mentions';
2
- type __VLS_Props = {
3
- modelValue?: string;
4
- /** The people mentioned so far, each still written as `@Label` in the text. */
5
- mentions?: MentionCandidate[];
6
- /** People to offer for the current query. */
7
- candidates?: MentionCandidate[];
8
- /** Narrows `candidates` by the query here; turn off when the server already did. */
9
- filter?: boolean;
10
- /** Shows "Loading…" in the list while the caller fetches. */
11
- loading?: boolean;
12
- /** Characters the stored body may hold; the count shows from 90% and over. */
13
- maxlength?: number;
14
- /** Where the list opens; `top` suits a box pinned to the bottom of a screen. */
15
- side?: 'top' | 'bottom';
16
- placeholder?: string;
17
- /** Visible lines before it grows; it grows with its text to about eight lines where the browser supports it. */
18
- rows?: number;
19
- disabled?: boolean;
20
- invalid?: boolean;
21
- id?: string;
22
- ariaLabel?: string;
23
- };
24
- declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
25
- focus: () => void | undefined;
26
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
27
- search: (query: string) => any;
28
- select: (person: MentionCandidate) => any;
29
- "update:modelValue": (text: string) => any;
30
- "update:mentions": (mentions: MentionCandidate[]) => any;
31
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
32
- onSearch?: ((query: string) => any) | undefined;
33
- onSelect?: ((person: MentionCandidate) => any) | undefined;
34
- "onUpdate:modelValue"?: ((text: string) => any) | undefined;
35
- "onUpdate:mentions"?: ((mentions: MentionCandidate[]) => any) | undefined;
36
- }>, {
37
- filter: boolean;
38
- loading: boolean;
39
- disabled: boolean;
40
- id: string;
41
- modelValue: string;
42
- placeholder: string;
43
- invalid: boolean;
44
- ariaLabel: string;
45
- rows: number;
46
- side: "top" | "bottom";
47
- mentions: MentionCandidate[];
48
- candidates: MentionCandidate[];
49
- maxlength: number;
50
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
51
- declare const _default: typeof __VLS_export;
52
- export default _default;
@@ -1,34 +0,0 @@
1
- import { MentionCandidate } from './mentions';
2
- type Marks = {
3
- strong?: true;
4
- em?: true;
5
- };
6
- export type CommentInline = ({
7
- type: 'text';
8
- text: string;
9
- } & Marks) | ({
10
- type: 'link';
11
- text: string;
12
- href: string;
13
- } & Marks) | ({
14
- type: 'mention';
15
- id: string;
16
- label: string;
17
- inactive: boolean;
18
- known: boolean;
19
- } & Marks) | {
20
- type: 'code';
21
- text: string;
22
- };
23
- export type CommentBlock = {
24
- type: 'paragraph';
25
- parts: CommentInline[];
26
- } | {
27
- type: 'list';
28
- items: CommentInline[][];
29
- };
30
- /** A comment body → paragraphs (text keeps its line breaks) and lists of inline parts. */
31
- export declare function commentMarkdownParts(body: string, people?: readonly MentionCandidate[]): CommentBlock[];
32
- /** A comment body as plain text without the Markdown, for a notification or a preview: mentions as `@Label`, links as their text, list items as `• item`. */
33
- export declare function commentMarkdownText(body: string, people?: readonly MentionCandidate[]): string;
34
- export {};