@cratis/event-models 0.155.0 → 0.157.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 (40) hide show
  1. package/dist/Board/BoardEditing.d.ts +2 -0
  2. package/dist/Messages/EventModelMessages.d.ts +1 -0
  3. package/dist/References/ExternalEventRemoveButton.d.ts +1 -0
  4. package/dist/Rows/Events/EventReferenceCard.d.ts +3 -1
  5. package/dist/index.js +1135 -1125
  6. package/dist/index.js.map +1 -1
  7. package/dist/screen-editor/ScreenEditor/Collections/orderedItemShape.d.ts +2 -0
  8. package/dist/screen-editor/ScreenEditor/Inspector/ScreenEditorStrings.d.ts +8 -3
  9. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/PrimitiveListEditor.d.ts +11 -0
  10. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/StructuredEditorStrings.d.ts +21 -0
  11. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/StructuredProperties.d.ts +9 -0
  12. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/StructuredValueEditor.d.ts +11 -0
  13. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/UndescribedProperties.d.ts +7 -0
  14. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/classifyStructures.d.ts +6 -0
  15. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/defaultStructuredEditorStrings.d.ts +2 -0
  16. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/index.d.ts +7 -0
  17. package/dist/screen-editor/ScreenEditor/PropertyEditors/Structured/structuredValue.d.ts +16 -0
  18. package/dist/screen-editor/ScreenEditor/Runtime/describeSampleValue.d.ts +4 -0
  19. package/dist/screen-editor/ScreenEditor/index.d.ts +1 -6
  20. package/dist/screen-editor/index.js +5109 -4943
  21. package/dist/screen-editor/screen-editor.css +1 -1
  22. package/package.json +12 -12
  23. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftKind.d.ts +0 -6
  24. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftOutcome.d.ts +0 -13
  25. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonDraftState.d.ts +0 -4
  26. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProblem.d.ts +0 -5
  27. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProblemKind.d.ts +0 -6
  28. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonProperties.d.ts +0 -9
  29. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonPropertyField.d.ts +0 -13
  30. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonPropertyFieldStrings.d.ts +0 -9
  31. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/JsonReading.d.ts +0 -8
  32. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/defaultJsonPropertyFieldStrings.d.ts +0 -2
  33. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/describeJsonProblem.d.ts +0 -3
  34. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/formatJson.d.ts +0 -1
  35. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/isJsonValueType.d.ts +0 -4
  36. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/jsonDraft.d.ts +0 -11
  37. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/numberLiteralsOf.d.ts +0 -1
  38. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/readJson.d.ts +0 -2
  39. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/sameJson.d.ts +0 -1
  40. package/dist/screen-editor/ScreenEditor/PropertyEditors/Json/useJsonDraft.d.ts +0 -9
@@ -0,0 +1,2 @@
1
+ import { type PropertyDescriptor } from '@cratis/scene.model';
2
+ export declare const isOrderedItemCollection: (descriptor: PropertyDescriptor) => boolean;
@@ -1,6 +1,6 @@
1
1
  import type { IconPickerLabels } from '@cratis/components/IconPicker';
2
2
  import type { IconPropertyFieldStrings } from '../../Icons/IconPropertyFieldStrings';
3
- import type { JsonPropertyFieldStrings } from '../PropertyEditors/Json/JsonPropertyFieldStrings';
3
+ import type { StructuredEditorStrings } from '../PropertyEditors/Structured/StructuredEditorStrings';
4
4
  import type { Ownership } from '../Structure/Ownership';
5
5
  import type { SceneDocumentProblem } from '../Document/readSceneDocument';
6
6
  import type { StructureEditRejection } from '../Structure/StructureEditRejection';
@@ -70,7 +70,11 @@ export interface ScreenEditorStrings {
70
70
  addItem: string;
71
71
  icon: IconPropertyFieldStrings;
72
72
  iconPickerLabels?: IconPickerLabels;
73
- json?: JsonPropertyFieldStrings;
73
+ structured?: StructuredEditorStrings;
74
+ undescribed?: {
75
+ label: string;
76
+ message: (property: string, valueType: string, editorKind: string | undefined) => string;
77
+ };
74
78
  templates: {
75
79
  label: string;
76
80
  choose: string;
@@ -206,7 +210,8 @@ export interface ScreenEditorStrings {
206
210
  literalValue: string;
207
211
  literalType: string;
208
212
  literalNull: string;
209
- invalidJson: string;
213
+ literalStructured: string;
214
+ literalNoEditor: string;
210
215
  unsupportedValue: string;
211
216
  replaceUnsupported: string;
212
217
  incompatibleSource: string;
@@ -0,0 +1,11 @@
1
+ import type { PropertyDescriptor } from '@cratis/scene.model';
2
+ import type { StructuredEditorStrings } from './StructuredEditorStrings';
3
+ export interface PrimitiveListEditorProps {
4
+ descriptor: PropertyDescriptor;
5
+ value: unknown;
6
+ id: string;
7
+ strings: StructuredEditorStrings;
8
+ disabled: boolean;
9
+ onChange: (value: unknown) => void;
10
+ }
11
+ export declare const PrimitiveListEditor: ({ descriptor, value, id, strings, disabled, onChange }: PrimitiveListEditorProps) => import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ export interface StructuredEditorStrings {
2
+ unset: string;
3
+ item: string;
4
+ itemTitle: (item: string, position: number) => string;
5
+ add: (item: string) => string;
6
+ remove: (item: string, position: number) => string;
7
+ removeText: string;
8
+ moveUp: (item: string, position: number) => string;
9
+ moveUpText: string;
10
+ moveDown: (item: string, position: number) => string;
11
+ moveDownText: string;
12
+ entry: (position: number) => string;
13
+ moveEntryUp: (position: number) => string;
14
+ moveEntryDown: (position: number) => string;
15
+ removeEntry: (position: number) => string;
16
+ addEntry: string;
17
+ mismatch: (property: string, problem: string) => string;
18
+ convert: string;
19
+ clear: string;
20
+ noEditor: (property: string) => string;
21
+ }
@@ -0,0 +1,9 @@
1
+ import type { InspectedProperty } from '@cratis/scene.model';
2
+ import type { StructuredEditorStrings } from './StructuredEditorStrings';
3
+ export interface StructuredPropertiesProps {
4
+ properties: readonly InspectedProperty[];
5
+ componentId: string;
6
+ setProperty: (property: InspectedProperty, value: unknown) => void;
7
+ strings: StructuredEditorStrings;
8
+ }
9
+ export declare const StructuredProperties: ({ properties, componentId, setProperty, strings }: StructuredPropertiesProps) => import("react").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ import { type PropertyDescriptor } from '@cratis/scene.model';
2
+ import type { StructuredEditorStrings } from './StructuredEditorStrings';
3
+ export interface StructuredValueEditorProps {
4
+ descriptor: PropertyDescriptor;
5
+ value: unknown;
6
+ idPrefix: string;
7
+ strings: StructuredEditorStrings;
8
+ disabled: boolean;
9
+ onChange: (value: unknown) => void;
10
+ }
11
+ export declare const StructuredValueEditor: ({ descriptor, value, idPrefix, strings, disabled, onChange }: StructuredValueEditorProps) => import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { InspectedProperty } from '@cratis/scene.model';
2
+ export interface UndescribedPropertiesProps {
3
+ properties: readonly InspectedProperty[];
4
+ label: string;
5
+ message: (property: string, valueType: string, editorKind: string | undefined) => string;
6
+ }
7
+ export declare const UndescribedProperties: ({ properties, label, message }: UndescribedPropertiesProps) => import("react").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import { type InspectedProperty } from '@cratis/scene.model';
2
+ export interface ClassifiedStructures {
3
+ structured: InspectedProperty[];
4
+ undescribed: InspectedProperty[];
5
+ }
6
+ export declare function classifyStructures(properties: readonly InspectedProperty[], isDrawnElsewhere: (property: InspectedProperty) => boolean): ClassifiedStructures;
@@ -0,0 +1,2 @@
1
+ import type { StructuredEditorStrings } from './StructuredEditorStrings';
2
+ export declare const defaultStructuredEditorStrings: StructuredEditorStrings;
@@ -0,0 +1,7 @@
1
+ export * from './StructuredEditorStrings';
2
+ export * from './classifyStructures';
3
+ export * from './StructuredProperties';
4
+ export * from './StructuredValueEditor';
5
+ export * from './UndescribedProperties';
6
+ export * from './defaultStructuredEditorStrings';
7
+ export * from './structuredValue';
@@ -0,0 +1,16 @@
1
+ import { type PropertyDescriptor } from '@cratis/scene.model';
2
+ export declare const stringListEditorKind = "studio.stringList";
3
+ export declare const numberListEditorKind = "studio.numberList";
4
+ export declare const isPrimitiveList: (descriptor: PropertyDescriptor) => boolean;
5
+ export declare const isObjectWithFields: (descriptor: PropertyDescriptor) => boolean;
6
+ export declare const isCollectionOfRecords: (descriptor: PropertyDescriptor) => boolean;
7
+ export declare const isStructured: (descriptor: PropertyDescriptor) => boolean;
8
+ export declare const isRecord: (value: unknown) => value is Record<string, unknown>;
9
+ export declare function withField(record: unknown, path: string, value: unknown): Record<string, unknown> | undefined;
10
+ export declare const newItem: () => Record<string, unknown>;
11
+ export declare const identified: (item: unknown) => Record<string, unknown>;
12
+ export declare function withItem(items: readonly unknown[], index: number, item: unknown): unknown[];
13
+ export declare function withoutItem(items: readonly unknown[], index: number): unknown[];
14
+ export declare function movedItem(items: readonly unknown[], index: number, offset: number): unknown[];
15
+ export declare function withIdentities(descriptor: PropertyDescriptor, value: unknown): unknown;
16
+ export declare const asList: (value: unknown) => unknown[];
@@ -0,0 +1,4 @@
1
+ import { type PropertyDescriptor } from '@cratis/scene.model';
2
+ export declare const labelOf: (path: string) => string;
3
+ export declare const singularOf: (plural: string) => string;
4
+ export declare function describeSampleValue(path: string, value: unknown, label?: string): PropertyDescriptor;
@@ -19,12 +19,7 @@ export * from './Viewport/windowSizeMemory';
19
19
  export * from './Viewport/windowSizing';
20
20
  export * from './Inspector/ScreenEditorStrings';
21
21
  export * from './Defaults/defaultScreenEditorStrings';
22
- export * from './PropertyEditors/Json/JsonPropertyField';
23
- export * from './PropertyEditors/Json/JsonPropertyFieldStrings';
24
- export * from './PropertyEditors/Json/defaultJsonPropertyFieldStrings';
25
- export * from './PropertyEditors/Json/isJsonValueType';
26
- export * from './PropertyEditors/Json/readJson';
27
- export * from './PropertyEditors/Json/formatJson';
22
+ export * from './PropertyEditors/Structured';
28
23
  export * from './Defaults/defaultLayoutLabels';
29
24
  export * from './Defaults/defaultLayoutIcons';
30
25
  export * from './Defaults/defaultPaletteIcons';