@formicoidea/labre-core 0.32.0 → 0.33.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/dist/_pkgs/affine-block-attachment/attachment-block.js +1 -1
- package/dist/_pkgs/affine-block-callout/callout-block.js +1 -1
- package/dist/_pkgs/affine-block-code/code-block-inline.js +1 -1
- package/dist/_pkgs/affine-block-code/code-toolbar/config.js +3 -1
- package/dist/_pkgs/affine-block-code/code-toolbar/index.js +1 -1
- package/dist/_pkgs/affine-block-database/data-source.js +1 -2
- package/dist/_pkgs/affine-block-database/external-data-source.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +1 -1
- package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-service.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/utils.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +1 -1
- package/dist/_pkgs/affine-block-frame/frame-manager.js +3 -1
- package/dist/_pkgs/affine-block-frame/frame-tool.js +1 -1
- package/dist/_pkgs/affine-block-image/components/page-image-block.js +1 -1
- package/dist/_pkgs/affine-block-image/image-edgeless-block.js +1 -1
- package/dist/_pkgs/affine-block-list/utils/forward-delete.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/select-block.js +1 -1
- package/dist/_pkgs/affine-block-note/commands/select-blocks-between.js +1 -1
- package/dist/_pkgs/affine-block-note/move-block.js +1 -1
- package/dist/_pkgs/affine-block-paragraph/utils/forward-delete.js +2 -2
- package/dist/_pkgs/affine-block-paragraph/utils/merge-with-prev.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/utils/clipboard-utils.js +1 -1
- package/dist/_pkgs/affine-block-surface/adapters/markdown/element-adapter/type.js +1 -1
- package/dist/_pkgs/affine-block-surface/adapters/plain-text/element-adapter/type.js +1 -1
- package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +18 -3
- package/dist/_pkgs/affine-block-surface/element-model/index.js +12 -2
- package/dist/_pkgs/affine-block-surface/extensions/audit.js +23 -6
- package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +10 -5
- package/dist/_pkgs/affine-block-surface/extensions/editor-anchored-panel.js +2 -1
- package/dist/_pkgs/affine-block-surface/extensions/element-renderer.js +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/index.js +4 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.d.ts +172 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +393 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +306 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange.js +64 -0
- package/dist/_pkgs/affine-block-surface/extensions/map-quality-widget.js +61 -61
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.d.ts +248 -0
- package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.js +248 -0
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +78 -80
- package/dist/_pkgs/affine-block-surface/extensions/reading.js +2 -2
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.d.ts +107 -0
- package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +958 -0
- package/dist/_pkgs/affine-block-surface/extensions/validation.d.ts +809 -20
- package/dist/_pkgs/affine-block-surface/extensions/validation.js +1661 -50
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.d.ts +50 -6
- package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.js +129 -32
- package/dist/_pkgs/affine-block-surface/framework-background/def.d.ts +289 -0
- package/dist/_pkgs/affine-block-surface/framework-background/def.js +126 -1
- package/dist/_pkgs/affine-block-surface/framework-background/labels.d.ts +42 -2
- package/dist/_pkgs/affine-block-surface/framework-background/labels.js +80 -4
- package/dist/_pkgs/affine-block-surface/framework-background/renderer.js +172 -11
- package/dist/_pkgs/affine-block-surface/renderer/overlay.js +1 -1
- package/dist/_pkgs/affine-block-surface-ref/portal/note.js +2 -2
- package/dist/_pkgs/affine-block-table/commands.js +1 -1
- package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.js +1 -1
- package/dist/_pkgs/affine-components/embed-card-modal/embed-card-edit-modal.js +1 -1
- package/dist/_pkgs/affine-components/filterable-list/styles.js +1 -1
- package/dist/_pkgs/affine-components/peek/peekable.js +1 -1
- package/dist/_pkgs/affine-components/toolbar/index.d.ts +1 -0
- package/dist/_pkgs/affine-components/toolbar/index.js +1 -0
- package/dist/_pkgs/affine-components/toolbar/menu-button.js +1 -1
- package/dist/_pkgs/affine-components/toolbar/picker-menu.d.ts +55 -0
- package/dist/_pkgs/affine-components/toolbar/picker-menu.js +47 -0
- package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.js +2 -2
- package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.js +2 -2
- package/dist/_pkgs/affine-fragment-frame-panel/header/frames-setting-menu.js +1 -1
- package/dist/_pkgs/affine-fragment-outline/mobile-outline-panel.js +1 -1
- package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/connector-manager.js +7 -10
- package/dist/_pkgs/affine-gfx-connector/connector-tool.d.ts +19 -1
- package/dist/_pkgs/affine-gfx-connector/connector-tool.js +10 -2
- package/dist/_pkgs/affine-gfx-connector/connector-watcher.js +1 -4
- package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +2 -1
- package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.js +1 -3
- package/dist/_pkgs/affine-gfx-connector/element-renderer/index.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/element-renderer/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/adapter/markdown/index.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/adapter/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-mindmap/templates/index.js +583 -4
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-menu.js +23 -23
- package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-tool-button.js +5 -1
- package/dist/_pkgs/affine-gfx-mindmap/view/utils.js +1 -1
- package/dist/_pkgs/affine-gfx-note/overlay/overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-note/toolbar/note-senior-button.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/consts.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/draggable/shape-draggable.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/polygon.js +17 -9
- package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/utils.js +8 -3
- package/dist/_pkgs/affine-gfx-shape/element-view.js +19 -12
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon-drawing-overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/overlay/polygon-vertex-editing-overlay.js +12 -7
- package/dist/_pkgs/affine-gfx-shape/overlay/shape-overlay.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/polygon-tool.js +4 -2
- package/dist/_pkgs/affine-gfx-shape/shape-tool.js +1 -1
- package/dist/_pkgs/affine-gfx-shape/text/edgeless-shape-text-editor.js +1 -3
- package/dist/_pkgs/affine-gfx-template/builtin/other.js +66 -17
- package/dist/_pkgs/affine-gfx-template/toolbar/overlay-scrollbar.js +1 -1
- package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.js +1 -1
- package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +1 -1
- package/dist/_pkgs/affine-inline-link/command.js +1 -1
- package/dist/_pkgs/affine-inline-preset/command/format-block.js +1 -1
- package/dist/_pkgs/affine-inline-preset/command/format-native.js +2 -2
- package/dist/_pkgs/affine-inline-preset/command/format-text.js +1 -1
- package/dist/_pkgs/affine-inline-preset/inline-spec.js +1 -1
- package/dist/_pkgs/affine-inline-reference/reference-node/reference-node.js +1 -1
- package/dist/_pkgs/affine-model/elements/bpmn/node.d.ts +40 -7
- package/dist/_pkgs/affine-model/elements/bpmn/node.js +4 -2
- package/dist/_pkgs/affine-model/elements/bpmn/pool.d.ts +74 -17
- package/dist/_pkgs/affine-model/elements/bpmn/pool.js +55 -26
- package/dist/_pkgs/affine-model/elements/c4/board.d.ts +88 -0
- package/dist/_pkgs/affine-model/elements/c4/board.js +128 -0
- package/dist/_pkgs/affine-model/elements/c4/boundary.d.ts +63 -0
- package/dist/_pkgs/affine-model/elements/c4/boundary.js +134 -0
- package/dist/_pkgs/affine-model/elements/c4/index.d.ts +3 -0
- package/dist/_pkgs/affine-model/elements/c4/index.js +3 -0
- package/dist/_pkgs/affine-model/elements/c4/node.d.ts +97 -0
- package/dist/_pkgs/affine-model/elements/c4/node.js +130 -0
- package/dist/_pkgs/affine-model/elements/connector/connector.js +1 -1
- package/dist/_pkgs/affine-model/elements/context-map/context-map.d.ts +27 -0
- package/dist/_pkgs/affine-model/elements/context-map/context-map.js +94 -0
- package/dist/_pkgs/affine-model/elements/context-map/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/context-map/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/core-domain/core-domain.d.ts +34 -17
- package/dist/_pkgs/affine-model/elements/core-domain/core-domain.js +28 -26
- package/dist/_pkgs/affine-model/elements/event-storming/event-storming.d.ts +36 -0
- package/dist/_pkgs/affine-model/elements/event-storming/event-storming.js +103 -0
- package/dist/_pkgs/affine-model/elements/event-storming/index.d.ts +1 -0
- package/dist/_pkgs/affine-model/elements/event-storming/index.js +1 -0
- package/dist/_pkgs/affine-model/elements/index.d.ts +11 -0
- package/dist/_pkgs/affine-model/elements/index.js +3 -0
- package/dist/_pkgs/affine-model/elements/shape/api/polygon.js +2 -8
- package/dist/_pkgs/affine-shared/adapters/html/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/markdown/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/notion-html/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/notion-html/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/plain-text/block-adapter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/plain-text/delta-converter.js +1 -1
- package/dist/_pkgs/affine-shared/adapters/utils/color.js +5 -2
- package/dist/_pkgs/affine-shared/commands/model-crud/draft-selected-models.js +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/focus-block-end.js +1 -1
- package/dist/_pkgs/affine-shared/commands/selection/focus-block-start.js +1 -1
- package/dist/_pkgs/affine-shared/consts/index.d.ts +10 -0
- package/dist/_pkgs/affine-shared/consts/index.js +10 -0
- package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.d.ts +55 -0
- package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.js +35 -0
- package/dist/_pkgs/affine-shared/services/audit-service.d.ts +11 -0
- package/dist/_pkgs/affine-shared/services/command-usage-service.d.ts +31 -0
- package/dist/_pkgs/affine-shared/services/command-usage-service.js +109 -0
- package/dist/_pkgs/affine-shared/services/comment-service/block-comment-manager.js +1 -1
- package/dist/_pkgs/affine-shared/services/doc-display-meta-service.js +1 -1
- package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-config.js +1 -1
- package/dist/_pkgs/affine-shared/services/index.d.ts +2 -0
- package/dist/_pkgs/affine-shared/services/index.js +2 -0
- package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.js +2 -1
- package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +73 -1
- package/dist/_pkgs/affine-shared/services/toolbar-service/registry.d.ts +44 -0
- package/dist/_pkgs/affine-shared/services/toolbar-service/registry.js +161 -3
- package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.js +5 -3
- package/dist/_pkgs/affine-shared/test-utils/affine-template.js +1 -1
- package/dist/_pkgs/affine-shared/utils/edgeless.js +1 -1
- package/dist/_pkgs/affine-shared/utils/file/filesys.d.ts +34 -0
- package/dist/_pkgs/affine-shared/utils/file/filesys.js +48 -7
- package/dist/_pkgs/affine-shared/utils/zod-schema.js +1 -3
- package/dist/_pkgs/affine-widget-drag-handle/utils.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/index.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-dragging-area/edgeless-dragging-area-rect.js +1 -1
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.d.ts +14 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.js +40 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.d.ts +158 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +572 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.d.ts +46 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.js +66 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.d.ts +13 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.js +50 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.d.ts +6 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.js +15 -5
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.d.ts +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.js +2 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/extension/index.d.ts +7 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +4 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.d.ts +19 -0
- package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.js +51 -10
- package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +9 -0
- package/dist/_pkgs/affine-widget-keyboard-toolbar/keyboard-tool-panel.js +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/import-doc/import-doc.js +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/linked-doc-popover.js +1 -1
- package/dist/_pkgs/affine-widget-page-dragging-area/index.js +1 -1
- package/dist/_pkgs/affine-widget-remote-selection/doc/doc-remote-selection.js +1 -1
- package/dist/_pkgs/affine-widget-toolbar/toolbar.js +6 -2
- package/dist/_pkgs/affine-widget-toolbar/utils.js +6 -2
- package/dist/_pkgs/data-view/view-presets/calendar/pc/actions.js +8 -12
- package/dist/_pkgs/data-view/view-presets/calendar/pc/view.js +52 -40
- package/dist/_pkgs/data-view/view-presets/table/mobile/group.js +3 -1
- package/dist/_pkgs/data-view/view-presets/table/pc/group.js +3 -1
- package/dist/_pkgs/std/clipboard/utils.js +4 -1
- package/dist/_pkgs/std/extension/command-registry.d.ts +159 -5
- package/dist/_pkgs/std/extension/command-registry.js +202 -4
- package/dist/_pkgs/std/extension/shortcut.js +2 -1
- package/dist/_pkgs/std/gfx/grid.js +1 -1
- package/dist/_pkgs/std/gfx/index.d.ts +1 -1
- package/dist/_pkgs/std/gfx/model/surface/element-model.d.ts +160 -0
- package/dist/_pkgs/std/gfx/model/surface/element-model.js +75 -1
- package/dist/_pkgs/std/gfx/model/surface/role.js +5 -3
- package/dist/_pkgs/std/gfx/model/surface/surface-model.js +2 -1
- package/dist/_pkgs/std/gfx/selection.js +1 -1
- package/dist/_pkgs/std/gfx/viewport.js +1 -1
- package/dist/_pkgs/std/inline/extensions/inline-manager.js +1 -1
- package/dist/_pkgs/std/inline/extensions/markdown-matcher.js +1 -1
- package/dist/_pkgs/store/model/store/crud.js +4 -1
- package/dist/commands.js +1 -1
- package/dist/extensions/command-usage.d.ts +23 -0
- package/dist/extensions/command-usage.js +37 -0
- package/dist/extensions/view.js +12 -0
- package/dist/frameworks.js +32 -0
- package/dist/translations.js +90 -2
- package/package.json +1 -1
|
@@ -32,21 +32,27 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
35
|
+
import { field } from '../../../std/gfx/index.js';
|
|
36
|
+
import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
|
|
37
37
|
/**
|
|
38
38
|
* The Core Domain Chart background (DDD Crew): the two axes (Complexity ×
|
|
39
39
|
* Business differentiation) with their Low/High ticks and the translucent
|
|
40
40
|
* Generic / Supporting / Core zone bands. The user places sub-domain dots,
|
|
41
41
|
* movement arrows and the Notation legend on top of it.
|
|
42
42
|
*
|
|
43
|
-
*
|
|
44
|
-
* {@link
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* An INSTANCE of the framework-background primitive
|
|
44
|
+
* ({@link FrameworkBackgroundElementModel}): the geometry and the passive-canvas
|
|
45
|
+
* behaviour come from the primitive — which declares the very same
|
|
46
|
+
* `connectable` getter and the very same four geometry overrides this class
|
|
47
|
+
* used to spell out — and what the chart LOOKS like comes from the
|
|
48
|
+
* `CORE_DOMAIN_BACKGROUND` declaration in `@labre/affine-gfx-ddd-core-domain`.
|
|
49
|
+
*
|
|
50
|
+
* The fields below are the persisted document and are NOT the primitive's
|
|
51
|
+
* business: the base swap adds no field, renames none and changes no default,
|
|
52
|
+
* so a chart authored before it is byte-identical to one authored after.
|
|
47
53
|
*/
|
|
48
54
|
let CoreDomainChartElementModel = (() => {
|
|
49
|
-
let _classSuper =
|
|
55
|
+
let _classSuper = FrameworkBackgroundElementModel;
|
|
50
56
|
let _resizeEnabled_decorators;
|
|
51
57
|
let _resizeEnabled_initializers = [];
|
|
52
58
|
let _resizeEnabled_extraInitializers = [];
|
|
@@ -56,6 +62,9 @@ let CoreDomainChartElementModel = (() => {
|
|
|
56
62
|
let _showLabels_decorators;
|
|
57
63
|
let _showLabels_initializers = [];
|
|
58
64
|
let _showLabels_extraInitializers = [];
|
|
65
|
+
let _variant_decorators;
|
|
66
|
+
let _variant_initializers = [];
|
|
67
|
+
let _variant_extraInitializers = [];
|
|
59
68
|
let _rotate_decorators;
|
|
60
69
|
let _rotate_initializers = [];
|
|
61
70
|
let _rotate_extraInitializers = [];
|
|
@@ -68,11 +77,13 @@ let CoreDomainChartElementModel = (() => {
|
|
|
68
77
|
_resizeEnabled_decorators = [field(true)];
|
|
69
78
|
_showZones_decorators = [field(true)];
|
|
70
79
|
_showLabels_decorators = [field(true)];
|
|
80
|
+
_variant_decorators = [field('classic')];
|
|
71
81
|
_rotate_decorators = [field(0)];
|
|
72
82
|
_xywh_decorators = [field()];
|
|
73
83
|
__esDecorate(this, null, _resizeEnabled_decorators, { kind: "accessor", name: "resizeEnabled", static: false, private: false, access: { has: obj => "resizeEnabled" in obj, get: obj => obj.resizeEnabled, set: (obj, value) => { obj.resizeEnabled = value; } }, metadata: _metadata }, _resizeEnabled_initializers, _resizeEnabled_extraInitializers);
|
|
74
84
|
__esDecorate(this, null, _showZones_decorators, { kind: "accessor", name: "showZones", static: false, private: false, access: { has: obj => "showZones" in obj, get: obj => obj.showZones, set: (obj, value) => { obj.showZones = value; } }, metadata: _metadata }, _showZones_initializers, _showZones_extraInitializers);
|
|
75
85
|
__esDecorate(this, null, _showLabels_decorators, { kind: "accessor", name: "showLabels", static: false, private: false, access: { has: obj => "showLabels" in obj, get: obj => obj.showLabels, set: (obj, value) => { obj.showLabels = value; } }, metadata: _metadata }, _showLabels_initializers, _showLabels_extraInitializers);
|
|
86
|
+
__esDecorate(this, null, _variant_decorators, { kind: "accessor", name: "variant", static: false, private: false, access: { has: obj => "variant" in obj, get: obj => obj.variant, set: (obj, value) => { obj.variant = value; } }, metadata: _metadata }, _variant_initializers, _variant_extraInitializers);
|
|
76
87
|
__esDecorate(this, null, _rotate_decorators, { kind: "accessor", name: "rotate", static: false, private: false, access: { has: obj => "rotate" in obj, get: obj => obj.rotate, set: (obj, value) => { obj.rotate = value; } }, metadata: _metadata }, _rotate_initializers, _rotate_extraInitializers);
|
|
77
88
|
__esDecorate(this, null, _xywh_decorators, { kind: "accessor", name: "xywh", static: false, private: false, access: { has: obj => "xywh" in obj, get: obj => obj.xywh, set: (obj, value) => { obj.xywh = value; } }, metadata: _metadata }, _xywh_initializers, _xywh_extraInitializers);
|
|
78
89
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
@@ -80,24 +91,6 @@ let CoreDomainChartElementModel = (() => {
|
|
|
80
91
|
get type() {
|
|
81
92
|
return 'coreDomain';
|
|
82
93
|
}
|
|
83
|
-
get connectable() {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
containsBound(bounds) {
|
|
87
|
-
const points = getPointsFromBoundWithRotation(this);
|
|
88
|
-
return points.some(point => bounds.containsPoint(point));
|
|
89
|
-
}
|
|
90
|
-
getLineIntersections(start, end) {
|
|
91
|
-
const points = getPointsFromBoundWithRotation(this);
|
|
92
|
-
return linePolygonIntersects(start, end, points);
|
|
93
|
-
}
|
|
94
|
-
getNearestPoint(point) {
|
|
95
|
-
return polygonNearestPoint(Bound.deserialize(this.xywh).points, point);
|
|
96
|
-
}
|
|
97
|
-
includesPoint(x, y) {
|
|
98
|
-
const points = getPointsFromBoundWithRotation(this);
|
|
99
|
-
return pointInPolygon([x, y], points);
|
|
100
|
-
}
|
|
101
94
|
#resizeEnabled_accessor_storage = __runInitializers(this, _resizeEnabled_initializers, true);
|
|
102
95
|
get resizeEnabled() { return this.#resizeEnabled_accessor_storage; }
|
|
103
96
|
set resizeEnabled(value) { this.#resizeEnabled_accessor_storage = value; }
|
|
@@ -107,7 +100,16 @@ let CoreDomainChartElementModel = (() => {
|
|
|
107
100
|
#showLabels_accessor_storage = (__runInitializers(this, _showZones_extraInitializers), __runInitializers(this, _showLabels_initializers, true));
|
|
108
101
|
get showLabels() { return this.#showLabels_accessor_storage; }
|
|
109
102
|
set showLabels(value) { this.#showLabels_accessor_storage = value; }
|
|
110
|
-
#
|
|
103
|
+
#variant_accessor_storage = (__runInitializers(this, _showLabels_extraInitializers), __runInitializers(this, _variant_initializers, 'classic'));
|
|
104
|
+
/**
|
|
105
|
+
* A HARD default, on the Wardley `variant` pattern: `classic` is written into
|
|
106
|
+
* the Y.Map at creation and is also what an older chart — which carries no
|
|
107
|
+
* such key at all — reads back as. Both roads lead to the chart the user has
|
|
108
|
+
* always seen, so the field ships with no migration and no backfill.
|
|
109
|
+
*/
|
|
110
|
+
get variant() { return this.#variant_accessor_storage; }
|
|
111
|
+
set variant(value) { this.#variant_accessor_storage = value; }
|
|
112
|
+
#rotate_accessor_storage = (__runInitializers(this, _variant_extraInitializers), __runInitializers(this, _rotate_initializers, 0));
|
|
111
113
|
get rotate() { return this.#rotate_accessor_storage; }
|
|
112
114
|
set rotate(value) { this.#rotate_accessor_storage = value; }
|
|
113
115
|
#xywh_accessor_storage = (__runInitializers(this, _rotate_extraInitializers), __runInitializers(this, _xywh_initializers, '[0,0,900,820]'));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { SerializedXYWH } from '../../../global/gfx/index.js';
|
|
2
|
+
import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
|
|
3
|
+
import type { FrameworkBackgroundProps } from '../framework-background/index.js';
|
|
4
|
+
export type EventStormingBoardProps = FrameworkBackgroundProps;
|
|
5
|
+
/**
|
|
6
|
+
* The Event Storming board: the paper roll a Big Picture is stormed on.
|
|
7
|
+
*
|
|
8
|
+
* One axis and nothing else — TIME, running left to right along the bottom.
|
|
9
|
+
* That is the whole frame of reference Event Storming has: an event drawn to
|
|
10
|
+
* the left of another happened before it, and how HIGH a sticky sits means
|
|
11
|
+
* nothing at all (the vertical is where a workshop parks its unknowns, not a
|
|
12
|
+
* scale). Declaring the one axis and no zones is therefore the honest
|
|
13
|
+
* declaration, and it is what lets `es.against-timeline` say "this flow runs
|
|
14
|
+
* backwards" without inventing a second dimension nobody drew against.
|
|
15
|
+
*
|
|
16
|
+
* **Swimlanes are cut from v1** (plan § Coupes v1). A lane is a horizontal
|
|
17
|
+
* BAND with a name, which on this element would be a variant declaration
|
|
18
|
+
* (`variantProp: 'lanes'`) and a rule family that measures membership per lane.
|
|
19
|
+
* Neither exists yet, and shipping half of it — bands that paint but that no
|
|
20
|
+
* rule can read — would put a semantic on the vertical the framework does not
|
|
21
|
+
* have. The v2 note lives here so the day lanes land, the reason they were not
|
|
22
|
+
* here is on the record.
|
|
23
|
+
*
|
|
24
|
+
* Adds no field of its own beyond the primitive's `resizeEnabled`, so a board
|
|
25
|
+
* is byte-identical to what {@link FrameworkBackgroundElementModel} already
|
|
26
|
+
* persists. It is created 3200 × 1400 — a Big Picture is WIDE, because the
|
|
27
|
+
* timeline is the point — and freely resizable in both directions: the roll
|
|
28
|
+
* grows sideways all morning as events are remembered, and locking its
|
|
29
|
+
* proportion would fight the hand.
|
|
30
|
+
*/
|
|
31
|
+
export declare class EventStormingBoardElementModel extends FrameworkBackgroundElementModel<EventStormingBoardProps> {
|
|
32
|
+
get type(): string;
|
|
33
|
+
accessor resizeEnabled: boolean;
|
|
34
|
+
accessor rotate: number;
|
|
35
|
+
accessor xywh: SerializedXYWH;
|
|
36
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { field } from '../../../std/gfx/index.js';
|
|
36
|
+
import { FrameworkBackgroundElementModel } from '../framework-background/index.js';
|
|
37
|
+
/**
|
|
38
|
+
* The Event Storming board: the paper roll a Big Picture is stormed on.
|
|
39
|
+
*
|
|
40
|
+
* One axis and nothing else — TIME, running left to right along the bottom.
|
|
41
|
+
* That is the whole frame of reference Event Storming has: an event drawn to
|
|
42
|
+
* the left of another happened before it, and how HIGH a sticky sits means
|
|
43
|
+
* nothing at all (the vertical is where a workshop parks its unknowns, not a
|
|
44
|
+
* scale). Declaring the one axis and no zones is therefore the honest
|
|
45
|
+
* declaration, and it is what lets `es.against-timeline` say "this flow runs
|
|
46
|
+
* backwards" without inventing a second dimension nobody drew against.
|
|
47
|
+
*
|
|
48
|
+
* **Swimlanes are cut from v1** (plan § Coupes v1). A lane is a horizontal
|
|
49
|
+
* BAND with a name, which on this element would be a variant declaration
|
|
50
|
+
* (`variantProp: 'lanes'`) and a rule family that measures membership per lane.
|
|
51
|
+
* Neither exists yet, and shipping half of it — bands that paint but that no
|
|
52
|
+
* rule can read — would put a semantic on the vertical the framework does not
|
|
53
|
+
* have. The v2 note lives here so the day lanes land, the reason they were not
|
|
54
|
+
* here is on the record.
|
|
55
|
+
*
|
|
56
|
+
* Adds no field of its own beyond the primitive's `resizeEnabled`, so a board
|
|
57
|
+
* is byte-identical to what {@link FrameworkBackgroundElementModel} already
|
|
58
|
+
* persists. It is created 3200 × 1400 — a Big Picture is WIDE, because the
|
|
59
|
+
* timeline is the point — and freely resizable in both directions: the roll
|
|
60
|
+
* grows sideways all morning as events are remembered, and locking its
|
|
61
|
+
* proportion would fight the hand.
|
|
62
|
+
*/
|
|
63
|
+
let EventStormingBoardElementModel = (() => {
|
|
64
|
+
let _classSuper = FrameworkBackgroundElementModel;
|
|
65
|
+
let _resizeEnabled_decorators;
|
|
66
|
+
let _resizeEnabled_initializers = [];
|
|
67
|
+
let _resizeEnabled_extraInitializers = [];
|
|
68
|
+
let _rotate_decorators;
|
|
69
|
+
let _rotate_initializers = [];
|
|
70
|
+
let _rotate_extraInitializers = [];
|
|
71
|
+
let _xywh_decorators;
|
|
72
|
+
let _xywh_initializers = [];
|
|
73
|
+
let _xywh_extraInitializers = [];
|
|
74
|
+
return class EventStormingBoardElementModel extends _classSuper {
|
|
75
|
+
static {
|
|
76
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
77
|
+
_resizeEnabled_decorators = [field(true)];
|
|
78
|
+
_rotate_decorators = [field(0)];
|
|
79
|
+
_xywh_decorators = [field()];
|
|
80
|
+
__esDecorate(this, null, _resizeEnabled_decorators, { kind: "accessor", name: "resizeEnabled", static: false, private: false, access: { has: obj => "resizeEnabled" in obj, get: obj => obj.resizeEnabled, set: (obj, value) => { obj.resizeEnabled = value; } }, metadata: _metadata }, _resizeEnabled_initializers, _resizeEnabled_extraInitializers);
|
|
81
|
+
__esDecorate(this, null, _rotate_decorators, { kind: "accessor", name: "rotate", static: false, private: false, access: { has: obj => "rotate" in obj, get: obj => obj.rotate, set: (obj, value) => { obj.rotate = value; } }, metadata: _metadata }, _rotate_initializers, _rotate_extraInitializers);
|
|
82
|
+
__esDecorate(this, null, _xywh_decorators, { kind: "accessor", name: "xywh", static: false, private: false, access: { has: obj => "xywh" in obj, get: obj => obj.xywh, set: (obj, value) => { obj.xywh = value; } }, metadata: _metadata }, _xywh_initializers, _xywh_extraInitializers);
|
|
83
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
84
|
+
}
|
|
85
|
+
get type() {
|
|
86
|
+
return 'eventStorming';
|
|
87
|
+
}
|
|
88
|
+
#resizeEnabled_accessor_storage = __runInitializers(this, _resizeEnabled_initializers, true);
|
|
89
|
+
get resizeEnabled() { return this.#resizeEnabled_accessor_storage; }
|
|
90
|
+
set resizeEnabled(value) { this.#resizeEnabled_accessor_storage = value; }
|
|
91
|
+
#rotate_accessor_storage = (__runInitializers(this, _resizeEnabled_extraInitializers), __runInitializers(this, _rotate_initializers, 0));
|
|
92
|
+
get rotate() { return this.#rotate_accessor_storage; }
|
|
93
|
+
set rotate(value) { this.#rotate_accessor_storage = value; }
|
|
94
|
+
#xywh_accessor_storage = (__runInitializers(this, _rotate_extraInitializers), __runInitializers(this, _xywh_initializers, '[0,0,3200,1400]'));
|
|
95
|
+
get xywh() { return this.#xywh_accessor_storage; }
|
|
96
|
+
set xywh(value) { this.#xywh_accessor_storage = value; }
|
|
97
|
+
constructor() {
|
|
98
|
+
super(...arguments);
|
|
99
|
+
__runInitializers(this, _xywh_extraInitializers);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
})();
|
|
103
|
+
export { EventStormingBoardElementModel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './event-storming.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './event-storming.js';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { EdgelessTextBlockModel } from '../blocks/edgeless-text/edgeless-text-model.js';
|
|
2
2
|
import type { BpmnNodeElementModel, BpmnPoolElementModel } from './bpmn/index.js';
|
|
3
3
|
import type { BrushElementModel } from './brush/index.js';
|
|
4
|
+
import type { C4BoardElementModel, C4BoundaryElementModel, C4NodeElementModel } from './c4/index.js';
|
|
4
5
|
import type { ConnectorElementModel } from './connector/index.js';
|
|
6
|
+
import type { ContextMapBoardElementModel } from './context-map/index.js';
|
|
5
7
|
import type { CoreDomainChartElementModel } from './core-domain/index.js';
|
|
8
|
+
import type { EventStormingBoardElementModel } from './event-storming/index.js';
|
|
6
9
|
import type { EdgyBoardElementModel, EdgyFacetsElementModel, EdgyNodeElementModel } from './edgy/index.js';
|
|
7
10
|
import type { CynefinElementModel } from './cynefin/index.js';
|
|
8
11
|
import type { EstuarineElementModel } from './estuarine/index.js';
|
|
@@ -14,11 +17,14 @@ import type { TextElementModel } from './text/index.js';
|
|
|
14
17
|
import type { WardleyBackgroundElementModel, WardleyNodeElementModel } from './wardley/index.js';
|
|
15
18
|
export * from './bpmn/index.js';
|
|
16
19
|
export * from './brush/index.js';
|
|
20
|
+
export * from './c4/index.js';
|
|
17
21
|
export * from './connector/index.js';
|
|
22
|
+
export * from './context-map/index.js';
|
|
18
23
|
export * from './core-domain/index.js';
|
|
19
24
|
export * from './cynefin/index.js';
|
|
20
25
|
export * from './edgy/index.js';
|
|
21
26
|
export * from './estuarine/index.js';
|
|
27
|
+
export * from './event-storming/index.js';
|
|
22
28
|
export * from './framework-background/index.js';
|
|
23
29
|
export * from './group/index.js';
|
|
24
30
|
export * from './highlighter/index.js';
|
|
@@ -30,6 +36,9 @@ export type SurfaceElementModelMap = {
|
|
|
30
36
|
bpmnNode: BpmnNodeElementModel;
|
|
31
37
|
bpmnPool: BpmnPoolElementModel;
|
|
32
38
|
brush: BrushElementModel;
|
|
39
|
+
c4Board: C4BoardElementModel;
|
|
40
|
+
c4Boundary: C4BoundaryElementModel;
|
|
41
|
+
c4Node: C4NodeElementModel;
|
|
33
42
|
highlighter: HighlighterElementModel;
|
|
34
43
|
connector: ConnectorElementModel;
|
|
35
44
|
group: GroupElementModel;
|
|
@@ -44,6 +53,8 @@ export type SurfaceElementModelMap = {
|
|
|
44
53
|
cynefin: CynefinElementModel;
|
|
45
54
|
estuarine: EstuarineElementModel;
|
|
46
55
|
coreDomain: CoreDomainChartElementModel;
|
|
56
|
+
contextMap: ContextMapBoardElementModel;
|
|
57
|
+
eventStorming: EventStormingBoardElementModel;
|
|
47
58
|
};
|
|
48
59
|
export type SurfaceTextModelMap = {
|
|
49
60
|
text: TextElementModel;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export * from './bpmn/index.js';
|
|
2
2
|
export * from './brush/index.js';
|
|
3
|
+
export * from './c4/index.js';
|
|
3
4
|
export * from './connector/index.js';
|
|
5
|
+
export * from './context-map/index.js';
|
|
4
6
|
export * from './core-domain/index.js';
|
|
5
7
|
export * from './cynefin/index.js';
|
|
6
8
|
export * from './edgy/index.js';
|
|
7
9
|
export * from './estuarine/index.js';
|
|
10
|
+
export * from './event-storming/index.js';
|
|
8
11
|
export * from './framework-background/index.js';
|
|
9
12
|
export * from './group/index.js';
|
|
10
13
|
export * from './highlighter/index.js';
|
|
@@ -213,14 +213,8 @@ function pointOnBezierGeometry(element, px, py, hitThreshold) {
|
|
|
213
213
|
const mt2 = mt * mt;
|
|
214
214
|
const t2 = t * t;
|
|
215
215
|
// Cubic Bezier: B(t) = (1-t)^3*P0 + 3(1-t)^2*t*P1 + 3(1-t)*t^2*P2 + t^3*P3
|
|
216
|
-
const bx = mt2 * mt * cx +
|
|
217
|
-
|
|
218
|
-
3 * mt * t2 * cp2x +
|
|
219
|
-
t2 * t * nx;
|
|
220
|
-
const by = mt2 * mt * cy +
|
|
221
|
-
3 * mt2 * t * cp1y +
|
|
222
|
-
3 * mt * t2 * cp2y +
|
|
223
|
-
t2 * t * ny;
|
|
216
|
+
const bx = mt2 * mt * cx + 3 * mt2 * t * cp1x + 3 * mt * t2 * cp2x + t2 * t * nx;
|
|
217
|
+
const by = mt2 * mt * cy + 3 * mt2 * t * cp1y + 3 * mt * t2 * cp2y + t2 * t * ny;
|
|
224
218
|
const dbx = px - bx;
|
|
225
219
|
const dby = py - by;
|
|
226
220
|
if (dbx * dbx + dby * dby <= hitDistSq)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
export const BlockHtmlAdapterMatcherIdentifier = createIdentifier('BlockHtmlAdapterMatcher');
|
|
3
3
|
export function BlockHtmlAdapterExtension(matcher) {
|
|
4
4
|
const identifier = BlockHtmlAdapterMatcherIdentifier(matcher.flavour);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
export const BlockMarkdownAdapterMatcherIdentifier = createIdentifier('BlockMarkdownAdapterMatcher');
|
|
3
3
|
export function BlockMarkdownAdapterExtension(matcher) {
|
|
4
4
|
const identifier = BlockMarkdownAdapterMatcherIdentifier(matcher.flavour);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
import rehypeParse from 'rehype-parse';
|
|
3
3
|
import { unified } from 'unified';
|
|
4
4
|
import { rehypeInlineToBlock, rehypeWrapInlineElements, } from '../html/rehype-plugins/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
export const BlockNotionHtmlAdapterMatcherIdentifier = createIdentifier('BlockNotionHtmlAdapterMatcher');
|
|
3
3
|
export function BlockNotionHtmlAdapterExtension(matcher) {
|
|
4
4
|
const identifier = BlockNotionHtmlAdapterMatcherIdentifier(matcher.flavour);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
import isEqual from 'lodash-es/isEqual.js';
|
|
3
3
|
import { DeltaASTConverter, } from '../types/delta-converter.js';
|
|
4
4
|
export const NotionHtmlASTToDeltaMatcherIdentifier = createIdentifier('NotionHtmlASTToDeltaMatcher');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
export const BlockPlainTextAdapterMatcherIdentifier = createIdentifier('BlockPlainTextAdapterMatcher');
|
|
3
3
|
export function BlockPlainTextAdapterExtension(matcher) {
|
|
4
4
|
const identifier = BlockPlainTextAdapterMatcherIdentifier(matcher.flavour);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createIdentifier
|
|
1
|
+
import { createIdentifier } from '../../../global/di/index.js';
|
|
2
2
|
import { DeltaASTConverter, } from '../types/delta-converter.js';
|
|
3
3
|
export const InlineDeltaToPlainTextAdapterMatcherIdentifier = createIdentifier('InlineDeltaToPlainTextAdapterMatcher');
|
|
4
4
|
export function InlineDeltaToPlainTextAdapterExtension(matcher) {
|
|
@@ -56,7 +56,9 @@ const parseHex = (value) => {
|
|
|
56
56
|
const hex = value.slice(1);
|
|
57
57
|
if (!/^[0-9a-f]+$/i.test(hex))
|
|
58
58
|
return null;
|
|
59
|
-
const expand = (part) => part.length === 1
|
|
59
|
+
const expand = (part) => part.length === 1
|
|
60
|
+
? Number.parseInt(part + part, 16)
|
|
61
|
+
: Number.parseInt(part, 16);
|
|
60
62
|
const size = hex.length === 3 || hex.length === 4 ? 1 : 2;
|
|
61
63
|
if (hex.length !== size * 3 && hex.length !== size * 4)
|
|
62
64
|
return null;
|
|
@@ -234,7 +236,8 @@ export const resolveNearestSupportedColor = (color) => {
|
|
|
234
236
|
const target = rgbToOklab(parsed);
|
|
235
237
|
const achromatic = target.chroma < ACHROMATIC_CHROMA_THRESHOLD;
|
|
236
238
|
if (achromatic &&
|
|
237
|
-
(target.l < DEFAULT_TEXT_LIGHTNESS_MIN ||
|
|
239
|
+
(target.l < DEFAULT_TEXT_LIGHTNESS_MIN ||
|
|
240
|
+
target.l > DEFAULT_TEXT_LIGHTNESS_MAX)) {
|
|
238
241
|
return null;
|
|
239
242
|
}
|
|
240
243
|
let nearest;
|
|
@@ -4,6 +4,16 @@ export declare const EDGELESS_BLOCK_CHILD_PADDING = 24;
|
|
|
4
4
|
export declare const EDGELESS_BLOCK_CHILD_BORDER_WIDTH = 2;
|
|
5
5
|
export declare const PAGE_HEADER_HEIGHT = 53;
|
|
6
6
|
export declare const EMBED_CARD_MIN_WIDTH = 450;
|
|
7
|
+
/**
|
|
8
|
+
* The smallest a thing you TAP may be, in CSS pixels.
|
|
9
|
+
*
|
|
10
|
+
* 44 is the figure both platform guidelines settle on (WCAG 2.2's target-size
|
|
11
|
+
* criterion asks for 24, which is a floor for a mouse, not a finger). Labre's
|
|
12
|
+
* boards are worked on a tablet in a workshop as often as on a laptop, so any
|
|
13
|
+
* list a user picks from — the artefact catalogue's rows are the first — sizes
|
|
14
|
+
* its rows from here rather than from whatever looked right in a screenshot.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TOUCH_TARGET_MIN_PX = 44;
|
|
7
17
|
export declare const EMBED_CARD_WIDTH: Record<EmbedCardStyle, number>;
|
|
8
18
|
export declare const EMBED_CARD_HEIGHT: Record<EmbedCardStyle, number>;
|
|
9
19
|
export declare const EMBED_BLOCK_FLAVOUR_LIST: readonly ["affine:embed-github", "affine:embed-youtube", "affine:embed-figma", "affine:embed-linked-doc", "affine:embed-synced-doc", "affine:embed-html", "affine:embed-loom"];
|
|
@@ -6,6 +6,16 @@ export const EDGELESS_BLOCK_CHILD_BORDER_WIDTH = 2;
|
|
|
6
6
|
// In AFFiNE, to avoid the option element to be covered by the header, we need to reserve the space for the header
|
|
7
7
|
export const PAGE_HEADER_HEIGHT = 53;
|
|
8
8
|
export const EMBED_CARD_MIN_WIDTH = 450;
|
|
9
|
+
/**
|
|
10
|
+
* The smallest a thing you TAP may be, in CSS pixels.
|
|
11
|
+
*
|
|
12
|
+
* 44 is the figure both platform guidelines settle on (WCAG 2.2's target-size
|
|
13
|
+
* criterion asks for 24, which is a floor for a mouse, not a finger). Labre's
|
|
14
|
+
* boards are worked on a tablet in a workshop as often as on a laptop, so any
|
|
15
|
+
* list a user picks from — the artefact catalogue's rows are the first — sizes
|
|
16
|
+
* its rows from here rather than from whatever looked right in a screenshot.
|
|
17
|
+
*/
|
|
18
|
+
export const TOUCH_TARGET_MIN_PX = 44;
|
|
9
19
|
export const EMBED_CARD_WIDTH = {
|
|
10
20
|
horizontal: 752,
|
|
11
21
|
horizontalThin: 752,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { CommandOwner } from '../../std/index.js';
|
|
2
|
+
import type { ExtensionType } from '../../store/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Consumer 2 of `docs/adr/0008`: the "more artefacts" sidepanel, which shows an
|
|
5
|
+
* owner's WHOLE `'catalogue'` surface by sub-category once its senior sub-menu
|
|
6
|
+
* has stopped being able to.
|
|
7
|
+
*
|
|
8
|
+
* The seam had to exist before either end of it, because the senior menu is
|
|
9
|
+
* what opens it — `selectSeniorMenuCommands` reports an overflow, the menu
|
|
10
|
+
* grows a trailing button, and that button needs somewhere to send the click.
|
|
11
|
+
* The library now ships the panel that answers by default
|
|
12
|
+
* (`edgeless-artefact-catalogue-widget`, registered next to the toolbar
|
|
13
|
+
* widget), and the menu still renders the button only when this provider
|
|
14
|
+
* answers — so an assembly that overrode the provider away shows no control
|
|
15
|
+
* that opens nothing.
|
|
16
|
+
*
|
|
17
|
+
* The contract is two verbs on purpose. Everything the panel needs to draw
|
|
18
|
+
* itself is already enumerable from the command registry
|
|
19
|
+
* (`getCommandsForSurface(std, owner, 'catalogue')`), so the seam carries the
|
|
20
|
+
* OWNER and nothing else — no list of entries, no open state, no rendering.
|
|
21
|
+
* That is what lets the two implementations be genuinely different things: the
|
|
22
|
+
* library's own left sidepanel, and a host's existing right-hand sidebar.
|
|
23
|
+
*/
|
|
24
|
+
export interface ArtefactCatalogueService {
|
|
25
|
+
/** Show the catalogue, scoped to one framework's artefacts. */
|
|
26
|
+
open(owner: CommandOwner): void;
|
|
27
|
+
/** Put it away. Never touches the active senior tool. */
|
|
28
|
+
close(): void;
|
|
29
|
+
}
|
|
30
|
+
export declare const ArtefactCatalogueProvider: import("../../global/di/types.js").ServiceIdentifier<ArtefactCatalogueService> & (<U extends ArtefactCatalogueService = ArtefactCatalogueService>(variant: import("../../global/di/types.js").ServiceVariant) => import("../../global/di/types.js").ServiceIdentifier<U>);
|
|
31
|
+
/**
|
|
32
|
+
* Host override seam: replace the library's sidepanel with the host's own —
|
|
33
|
+
* or switch the catalogue off entirely.
|
|
34
|
+
*
|
|
35
|
+
* **Replace** — a host that already owns a sidebar (a right-hand inspector, a
|
|
36
|
+
* docked panel, a mobile sheet) registers this extension, its implementation
|
|
37
|
+
* answers {@link ArtefactCatalogueProvider}, and the library's widget is then
|
|
38
|
+
* never asked to open: the sub-menu's "More artefacts…" entry resolves ONE
|
|
39
|
+
* service, and `di.override` decides which. The host's own UI draws itself
|
|
40
|
+
* from the registry (`getCommandsForSurface(std, owner, 'catalogue')`,
|
|
41
|
+
* `getCommandIcon`) and creates through the one bottleneck
|
|
42
|
+
* (`runCommand(std, command, { surface: 'catalogue', … })`), so telemetry and
|
|
43
|
+
* the usage measure keep flowing wherever the pixels live.
|
|
44
|
+
*
|
|
45
|
+
* **Disable** — pass `null`. The provider then answers nothing, and every
|
|
46
|
+
* consumer reads that the honest way: the sub-menu's "More artefacts…" button
|
|
47
|
+
* is not rendered (a control that opens nothing is a lie), and the library's
|
|
48
|
+
* panel never opens. This is a cold-assembly switch, like the framework flags:
|
|
49
|
+
* decided when the editor is put together, not toggled mid-session.
|
|
50
|
+
*
|
|
51
|
+
* Mirrors `CommandUsageExtension` / `KeymapOverrideExtension`: `di.override`,
|
|
52
|
+
* so a host registering after the library's own extensions always wins,
|
|
53
|
+
* whatever the registration order turns out to be.
|
|
54
|
+
*/
|
|
55
|
+
export declare function ArtefactCatalogueExtension(service: ArtefactCatalogueService | null): ExtensionType;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createIdentifier } from '../../global/di/index.js';
|
|
2
|
+
export const ArtefactCatalogueProvider = createIdentifier('AffineArtefactCatalogue');
|
|
3
|
+
/**
|
|
4
|
+
* Host override seam: replace the library's sidepanel with the host's own —
|
|
5
|
+
* or switch the catalogue off entirely.
|
|
6
|
+
*
|
|
7
|
+
* **Replace** — a host that already owns a sidebar (a right-hand inspector, a
|
|
8
|
+
* docked panel, a mobile sheet) registers this extension, its implementation
|
|
9
|
+
* answers {@link ArtefactCatalogueProvider}, and the library's widget is then
|
|
10
|
+
* never asked to open: the sub-menu's "More artefacts…" entry resolves ONE
|
|
11
|
+
* service, and `di.override` decides which. The host's own UI draws itself
|
|
12
|
+
* from the registry (`getCommandsForSurface(std, owner, 'catalogue')`,
|
|
13
|
+
* `getCommandIcon`) and creates through the one bottleneck
|
|
14
|
+
* (`runCommand(std, command, { surface: 'catalogue', … })`), so telemetry and
|
|
15
|
+
* the usage measure keep flowing wherever the pixels live.
|
|
16
|
+
*
|
|
17
|
+
* **Disable** — pass `null`. The provider then answers nothing, and every
|
|
18
|
+
* consumer reads that the honest way: the sub-menu's "More artefacts…" button
|
|
19
|
+
* is not rendered (a control that opens nothing is a lie), and the library's
|
|
20
|
+
* panel never opens. This is a cold-assembly switch, like the framework flags:
|
|
21
|
+
* decided when the editor is put together, not toggled mid-session.
|
|
22
|
+
*
|
|
23
|
+
* Mirrors `CommandUsageExtension` / `KeymapOverrideExtension`: `di.override`,
|
|
24
|
+
* so a host registering after the library's own extensions always wins,
|
|
25
|
+
* whatever the registration order turns out to be.
|
|
26
|
+
*/
|
|
27
|
+
export function ArtefactCatalogueExtension(service) {
|
|
28
|
+
return {
|
|
29
|
+
setup: di => {
|
|
30
|
+
// `null` rides through the factory on purpose: `getOptional` then
|
|
31
|
+
// reports the catalogue as absent, which is the whole disable story.
|
|
32
|
+
di.override(ArtefactCatalogueProvider, () => service);
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -65,6 +65,17 @@ export interface AuditAxisFact {
|
|
|
65
65
|
*/
|
|
66
66
|
export interface AuditZoneFact {
|
|
67
67
|
id: string;
|
|
68
|
+
/**
|
|
69
|
+
* The user's own wording, when the zone is one THIS frame declares rather
|
|
70
|
+
* than one the framework does — a BPMN pool's lanes. Namespaced ids keep the
|
|
71
|
+
* two apart (`lane:sales` against `product`), and the name is what makes an
|
|
72
|
+
* instance zone worth reporting at all: `lane:2` says nothing to an assistant,
|
|
73
|
+
* "Facturation" says what the band is for.
|
|
74
|
+
*
|
|
75
|
+
* Absent on every framework zone, whose meaning is the framework's and whose
|
|
76
|
+
* wording is the host's to translate.
|
|
77
|
+
*/
|
|
78
|
+
name?: string;
|
|
68
79
|
rect: {
|
|
69
80
|
x: number;
|
|
70
81
|
y: number;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type CommandUsageStore } from '../../std/index.js';
|
|
2
|
+
import type { ExtensionType } from '../../store/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Where `createLocalCommandUsageStore` persists. Namespaced like the rest of
|
|
5
|
+
* Labre's browser-local state, and versionless on purpose: the shape is two
|
|
6
|
+
* numbers per command, and a reader that does not recognise an entry drops it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const COMMAND_USAGE_KEY = "labre:command-usage";
|
|
9
|
+
/**
|
|
10
|
+
* The default {@link CommandUsageStore}: recency and frequency in this
|
|
11
|
+
* browser's `localStorage`, per command id.
|
|
12
|
+
*
|
|
13
|
+
* It measures only. Nothing ranks anything here — PF6's "seven most-recent +
|
|
14
|
+
* six most-used" sub-menu reads these numbers, and a host that
|
|
15
|
+
* wants the measure to follow the user across devices replaces the whole store
|
|
16
|
+
* through {@link CommandUsageExtension}.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createLocalCommandUsageStore(): CommandUsageStore;
|
|
19
|
+
/**
|
|
20
|
+
* Host override seam: replace the browser-local measure with the host's own.
|
|
21
|
+
*
|
|
22
|
+
* This is where a host persists command usage in ITS database — so the ranking
|
|
23
|
+
* follows the user from laptop to browser to tablet instead of restarting at
|
|
24
|
+
* zero, which is exactly what a "most-used" sub-menu is judged on. The library
|
|
25
|
+
* ships the local store as the default (`CommandUsageViewExtension`) and never
|
|
26
|
+
* requires a host to care.
|
|
27
|
+
*
|
|
28
|
+
* Mirrors `EditorSettingExtension` / `KeymapOverrideExtension`: `di.override`,
|
|
29
|
+
* so a host registering after the library's own extensions always wins.
|
|
30
|
+
*/
|
|
31
|
+
export declare function CommandUsageExtension(store: CommandUsageStore): ExtensionType;
|