@ddd-tool/domain-designer-ui-component 0.0.0-alpha.9 → 0.1.0-beta.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/README.md CHANGED
@@ -1,7 +1,5 @@
1
- # 目标成为 ddd 建模的生产力工具
1
+ # Domain Designer - UI Component
2
2
 
3
3
  ## 试试效果
4
4
 
5
5
  <a href="https://stackblitz.com/~/github.com/ddd-tool/vue-domain-ui?file=src/views/design.ts" target="_blank">在线演示地址</a>
6
-
7
- - 推荐安装 Vue 插件
package/UI.vue.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { DomainDesigner } from '@ddd-tool/domain-designer-core';
1
+ import { type DomainDesigner } from '@ddd-tool/domain-designer-core';
2
2
  export type NonEmptyObject<T extends object> = keyof T extends never ? never : T;
3
3
  interface Props {
4
4
  designs: NonEmptyObject<Record<string, DomainDesigner>>;
package/common.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare function throttle<T extends (...args: any[]) => any>(func: T, wait: number): T;
2
+ export declare function getOSType(): 'Windows Phone' | 'Windows' | 'Android' | 'Linux' | 'iOS' | 'MacOS' | 'Unknown OS';
@@ -1,16 +1,37 @@
1
- declare function __VLS_template(): {
2
- attrs: Partial<{}>;
3
- slots: {
4
- default?(_: {}): any;
5
- };
6
- refs: {};
7
- rootEl: HTMLDivElement;
8
- };
9
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
- declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
11
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
1
+ declare const position: import("vue").Ref<{
2
+ x: number;
3
+ y: number;
4
+ }, {
5
+ x: number;
6
+ y: number;
7
+ } | {
8
+ x: number;
9
+ y: number;
10
+ }>;
11
+ declare const containerRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
12
+ declare const cursor: import("vue").Ref<string, string>;
13
+ declare const scale: import("vue").Ref<number, number>;
14
+ declare const onMouseDown: (e: MouseEvent) => void;
15
+ declare const onMouseMove: (e: MouseEvent) => void;
16
+ declare const onMouseUp: (_: MouseEvent) => void;
17
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
18
+ declare var __VLS_1: {};
19
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ }>;
22
+ declare const __VLS_self: import("vue").DefineComponent<{}, {
23
+ position: typeof position;
24
+ containerRef: typeof containerRef;
25
+ cursor: typeof cursor;
26
+ scale: typeof scale;
27
+ onMouseDown: typeof onMouseDown;
28
+ onMouseMove: typeof onMouseMove;
29
+ onMouseUp: typeof onMouseUp;
30
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
31
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
12
33
  export default _default;
13
- type __VLS_WithTemplateSlots<T, S> = T & {
34
+ type __VLS_WithSlots<T, S> = T & {
14
35
  new (): {
15
36
  $slots: S;
16
37
  };
@@ -0,0 +1,7 @@
1
+ import type { NodeLike } from '#lib/domain/common';
2
+ interface Props {
3
+ node: NodeLike;
4
+ element: HTMLElement;
5
+ }
6
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { DomainDesignInfo, DomainDesignInfoType } from '@ddd-tool/domain-designer-core';
1
+ import type { DomainDesignNote, DomainDesignInfo, DomainDesignObject, DomainDesignInfoType } from '@ddd-tool/domain-designer-core';
2
2
  export declare const RULES: readonly ["Command", "FacadeCommand", "Event", "Agg", "ReadModel"];
3
3
  export type ClassNodeLike = {
4
4
  _attributes: {
@@ -8,11 +8,13 @@ export type ClassNodeLike = {
8
8
  inner: Record<string, DomainDesignInfo<DomainDesignInfoType, string>>;
9
9
  };
10
10
  export declare function isClassNodeLike(node: any): node is ClassNodeLike;
11
- export type NodeLike = {
12
- _attributes: {
11
+ export interface NodeLike extends DomainDesignObject {
12
+ readonly _attributes: {
13
13
  __id: string;
14
- rule: string;
14
+ rule: (typeof RULES)[number];
15
15
  name: string;
16
+ note?: DomainDesignNote;
16
17
  };
17
- };
18
+ inner?: Record<string, any>;
19
+ }
18
20
  export declare function isNodeLike(node: any): node is NodeLike;