@cratis/event-models 0.223.0 → 0.223.1
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/dist/screen-editor/{BindingExpressionPropertyEditor-ClMKmJ_3.js → BindingExpressionPropertyEditor-w3_NmhK7.js} +2 -2
- package/dist/screen-editor/{CollectionEditor-C7eX8Hw7.js → CollectionEditor-DoTQJiqE.js} +3 -3
- package/dist/screen-editor/{IconEditor-C0ibqn-e.js → IconEditor-qXyGbGEX.js} +5 -5
- package/dist/screen-editor/{QueryBindingPropertyEditor-BQa1v9AT.js → QueryBindingPropertyEditor-Cu4PTcOz.js} +4 -4
- package/dist/screen-editor/ScreenEditor/DropRegions/computeDropRegions.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Host/ScreenEditorOverlayFrame.d.ts +23 -0
- package/dist/screen-editor/ScreenEditor/Host/fitOverlay.d.ts +14 -0
- package/dist/screen-editor/ScreenEditor/Layouts/LayoutArrangement.d.ts +8 -0
- package/dist/screen-editor/ScreenEditor/Layouts/LayoutCatalogEntry.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Layouts/LayoutContainerDescriptor.d.ts +10 -0
- package/dist/screen-editor/ScreenEditor/Layouts/toLayoutContainerDescriptors.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Selection/surfaceArrangementOfRoot.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/Structure/StructureTreeAdapter.d.ts +1 -1
- package/dist/screen-editor/ScreenEditor/index.d.ts +2 -0
- package/dist/screen-editor/{StructuredPropertyEditor-B3lVjrHZ.js → StructuredPropertyEditor-Bd-8GBgK.js} +1 -1
- package/dist/screen-editor/{TemplatePropertyEditor-CDKWG7m1.js → TemplatePropertyEditor-JGA5uEfP.js} +2 -2
- package/dist/screen-editor/index.js +2256 -2136
- package/dist/screen-editor/screen-editor.css +1 -1
- package/dist/screen-editor/{toTemplateSources-B9ALGe3x.js → toTemplateSources-Chd2UNJQ.js} +5 -5
- package/package.json +4 -4
- package/dist/screen-editor/{StructuredValueEditor-CcwyOga0.js → StructuredValueEditor-DUSATTWd.js} +1 -1
- package/dist/screen-editor/{allowedIconChoices-DBgeRdGI.js → allowedIconChoices-KSkQ6blx.js} +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as V, i as _, l as J, n as I, o as R, r as O, s as Q, t as j } from "./defaultStructuredEditorStrings-Ch1I0Lci.js";
|
|
2
2
|
import { c as w } from "./structuredValue-vqCZttsk.js";
|
|
3
|
-
import { t as D } from "./StructuredValueEditor-
|
|
3
|
+
import { t as D } from "./StructuredValueEditor-DUSATTWd.js";
|
|
4
4
|
import { useEffect as K, useRef as E, useState as F } from "react";
|
|
5
|
-
import { BindingSourceKind as d, PropertyValueType as C } from "@cratis/scene.model";
|
|
6
5
|
import { Fragment as x, jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { BindingSourceKind as d, PropertyValueType as C } from "@cratis/scene.model";
|
|
7
7
|
var u = /* @__PURE__ */ (function(e) {
|
|
8
8
|
return e.String = "string", e.Number = "number", e.Boolean = "boolean", e.Null = "null", e.Json = "json", e;
|
|
9
9
|
})(u || {}), $ = ({ property: e, sources: l, strings: s, disabled: c, onChange: p }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as u, i as D, r as T, t as A } from "./iconDiagnostics-Ds4CnqD0.js";
|
|
2
|
-
import { n as P, t as $ } from "./allowedIconChoices-
|
|
3
|
-
import { StructuredPropertyEditor as U } from "./StructuredPropertyEditor-
|
|
4
|
-
import { CollectionOperation as C, DestinationKind as v, PropertyValueType as L, SceneEditKind as O } from "@cratis/scene.model";
|
|
2
|
+
import { n as P, t as $ } from "./allowedIconChoices-KSkQ6blx.js";
|
|
3
|
+
import { StructuredPropertyEditor as U } from "./StructuredPropertyEditor-Bd-8GBgK.js";
|
|
5
4
|
import { jsx as n, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { CollectionOperation as C, DestinationKind as v, PropertyValueType as L, SceneEditKind as O } from "@cratis/scene.model";
|
|
6
6
|
import { OrderedItemEditor as F } from "@cratis/components/ConfigurationEditor";
|
|
7
7
|
var K = /* @__PURE__ */ new Set([
|
|
8
8
|
"label",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as t, t as d } from "./allowedIconChoices-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { n as t, t as d } from "./allowedIconChoices-KSkQ6blx.js";
|
|
2
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
|
+
import { isIconReference as g } from "@cratis/scene.model";
|
|
4
4
|
var I = ({ value: a, onChange: s, descriptor: i, context: o, disabled: l, problem: n, id: e }) => {
|
|
5
5
|
const { icons: r } = o.lookups;
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ p(t, {
|
|
7
7
|
id: e,
|
|
8
|
-
value:
|
|
8
|
+
value: g(a) ? a : void 0,
|
|
9
9
|
onChange: (c) => s(c),
|
|
10
10
|
catalog: r.catalog,
|
|
11
11
|
adapters: r.adapters,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as N } from "./QueryBindingEditor-MTd0R7iQ.js";
|
|
2
2
|
import { useState as C } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Fragment as E, jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
4
|
+
import { validateBinding as I } from "@cratis/scene.engine";
|
|
5
5
|
function j(e) {
|
|
6
6
|
return {
|
|
7
7
|
queryId: e.id,
|
|
@@ -46,7 +46,7 @@ function R({ binding: e, candidate: r, isLoading: i, error: s, rowCount: c }) {
|
|
|
46
46
|
return e ? r ? s != null ? u.Error : i ? u.Loading : c === 0 ? u.Empty : u.Ready : u.MissingQuery : u.NoQuery;
|
|
47
47
|
}
|
|
48
48
|
function v(e, r, i, s) {
|
|
49
|
-
const c =
|
|
49
|
+
const c = I(e, r, i, s);
|
|
50
50
|
return {
|
|
51
51
|
diagnostics: c,
|
|
52
52
|
isStorable: c.every((y) => y.severity !== "error")
|
|
@@ -100,7 +100,7 @@ var k = (e) => e.origin.map((r) => r.name).join(" / "), D = ({ property: e, cand
|
|
|
100
100
|
role: "alert",
|
|
101
101
|
children: l.missing
|
|
102
102
|
}),
|
|
103
|
-
t && m && /* @__PURE__ */ d(
|
|
103
|
+
t && m && /* @__PURE__ */ d(E, { children: [m.parameters.length > 0 && /* @__PURE__ */ d("div", {
|
|
104
104
|
className: "studio-editor-query__group",
|
|
105
105
|
children: [/* @__PURE__ */ o("strong", { children: l.parameters }), m.parameters.map((n) => /* @__PURE__ */ d("label", { children: [/* @__PURE__ */ d("span", { children: [l.sourceFor(n.name), n.required ? " *" : ""] }), /* @__PURE__ */ d("select", {
|
|
106
106
|
value: M(t, n),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LayoutArrangement } from '
|
|
1
|
+
import { LayoutArrangement } from '../Layouts/LayoutArrangement';
|
|
2
2
|
import type { StructureTreeAdapter } from '../Structure/StructureTreeAdapter';
|
|
3
3
|
import type { DropRegion } from './DropRegion';
|
|
4
4
|
import { InsertionAxis } from './InsertionAxis';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export declare const inspectorWidth = 360;
|
|
3
|
+
export interface OverlaySize {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ScreenEditorOverlayFrameState {
|
|
8
|
+
size: OverlaySize;
|
|
9
|
+
setSize: (size: OverlaySize) => void;
|
|
10
|
+
isInspectorOpen: boolean;
|
|
11
|
+
toggleInspector: () => void;
|
|
12
|
+
close: () => void;
|
|
13
|
+
}
|
|
14
|
+
export interface ScreenEditorOverlayFrameProps {
|
|
15
|
+
sourceRect: DOMRect;
|
|
16
|
+
initialSize?: OverlaySize;
|
|
17
|
+
centerOffsetX?: number;
|
|
18
|
+
children: (state: ScreenEditorOverlayFrameState) => ReactNode;
|
|
19
|
+
renderInspector?: (state: ScreenEditorOverlayFrameState) => ReactNode;
|
|
20
|
+
canClose?: (size: OverlaySize) => Promise<boolean>;
|
|
21
|
+
onClosed: (size: OverlaySize) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const ScreenEditorOverlayFrame: ({ sourceRect, initialSize, centerOffsetX, children, renderInspector, canClose, onClosed }: ScreenEditorOverlayFrameProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface OverlayViewport {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
export interface FittedOverlay {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
offsetX: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const overlayMargin = 8;
|
|
11
|
+
export declare function fitOverlay(size: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}, viewport: OverlayViewport, requestedOffsetX: number): FittedOverlay;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FlowContainerKind } from '@cratis/scene.model';
|
|
2
|
-
import type { LayoutArrangement } from '
|
|
2
|
+
import type { LayoutArrangement } from './LayoutArrangement';
|
|
3
3
|
import type { LayoutItem } from './LayoutItem';
|
|
4
4
|
import type { PanelConstruct } from './PanelConstruct';
|
|
5
5
|
export interface LayoutCatalogEntry {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { LayoutArrangement } from './LayoutArrangement';
|
|
3
|
+
export interface LayoutContainerDescriptor {
|
|
4
|
+
type: string;
|
|
5
|
+
name: string;
|
|
6
|
+
arrangement: LayoutArrangement;
|
|
7
|
+
icon?: ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
|
-
import type { LayoutContainerDescriptor } from '
|
|
2
|
+
import type { LayoutContainerDescriptor } from './LayoutContainerDescriptor';
|
|
3
3
|
import type { LayoutCatalogEntry } from './LayoutCatalogEntry';
|
|
4
4
|
import type { LayoutItem } from './LayoutItem';
|
|
5
5
|
export type LayoutLabels = Record<LayoutItem, string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Panel } from '@cratis/scene.model';
|
|
2
|
-
import { LayoutArrangement } from '
|
|
2
|
+
import { LayoutArrangement } from '../Layouts/LayoutArrangement';
|
|
3
3
|
export declare function surfaceArrangementOfRoot(root: Panel | undefined): LayoutArrangement;
|
|
@@ -25,6 +25,8 @@ export * from './Defaults/defaultLayoutIcons';
|
|
|
25
25
|
export * from './Defaults/defaultPaletteIcons';
|
|
26
26
|
export * from './Defaults/defaultPaletteSources';
|
|
27
27
|
export * from './Layouts/LayoutItem';
|
|
28
|
+
export * from './Layouts/LayoutArrangement';
|
|
29
|
+
export * from './Layouts/LayoutContainerDescriptor';
|
|
28
30
|
export * from './Layouts/toLayoutContainerDescriptors';
|
|
29
31
|
export * from './Palette/buildPalette';
|
|
30
32
|
export * from './Actions/StateChangeSlice';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as s } from "./StructuredValueEditor-
|
|
1
|
+
import { t as s } from "./StructuredValueEditor-DUSATTWd.js";
|
|
2
2
|
import { jsx as u } from "react/jsx-runtime";
|
|
3
3
|
var p = ({ value: r, onChange: t, descriptor: e, context: i, disabled: d, id: o }) => /* @__PURE__ */ u(s, {
|
|
4
4
|
descriptor: e,
|
package/dist/screen-editor/{TemplatePropertyEditor-CDKWG7m1.js → TemplatePropertyEditor-JGA5uEfP.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as b, n as v, r as k, t as g } from "./toTemplateSources-
|
|
1
|
+
import { i as b, n as v, r as k, t as g } from "./toTemplateSources-Chd2UNJQ.js";
|
|
2
2
|
import { useMemo as y } from "react";
|
|
3
|
-
import { applicableTemplates as S } from "@cratis/scene.engine";
|
|
4
3
|
import { jsx as m } from "react/jsx-runtime";
|
|
4
|
+
import { applicableTemplates as S } from "@cratis/scene.engine";
|
|
5
5
|
var j = ({ value: o, onChange: i, context: p, disabled: c, id: d }) => {
|
|
6
6
|
const n = p.session?.environment, s = p.session?.screenStrings.properties.templates.picker, t = n?.runtime.bundles, a = n?.runtime.profile, l = n?.templateScope, u = y(() => S({ blueprints: g(t ?? []) }, v({
|
|
7
7
|
bundles: t ?? [],
|