@dineug/erd-editor 4.0.0 → 4.1.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 (102) hide show
  1. package/README.md +93 -280
  2. package/dist/components/erd/canvas/DiffOutline.template.d.ts +14 -0
  3. package/dist/components/erd/canvas/sceneTokens.d.ts +2 -0
  4. package/dist/components/erd/diff-viewer/diff-tree/DiffTree.d.ts +19 -0
  5. package/dist/components/erd/diff-viewer/diff-tree/DiffTree.styles.d.ts +12 -0
  6. package/dist/components/erd/diff-viewer/diff-tree/diffTreeModel.d.ts +49 -0
  7. package/dist/components/erd/diff-viewer/diff.d.ts +21 -19
  8. package/dist/components/erd/draw-target/placePill.d.ts +1 -3
  9. package/dist/components/erd/floating-toolbar/FloatingToolbar.d.ts +7 -4
  10. package/dist/components/erd/goToErdTarget.d.ts +40 -16
  11. package/dist/components/erd/relationshipHighlight.d.ts +18 -0
  12. package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.styles.d.ts +5 -0
  13. package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +7 -3
  14. package/dist/components/erd-editor/ErdEditor.styles.d.ts +4 -0
  15. package/dist/components/erd-editor/viewportLayout.d.ts +52 -0
  16. package/dist/components/explorer/Explorer.d.ts +12 -0
  17. package/dist/components/explorer/explorer-controller/ExplorerController.d.ts +11 -0
  18. package/dist/components/explorer/explorer-panel/ExplorerPanel.d.ts +14 -0
  19. package/dist/components/explorer/explorer-panel/ExplorerPanel.styles.d.ts +13 -0
  20. package/dist/components/explorer/explorer-search/ExplorerSearch.d.ts +12 -0
  21. package/dist/components/explorer/explorer-search/ExplorerSearch.styles.d.ts +13 -0
  22. package/dist/components/explorer/explorerCommands.d.ts +28 -0
  23. package/dist/components/explorer/explorerNavigation.d.ts +14 -0
  24. package/dist/components/explorer/explorerSearch.d.ts +71 -0
  25. package/dist/components/explorer/explorerTree.d.ts +90 -0
  26. package/dist/components/explorer/explorerView.d.ts +54 -0
  27. package/dist/components/{find-replace → explorer}/matchTarget.d.ts +5 -7
  28. package/dist/components/primitives/icon/icons.d.ts +8 -4
  29. package/dist/components/primitives/sash/Sash.d.ts +1 -0
  30. package/dist/components/primitives/tree/Tree.d.ts +30 -0
  31. package/dist/components/primitives/tree/Tree.styles.d.ts +5 -0
  32. package/dist/components/primitives/tree/treeModel.d.ts +42 -0
  33. package/dist/components/quick-search/QuickSearch.styles.d.ts +1 -0
  34. package/dist/components/quick-search/actions.d.ts +0 -3
  35. package/dist/components/quick-search/paletteList.d.ts +7 -0
  36. package/dist/components/quick-search/scopedActions.d.ts +5 -11
  37. package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +3 -3
  38. package/dist/components/toolbar/Toolbar.styles.d.ts +0 -1
  39. package/dist/constants/layout.d.ts +7 -1
  40. package/dist/constants/open.d.ts +0 -1
  41. package/dist/engine/index.js +7 -7
  42. package/dist/erd-editor.umd.js +1008 -786
  43. package/dist/i18n/messages/ar-SA.d.ts +41 -15
  44. package/dist/i18n/messages/de-DE.d.ts +41 -11
  45. package/dist/i18n/messages/en/code.d.ts +0 -1
  46. package/dist/i18n/messages/en/common.d.ts +0 -1
  47. package/dist/i18n/messages/en/explorer.d.ts +37 -0
  48. package/dist/i18n/messages/en/findReplace.d.ts +5 -1
  49. package/dist/i18n/messages/en/index.d.ts +42 -12
  50. package/dist/i18n/messages/en/palette.d.ts +1 -7
  51. package/dist/i18n/messages/en/shortcuts.d.ts +3 -1
  52. package/dist/i18n/messages/en/toolbar.d.ts +0 -1
  53. package/dist/i18n/messages/es-ES.d.ts +41 -12
  54. package/dist/i18n/messages/eu-ES.d.ts +41 -11
  55. package/dist/i18n/messages/fa-IR.d.ts +41 -11
  56. package/dist/i18n/messages/fr-FR.d.ts +41 -12
  57. package/dist/i18n/messages/he-IL.d.ts +41 -12
  58. package/dist/i18n/messages/id-ID.d.ts +41 -10
  59. package/dist/i18n/messages/it-IT.d.ts +41 -12
  60. package/dist/i18n/messages/ja-JP.d.ts +41 -10
  61. package/dist/i18n/messages/ko-KR.d.ts +41 -10
  62. package/dist/i18n/messages/nl-NL.d.ts +41 -11
  63. package/dist/i18n/messages/pl-PL.d.ts +41 -13
  64. package/dist/i18n/messages/pt-BR.d.ts +41 -12
  65. package/dist/i18n/messages/pt-PT.d.ts +41 -12
  66. package/dist/i18n/messages/ro-RO.d.ts +41 -12
  67. package/dist/i18n/messages/ru-RU.d.ts +41 -13
  68. package/dist/i18n/messages/sk-SK.d.ts +41 -13
  69. package/dist/i18n/messages/sl-SI.d.ts +41 -13
  70. package/dist/i18n/messages/sv-SE.d.ts +41 -11
  71. package/dist/i18n/messages/tr-TR.d.ts +41 -11
  72. package/dist/i18n/messages/uk-UA.d.ts +41 -13
  73. package/dist/i18n/messages/zh-CN.d.ts +41 -10
  74. package/dist/i18n/messages/zh-TW.d.ts +41 -10
  75. package/dist/index.js +21553 -18898
  76. package/dist/{loadValue-B3EFSe9k.js → loadValue-BKvXDYoC.js} +1651 -1651
  77. package/dist/peer/index.js +23 -23
  78. package/dist/shared-store-2IUOt99m.js +1341 -0
  79. package/dist/styles/scrollbar.styles.d.ts +1 -1
  80. package/dist/themes/tokens.d.ts +9 -4
  81. package/dist/utils/diff/compareEntities.d.ts +39 -0
  82. package/dist/utils/diff/diffDocuments.d.ts +12 -0
  83. package/dist/utils/diff/index.d.ts +5 -0
  84. package/dist/utils/diff/pairEntities.d.ts +41 -0
  85. package/dist/utils/diff/types.d.ts +77 -0
  86. package/dist/utils/emitter.d.ts +2 -8
  87. package/dist/utils/find-replace/findMatches.d.ts +25 -12
  88. package/dist/utils/find-replace/matcher.d.ts +2 -0
  89. package/dist/utils/find-replace/present.d.ts +3 -2
  90. package/dist/utils/find-replace/preserveCase.d.ts +10 -0
  91. package/dist/utils/keyboard-shortcut/index.d.ts +11 -3
  92. package/dist/utils/takeover.d.ts +6 -0
  93. package/dist/utils/virtualRange.d.ts +15 -0
  94. package/dist/workers/exportPng.shared-worker.js +29 -29
  95. package/package.json +4 -4
  96. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.d.ts +0 -12
  97. package/dist/components/erd/diff-viewer/tree-viewer/TreeViewer.styles.d.ts +0 -6
  98. package/dist/components/find-replace/FindReplace.d.ts +0 -13
  99. package/dist/components/find-replace/FindReplace.styles.d.ts +0 -27
  100. package/dist/components/find-replace/panelLayout.d.ts +0 -20
  101. package/dist/shared-store-fUggY7sI.js +0 -1341
  102. /package/dist/components/{find-replace → explorer}/fieldIcon.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- import { $ as e, $o as t, Ao as n, B as r, Bo as i, C as a, Cn as o, F as s, Fn as c, Fr as l, Ho as u, Jn as ee, Ko as d, Na as f, No as p, On as m, P as h, Pt as g, Rn as _, U as v, Un as y, Uo as b, Ut as x, Vo as S, Wo as C, Xo as w, Yo as T, Zo as E, _o as D, as as O, cs as k, dr as A, ds as j, es as M, f as N, hn as te, hs as ne, is as re, ja as ie, ji as ae, jo as P, k as F, ln as I, lr as L, ls as R, m as z, mn as B, ns as V, os as H, ps as U, qi as W, rs as G, sr as K, t as q, u as J, ur as oe, vn as se, vo as ce, wt as le, x as ue, xr as de, zn as fe } from "../loadValue-B3EFSe9k.js";
2
- import { d as pe, f as me, h as he, m as ge, n as _e, t as ve } from "../shared-store-fUggY7sI.js";
1
+ import { $ as e, B as t, C as n, Cn as r, F as i, Fn as a, Fr as o, Go as s, Ho as c, Jn as ee, Ma as l, Mo as u, On as d, P as f, Pa as p, Po as m, Pt as h, Qo as g, Rn as _, U as v, Un as y, Uo as b, Ut as x, Vo as S, Wo as C, Xo as w, Zo as T, as as E, dr as D, es as O, f as k, fs as A, gs as j, hn as M, is as te, ji as ne, jo as re, k as ie, ln as ae, lr as N, ls as P, m as F, mn as I, ms as L, os as R, qi as z, qo as B, rs as V, sr as H, ss as U, t as W, ts as G, u as K, ur as q, us as J, vn as oe, vo as se, wt as ce, x as le, xr as ue, yo as de, zn as fe } from "../loadValue-BKvXDYoC.js";
2
+ import { d as pe, f as me, h as he, m as ge, n as _e, t as ve } from "../shared-store-2IUOt99m.js";
3
3
  //#region src/engine/presence.ts
4
4
  var ye = y / 3, be = (e) => {
5
5
  e?.unref?.();
@@ -18,9 +18,9 @@ function Se(e) {
18
18
  function Ce(e) {
19
19
  let t = "", n = (n) => {
20
20
  let r = pe(e.state.editor.focusTable), i = me(r);
21
- (i !== t || n) && (t = i, e.dispatch(de({ focus: r })));
21
+ (i !== t || n) && (t = i, e.dispatch(ue({ focus: r })));
22
22
  }, r = e.subscribe((e) => {
23
- n(e.some((e) => e.type === A.type));
23
+ n(e.some((e) => e.type === D.type));
24
24
  }), i = setInterval(() => {
25
25
  t && n(!0);
26
26
  }, ye);
@@ -45,9 +45,9 @@ var Y = 2, Te = 10, X = (e) => Math.round(e.length * Te) + Y, Z = {
45
45
  destroyed: "this document session was closed; open the document again"
46
46
  }, Q = class extends Error {
47
47
  constructor(e, t) {
48
- super(Ee[e]), N(this, "code", void 0), N(this, "operation", void 0), this.name = "PeerStoreError", this.code = e, this.operation = t;
48
+ super(Ee[e]), k(this, "code", void 0), k(this, "operation", void 0), this.name = "PeerStoreError", this.code = e, this.operation = t;
49
49
  }
50
- }, $ = i(z), De = i(a), Oe = i([
50
+ }, $ = S(F), De = S(n), Oe = S([
51
51
  "table.add",
52
52
  "column.add",
53
53
  "memo.add",
@@ -86,10 +86,10 @@ function ke(e) {
86
86
  function Ae(e) {
87
87
  if (!e) return [];
88
88
  let { tableId: t, columnId: n, focusType: r } = e;
89
- return n === void 0 ? [L({
89
+ return n === void 0 ? [N({
90
90
  tableId: t,
91
91
  focusType: r
92
- })] : [K({
92
+ })] : [H({
93
93
  tableId: t,
94
94
  columnId: n,
95
95
  focusType: r,
@@ -98,7 +98,7 @@ function Ae(e) {
98
98
  })];
99
99
  }
100
100
  function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 }) {
101
- let a = null, o = ge(J({
101
+ let a = null, o = ge(K({
102
102
  toWidth: n,
103
103
  routes: !1
104
104
  }), {
@@ -113,7 +113,7 @@ function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 })
113
113
  let x = r ? Ce(o) : null, S = () => {
114
114
  h ||= l.subscribe((e) => {
115
115
  e.some((e) => $(e.type)) && _++;
116
- for (let t of Array.from(d)) B(t, e);
116
+ for (let t of Array.from(d)) I(t, e);
117
117
  });
118
118
  }, C = (e) => {
119
119
  if (m) throw new Q(Z.destroyed, e);
@@ -127,9 +127,9 @@ function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 })
127
127
  let t = v.reduce((e, { historyEntries: t }) => e + t, 0);
128
128
  for (; t > e;) t -= v.shift().historyEntries;
129
129
  for (; v.length > e;) v.splice(v.findIndex(({ historyEntries: e }) => !e), 1);
130
- }, D = (e, t = {}) => {
130
+ }, O = (e, t = {}) => {
131
131
  T("dispatch"), S();
132
- let n = _, r = s(), i = ne(o.state, o.context, [...Ae(t.focus), ...e]);
132
+ let n = _, r = s(), i = j(o.state, o.context, [...Ae(t.focus), ...e]);
133
133
  o.dispatchSync(i), i.some((e) => De(e.type)) && u.flush();
134
134
  let a = {
135
135
  label: t.label ?? null,
@@ -142,7 +142,7 @@ function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 })
142
142
  label: a.label,
143
143
  historyEntries: a.historyEntries
144
144
  }), a.historyEntries && (y = []), b || E(), a;
145
- }, O = (e, t) => {
145
+ }, k = (e, t) => {
146
146
  if (T("group"), b) return t();
147
147
  let n = {
148
148
  unit: {
@@ -157,17 +157,17 @@ function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 })
157
157
  } finally {
158
158
  b = null, n.dispatched && (v.push(n.unit), E());
159
159
  }
160
- }, k = (e, t) => {
160
+ }, M = (e, t) => {
161
161
  for (let n = 0; n < e.historyEntries; n++) t();
162
162
  u.flush();
163
163
  };
164
164
  return Object.freeze({
165
165
  editorId: f,
166
166
  get value() {
167
- return j(o.state);
167
+ return A(o.state);
168
168
  },
169
169
  get runtimeValue() {
170
- return U(o.state);
170
+ return L(o.state);
171
171
  },
172
172
  get state() {
173
173
  return o.state;
@@ -182,21 +182,21 @@ function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 })
182
182
  p = e;
183
183
  },
184
184
  setInitialValue: (t) => {
185
- C("setInitialValue"), w("setInitialValue"), o.dispatchSync(oe(), e(q(t))), o.resetHistory(), v = [], y = [];
185
+ C("setInitialValue"), w("setInitialValue"), o.dispatchSync(q(), e(W(t))), o.resetHistory(), v = [], y = [];
186
186
  },
187
187
  mergeClock: (e) => {
188
188
  o.context.clock.merge(e);
189
189
  },
190
- dispatch: D,
190
+ dispatch: O,
191
191
  receive: (e) => {
192
192
  m || l.dispatchSync(e);
193
193
  },
194
- group: O,
194
+ group: k,
195
195
  undo: () => {
196
196
  T("undo"), w("undo"), S();
197
197
  let e = [], t = v.pop();
198
198
  for (; t && !t.historyEntries;) t.label !== null && e.push(t.label), t = v.pop();
199
- return t ? (k(t, o.undo), y.push(t), {
199
+ return t ? (M(t, o.undo), y.push(t), {
200
200
  label: t.label,
201
201
  entries: t.historyEntries,
202
202
  skipped: e
@@ -209,7 +209,7 @@ function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 })
209
209
  redo: () => {
210
210
  T("redo"), w("redo"), S();
211
211
  let e = y.pop();
212
- return e ? (k(e, o.redo), v.push(e), {
212
+ return e ? (M(e, o.redo), v.push(e), {
213
213
  label: e.label,
214
214
  entries: e.historyEntries,
215
215
  skipped: []
@@ -219,7 +219,7 @@ function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 })
219
219
  skipped: []
220
220
  };
221
221
  },
222
- subscribe: (e) => (C("subscribe"), d.add(e), g || (g = !0, h ? o.dispatchSync(A()) : S()), () => {
222
+ subscribe: (e) => (C("subscribe"), d.add(e), g || (g = !0, h ? o.dispatchSync(D()) : S()), () => {
223
223
  d.delete(e);
224
224
  }),
225
225
  flushStreamBuffers: () => {
@@ -231,4 +231,4 @@ function je({ nickname: t, toWidth: n = X, presence: r = !0, readonly: i = !1 })
231
231
  });
232
232
  }
233
233
  //#endregion
234
- export { d as BracketType, T as CanvasType, z as ChangeActionTypes, w as ColumnOption, E as ColumnType, t as DDLScriptPosition, M as Database, D as DatabaseVendorList, ce as DatabaseVendorToDatabase, P as FocusType, V as Language, G as LockSettingType, S as MEMO_MIN_HEIGHT, u as MEMO_MIN_WIDTH, re as NameCase, O as OrderType, Q as PeerStoreError, Z as PeerStoreErrorCode, H as ReferentialAction, k as RelationshipType, ie as SchemaSQLHeaderList, f as SchemaSQLStatementsList, p as SelectType, ue as SharedFollowingActionTypes, R as Show, a as StreamActionTypes, b as TABLE_GROUP_MIN_HEIGHT, C as TABLE_GROUP_MIN_WIDTH, n as bHas, J as createEngineContext, je as createPeerStore, _e as createSchemaSQL, X as defaultToWidth, v as editorActions$, ae as getTablesGroupRect, fe as indexActions, r as indexActions$, _ as indexColumnActions, s as indexColumnActions$, W as measureTableSize, c as memoActions, I as memoActions$, m as relationshipActions, h as relationshipActions$, l as settingsActions, F as settingsActions$, o as tableActions, x as tableActions$, se as tableColumnActions, g as tableColumnActions$, te as tableGroupActions, le as tableGroupActions$ };
234
+ export { B as BracketType, w as CanvasType, F as ChangeActionTypes, T as ColumnOption, g as ColumnType, O as DDLScriptPosition, G as Database, se as DatabaseVendorList, de as DatabaseVendorToDatabase, u as FocusType, V as Language, te as LockSettingType, c as MEMO_MIN_HEIGHT, b as MEMO_MIN_WIDTH, E as NameCase, R as OrderType, Q as PeerStoreError, Z as PeerStoreErrorCode, U as ReferentialAction, P as RelationshipType, l as SchemaSQLHeaderList, p as SchemaSQLStatementsList, m as SelectType, le as SharedFollowingActionTypes, J as Show, n as StreamActionTypes, C as TABLE_GROUP_MIN_HEIGHT, s as TABLE_GROUP_MIN_WIDTH, re as bHas, K as createEngineContext, je as createPeerStore, _e as createSchemaSQL, X as defaultToWidth, v as editorActions$, ne as getTablesGroupRect, fe as indexActions, t as indexActions$, _ as indexColumnActions, i as indexColumnActions$, z as measureTableSize, a as memoActions, ae as memoActions$, d as relationshipActions, f as relationshipActions$, o as settingsActions, ie as settingsActions$, r as tableActions, x as tableActions$, oe as tableColumnActions, h as tableColumnActions$, M as tableGroupActions, ce as tableGroupActions$ };