microboard-temp 0.13.61 → 0.13.63

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.
@@ -3624,7 +3624,7 @@ var init_Settings = __esm(() => {
3624
3624
  measureCtx: undefined,
3625
3625
  i18n: instance,
3626
3626
  hooks: {
3627
- beforeMediaUpload: async (...args) => false,
3627
+ beforeMediaUpload: async (...args) => true,
3628
3628
  beforeMediaRemove: async (...args) => false,
3629
3629
  onUploadMediaError: async (...args) => false
3630
3630
  },
@@ -3960,7 +3960,7 @@ var init_Settings = __esm(() => {
3960
3960
  FG_REPULSION: 100,
3961
3961
  FG_MIN_DIST_SQ: 100,
3962
3962
  FG_DAMPING: 0.6,
3963
- FG_SLEEP_THRESHOLD: 0.5,
3963
+ FG_SLEEP_THRESHOLD: 10,
3964
3964
  FG_TICK_MS: 16,
3965
3965
  GRAVITY_G: 80,
3966
3966
  GRAVITY_G_CENTER: 120,
@@ -42821,7 +42821,7 @@ var init_Connector = __esm(() => {
42821
42821
  this.endPointerStyle = endPointerStyle;
42822
42822
  this.transformation = new Transformation(this.id, this.board.events);
42823
42823
  this.linkTo = new LinkTo(this.id, this.board.events);
42824
- this.lineColor = lineColor ?? fixedColor(CONNECTOR_COLOR);
42824
+ this.lineColor = lineColor ?? semanticColor("contrastNeutral");
42825
42825
  this.lineWidth = lineWidth ?? CONNECTOR_LINE_WIDTH;
42826
42826
  this.borderStyle = strokeStyle ?? CONNECTOR_BORDER_STYLE;
42827
42827
  this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, conf.i18n.t("connector.textPlaceholder", {
@@ -43727,7 +43727,7 @@ class ConnectorData {
43727
43727
  startPointerStyle = "None";
43728
43728
  endPointerStyle = "ArrowThin";
43729
43729
  lineStyle = "straight";
43730
- lineColor = fixedColor(CONNECTOR_COLOR);
43730
+ lineColor = semanticColor("contrastNeutral");
43731
43731
  linkTo;
43732
43732
  lineWidth = 1;
43733
43733
  borderStyle = "solid";
@@ -43738,7 +43738,6 @@ class ConnectorData {
43738
43738
  }
43739
43739
  var init_ConnectorOperations = __esm(() => {
43740
43740
  init_ControlPoint();
43741
- init_ConnectorTypes();
43742
43741
  init_Color();
43743
43742
  });
43744
43743
 
@@ -51432,7 +51431,7 @@ function validateFrameData(data) {
51432
51431
  return false;
51433
51432
  }
51434
51433
  const frameData = data;
51435
- const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && frameData.hasOwnProperty("children") && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && Array.isArray(frameData.children) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
51434
+ const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && (frameData.hasOwnProperty("childIds") || frameData.hasOwnProperty("children")) && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && (Array.isArray(frameData.childIds) || Array.isArray(frameData.children)) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
51436
51435
  return isValid;
51437
51436
  }
51438
51437
  function validateShapeData(shapeData) {
@@ -62125,8 +62124,10 @@ class Board {
62125
62124
  }
62126
62125
  }
62127
62126
  const itemDataWithChildren = itemData;
62128
- if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
62129
- itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId]);
62127
+ if ("childIds" in itemDataWithChildren && itemDataWithChildren.childIds?.length) {
62128
+ itemDataWithChildren.childIds = itemDataWithChildren.childIds.map((childId) => newItemIdMap[childId] || childId);
62129
+ } else if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
62130
+ itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId] || childId);
62130
62131
  }
62131
62132
  newMap[newItemId] = itemData;
62132
62133
  }
package/dist/cjs/index.js CHANGED
@@ -3624,7 +3624,7 @@ var init_Settings = __esm(() => {
3624
3624
  measureCtx: undefined,
3625
3625
  i18n: instance,
3626
3626
  hooks: {
3627
- beforeMediaUpload: async (...args) => false,
3627
+ beforeMediaUpload: async (...args) => true,
3628
3628
  beforeMediaRemove: async (...args) => false,
3629
3629
  onUploadMediaError: async (...args) => false
3630
3630
  },
@@ -3960,7 +3960,7 @@ var init_Settings = __esm(() => {
3960
3960
  FG_REPULSION: 100,
3961
3961
  FG_MIN_DIST_SQ: 100,
3962
3962
  FG_DAMPING: 0.6,
3963
- FG_SLEEP_THRESHOLD: 0.5,
3963
+ FG_SLEEP_THRESHOLD: 10,
3964
3964
  FG_TICK_MS: 16,
3965
3965
  GRAVITY_G: 80,
3966
3966
  GRAVITY_G_CENTER: 120,
@@ -42821,7 +42821,7 @@ var init_Connector = __esm(() => {
42821
42821
  this.endPointerStyle = endPointerStyle;
42822
42822
  this.transformation = new Transformation(this.id, this.board.events);
42823
42823
  this.linkTo = new LinkTo(this.id, this.board.events);
42824
- this.lineColor = lineColor ?? fixedColor(CONNECTOR_COLOR);
42824
+ this.lineColor = lineColor ?? semanticColor("contrastNeutral");
42825
42825
  this.lineWidth = lineWidth ?? CONNECTOR_LINE_WIDTH;
42826
42826
  this.borderStyle = strokeStyle ?? CONNECTOR_BORDER_STYLE;
42827
42827
  this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, conf.i18n.t("connector.textPlaceholder", {
@@ -43727,7 +43727,7 @@ class ConnectorData {
43727
43727
  startPointerStyle = "None";
43728
43728
  endPointerStyle = "ArrowThin";
43729
43729
  lineStyle = "straight";
43730
- lineColor = fixedColor(CONNECTOR_COLOR);
43730
+ lineColor = semanticColor("contrastNeutral");
43731
43731
  linkTo;
43732
43732
  lineWidth = 1;
43733
43733
  borderStyle = "solid";
@@ -43738,7 +43738,6 @@ class ConnectorData {
43738
43738
  }
43739
43739
  var init_ConnectorOperations = __esm(() => {
43740
43740
  init_ControlPoint();
43741
- init_ConnectorTypes();
43742
43741
  init_Color();
43743
43742
  });
43744
43743
 
@@ -51432,7 +51431,7 @@ function validateFrameData(data) {
51432
51431
  return false;
51433
51432
  }
51434
51433
  const frameData = data;
51435
- const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && frameData.hasOwnProperty("children") && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && Array.isArray(frameData.children) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
51434
+ const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && (frameData.hasOwnProperty("childIds") || frameData.hasOwnProperty("children")) && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && (Array.isArray(frameData.childIds) || Array.isArray(frameData.children)) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
51436
51435
  return isValid;
51437
51436
  }
51438
51437
  function validateShapeData(shapeData) {
@@ -62125,8 +62124,10 @@ class Board {
62125
62124
  }
62126
62125
  }
62127
62126
  const itemDataWithChildren = itemData;
62128
- if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
62129
- itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId]);
62127
+ if ("childIds" in itemDataWithChildren && itemDataWithChildren.childIds?.length) {
62128
+ itemDataWithChildren.childIds = itemDataWithChildren.childIds.map((childId) => newItemIdMap[childId] || childId);
62129
+ } else if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
62130
+ itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId] || childId);
62130
62131
  }
62131
62132
  newMap[newItemId] = itemData;
62132
62133
  }
package/dist/cjs/node.js CHANGED
@@ -3624,7 +3624,7 @@ var init_Settings = __esm(() => {
3624
3624
  measureCtx: undefined,
3625
3625
  i18n: instance,
3626
3626
  hooks: {
3627
- beforeMediaUpload: async (...args) => false,
3627
+ beforeMediaUpload: async (...args) => true,
3628
3628
  beforeMediaRemove: async (...args) => false,
3629
3629
  onUploadMediaError: async (...args) => false
3630
3630
  },
@@ -3960,7 +3960,7 @@ var init_Settings = __esm(() => {
3960
3960
  FG_REPULSION: 100,
3961
3961
  FG_MIN_DIST_SQ: 100,
3962
3962
  FG_DAMPING: 0.6,
3963
- FG_SLEEP_THRESHOLD: 0.5,
3963
+ FG_SLEEP_THRESHOLD: 10,
3964
3964
  FG_TICK_MS: 16,
3965
3965
  GRAVITY_G: 80,
3966
3966
  GRAVITY_G_CENTER: 120,
@@ -45241,7 +45241,7 @@ var init_Connector = __esm(() => {
45241
45241
  this.endPointerStyle = endPointerStyle;
45242
45242
  this.transformation = new Transformation(this.id, this.board.events);
45243
45243
  this.linkTo = new LinkTo(this.id, this.board.events);
45244
- this.lineColor = lineColor ?? fixedColor(CONNECTOR_COLOR);
45244
+ this.lineColor = lineColor ?? semanticColor("contrastNeutral");
45245
45245
  this.lineWidth = lineWidth ?? CONNECTOR_LINE_WIDTH;
45246
45246
  this.borderStyle = strokeStyle ?? CONNECTOR_BORDER_STYLE;
45247
45247
  this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, conf.i18n.t("connector.textPlaceholder", {
@@ -46147,7 +46147,7 @@ class ConnectorData {
46147
46147
  startPointerStyle = "None";
46148
46148
  endPointerStyle = "ArrowThin";
46149
46149
  lineStyle = "straight";
46150
- lineColor = fixedColor(CONNECTOR_COLOR);
46150
+ lineColor = semanticColor("contrastNeutral");
46151
46151
  linkTo;
46152
46152
  lineWidth = 1;
46153
46153
  borderStyle = "solid";
@@ -46158,7 +46158,6 @@ class ConnectorData {
46158
46158
  }
46159
46159
  var init_ConnectorOperations = __esm(() => {
46160
46160
  init_ControlPoint();
46161
- init_ConnectorTypes();
46162
46161
  init_Color();
46163
46162
  });
46164
46163
 
@@ -53852,7 +53851,7 @@ function validateFrameData(data) {
53852
53851
  return false;
53853
53852
  }
53854
53853
  const frameData = data;
53855
- const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && frameData.hasOwnProperty("children") && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && Array.isArray(frameData.children) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
53854
+ const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && (frameData.hasOwnProperty("childIds") || frameData.hasOwnProperty("children")) && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && (Array.isArray(frameData.childIds) || Array.isArray(frameData.children)) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
53856
53855
  return isValid;
53857
53856
  }
53858
53857
  function validateShapeData(shapeData) {
@@ -64600,8 +64599,10 @@ class Board {
64600
64599
  }
64601
64600
  }
64602
64601
  const itemDataWithChildren = itemData;
64603
- if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
64604
- itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId]);
64602
+ if ("childIds" in itemDataWithChildren && itemDataWithChildren.childIds?.length) {
64603
+ itemDataWithChildren.childIds = itemDataWithChildren.childIds.map((childId) => newItemIdMap[childId] || childId);
64604
+ } else if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
64605
+ itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId] || childId);
64605
64606
  }
64606
64607
  newMap[newItemId] = itemData;
64607
64608
  }
@@ -3631,7 +3631,7 @@ var init_Settings = __esm(() => {
3631
3631
  measureCtx: undefined,
3632
3632
  i18n: instance,
3633
3633
  hooks: {
3634
- beforeMediaUpload: async (...args) => false,
3634
+ beforeMediaUpload: async (...args) => true,
3635
3635
  beforeMediaRemove: async (...args) => false,
3636
3636
  onUploadMediaError: async (...args) => false
3637
3637
  },
@@ -3967,7 +3967,7 @@ var init_Settings = __esm(() => {
3967
3967
  FG_REPULSION: 100,
3968
3968
  FG_MIN_DIST_SQ: 100,
3969
3969
  FG_DAMPING: 0.6,
3970
- FG_SLEEP_THRESHOLD: 0.5,
3970
+ FG_SLEEP_THRESHOLD: 10,
3971
3971
  FG_TICK_MS: 16,
3972
3972
  GRAVITY_G: 80,
3973
3973
  GRAVITY_G_CENTER: 120,
@@ -42759,7 +42759,7 @@ var init_Connector = __esm(() => {
42759
42759
  this.endPointerStyle = endPointerStyle;
42760
42760
  this.transformation = new Transformation(this.id, this.board.events);
42761
42761
  this.linkTo = new LinkTo(this.id, this.board.events);
42762
- this.lineColor = lineColor ?? fixedColor(CONNECTOR_COLOR);
42762
+ this.lineColor = lineColor ?? semanticColor("contrastNeutral");
42763
42763
  this.lineWidth = lineWidth ?? CONNECTOR_LINE_WIDTH;
42764
42764
  this.borderStyle = strokeStyle ?? CONNECTOR_BORDER_STYLE;
42765
42765
  this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, conf.i18n.t("connector.textPlaceholder", {
@@ -43665,7 +43665,7 @@ class ConnectorData {
43665
43665
  startPointerStyle = "None";
43666
43666
  endPointerStyle = "ArrowThin";
43667
43667
  lineStyle = "straight";
43668
- lineColor = fixedColor(CONNECTOR_COLOR);
43668
+ lineColor = semanticColor("contrastNeutral");
43669
43669
  linkTo;
43670
43670
  lineWidth = 1;
43671
43671
  borderStyle = "solid";
@@ -43676,7 +43676,6 @@ class ConnectorData {
43676
43676
  }
43677
43677
  var init_ConnectorOperations = __esm(() => {
43678
43678
  init_ControlPoint();
43679
- init_ConnectorTypes();
43680
43679
  init_Color();
43681
43680
  });
43682
43681
 
@@ -51370,7 +51369,7 @@ function validateFrameData(data) {
51370
51369
  return false;
51371
51370
  }
51372
51371
  const frameData = data;
51373
- const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && frameData.hasOwnProperty("children") && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && Array.isArray(frameData.children) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
51372
+ const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && (frameData.hasOwnProperty("childIds") || frameData.hasOwnProperty("children")) && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && (Array.isArray(frameData.childIds) || Array.isArray(frameData.children)) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
51374
51373
  return isValid;
51375
51374
  }
51376
51375
  function validateShapeData(shapeData) {
@@ -61868,8 +61867,10 @@ class Board {
61868
61867
  }
61869
61868
  }
61870
61869
  const itemDataWithChildren = itemData;
61871
- if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
61872
- itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId]);
61870
+ if ("childIds" in itemDataWithChildren && itemDataWithChildren.childIds?.length) {
61871
+ itemDataWithChildren.childIds = itemDataWithChildren.childIds.map((childId) => newItemIdMap[childId] || childId);
61872
+ } else if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
61873
+ itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId] || childId);
61873
61874
  }
61874
61875
  newMap[newItemId] = itemData;
61875
61876
  }
package/dist/esm/index.js CHANGED
@@ -3624,7 +3624,7 @@ var init_Settings = __esm(() => {
3624
3624
  measureCtx: undefined,
3625
3625
  i18n: instance,
3626
3626
  hooks: {
3627
- beforeMediaUpload: async (...args) => false,
3627
+ beforeMediaUpload: async (...args) => true,
3628
3628
  beforeMediaRemove: async (...args) => false,
3629
3629
  onUploadMediaError: async (...args) => false
3630
3630
  },
@@ -3960,7 +3960,7 @@ var init_Settings = __esm(() => {
3960
3960
  FG_REPULSION: 100,
3961
3961
  FG_MIN_DIST_SQ: 100,
3962
3962
  FG_DAMPING: 0.6,
3963
- FG_SLEEP_THRESHOLD: 0.5,
3963
+ FG_SLEEP_THRESHOLD: 10,
3964
3964
  FG_TICK_MS: 16,
3965
3965
  GRAVITY_G: 80,
3966
3966
  GRAVITY_G_CENTER: 120,
@@ -42752,7 +42752,7 @@ var init_Connector = __esm(() => {
42752
42752
  this.endPointerStyle = endPointerStyle;
42753
42753
  this.transformation = new Transformation(this.id, this.board.events);
42754
42754
  this.linkTo = new LinkTo(this.id, this.board.events);
42755
- this.lineColor = lineColor ?? fixedColor(CONNECTOR_COLOR);
42755
+ this.lineColor = lineColor ?? semanticColor("contrastNeutral");
42756
42756
  this.lineWidth = lineWidth ?? CONNECTOR_LINE_WIDTH;
42757
42757
  this.borderStyle = strokeStyle ?? CONNECTOR_BORDER_STYLE;
42758
42758
  this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, conf.i18n.t("connector.textPlaceholder", {
@@ -43658,7 +43658,7 @@ class ConnectorData {
43658
43658
  startPointerStyle = "None";
43659
43659
  endPointerStyle = "ArrowThin";
43660
43660
  lineStyle = "straight";
43661
- lineColor = fixedColor(CONNECTOR_COLOR);
43661
+ lineColor = semanticColor("contrastNeutral");
43662
43662
  linkTo;
43663
43663
  lineWidth = 1;
43664
43664
  borderStyle = "solid";
@@ -43669,7 +43669,6 @@ class ConnectorData {
43669
43669
  }
43670
43670
  var init_ConnectorOperations = __esm(() => {
43671
43671
  init_ControlPoint();
43672
- init_ConnectorTypes();
43673
43672
  init_Color();
43674
43673
  });
43675
43674
 
@@ -51363,7 +51362,7 @@ function validateFrameData(data) {
51363
51362
  return false;
51364
51363
  }
51365
51364
  const frameData = data;
51366
- const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && frameData.hasOwnProperty("children") && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && Array.isArray(frameData.children) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
51365
+ const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && (frameData.hasOwnProperty("childIds") || frameData.hasOwnProperty("children")) && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && (Array.isArray(frameData.childIds) || Array.isArray(frameData.children)) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
51367
51366
  return isValid;
51368
51367
  }
51369
51368
  function validateShapeData(shapeData) {
@@ -61861,8 +61860,10 @@ class Board {
61861
61860
  }
61862
61861
  }
61863
61862
  const itemDataWithChildren = itemData;
61864
- if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
61865
- itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId]);
61863
+ if ("childIds" in itemDataWithChildren && itemDataWithChildren.childIds?.length) {
61864
+ itemDataWithChildren.childIds = itemDataWithChildren.childIds.map((childId) => newItemIdMap[childId] || childId);
61865
+ } else if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
61866
+ itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId] || childId);
61866
61867
  }
61867
61868
  newMap[newItemId] = itemData;
61868
61869
  }
package/dist/esm/node.js CHANGED
@@ -3626,7 +3626,7 @@ var init_Settings = __esm(() => {
3626
3626
  measureCtx: undefined,
3627
3627
  i18n: instance,
3628
3628
  hooks: {
3629
- beforeMediaUpload: async (...args) => false,
3629
+ beforeMediaUpload: async (...args) => true,
3630
3630
  beforeMediaRemove: async (...args) => false,
3631
3631
  onUploadMediaError: async (...args) => false
3632
3632
  },
@@ -3962,7 +3962,7 @@ var init_Settings = __esm(() => {
3962
3962
  FG_REPULSION: 100,
3963
3963
  FG_MIN_DIST_SQ: 100,
3964
3964
  FG_DAMPING: 0.6,
3965
- FG_SLEEP_THRESHOLD: 0.5,
3965
+ FG_SLEEP_THRESHOLD: 10,
3966
3966
  FG_TICK_MS: 16,
3967
3967
  GRAVITY_G: 80,
3968
3968
  GRAVITY_G_CENTER: 120,
@@ -45161,7 +45161,7 @@ var init_Connector = __esm(() => {
45161
45161
  this.endPointerStyle = endPointerStyle;
45162
45162
  this.transformation = new Transformation(this.id, this.board.events);
45163
45163
  this.linkTo = new LinkTo(this.id, this.board.events);
45164
- this.lineColor = lineColor ?? fixedColor(CONNECTOR_COLOR);
45164
+ this.lineColor = lineColor ?? semanticColor("contrastNeutral");
45165
45165
  this.lineWidth = lineWidth ?? CONNECTOR_LINE_WIDTH;
45166
45166
  this.borderStyle = strokeStyle ?? CONNECTOR_BORDER_STYLE;
45167
45167
  this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, conf.i18n.t("connector.textPlaceholder", {
@@ -46067,7 +46067,7 @@ class ConnectorData {
46067
46067
  startPointerStyle = "None";
46068
46068
  endPointerStyle = "ArrowThin";
46069
46069
  lineStyle = "straight";
46070
- lineColor = fixedColor(CONNECTOR_COLOR);
46070
+ lineColor = semanticColor("contrastNeutral");
46071
46071
  linkTo;
46072
46072
  lineWidth = 1;
46073
46073
  borderStyle = "solid";
@@ -46078,7 +46078,6 @@ class ConnectorData {
46078
46078
  }
46079
46079
  var init_ConnectorOperations = __esm(() => {
46080
46080
  init_ControlPoint();
46081
- init_ConnectorTypes();
46082
46081
  init_Color();
46083
46082
  });
46084
46083
 
@@ -53772,7 +53771,7 @@ function validateFrameData(data) {
53772
53771
  return false;
53773
53772
  }
53774
53773
  const frameData = data;
53775
- const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && frameData.hasOwnProperty("children") && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && Array.isArray(frameData.children) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
53774
+ const isValid = frameData.hasOwnProperty("shapeType") && frameData.hasOwnProperty("backgroundColor") && frameData.hasOwnProperty("backgroundOpacity") && frameData.hasOwnProperty("borderColor") && frameData.hasOwnProperty("borderOpacity") && frameData.hasOwnProperty("borderStyle") && frameData.hasOwnProperty("borderWidth") && frameData.hasOwnProperty("transformation") && frameData.hasOwnProperty("text") && (frameData.hasOwnProperty("childIds") || frameData.hasOwnProperty("children")) && typeof frameData.shapeType === "string" && isColorValue(frameData.backgroundColor) && typeof frameData.backgroundOpacity === "number" && isColorValue(frameData.borderColor) && typeof frameData.borderOpacity === "number" && typeof frameData.borderStyle === "string" && typeof frameData.borderWidth === "number" && (Array.isArray(frameData.childIds) || Array.isArray(frameData.children)) && validateTransformationData(frameData.transformation) && validateRichTextData(frameData.text);
53776
53775
  return isValid;
53777
53776
  }
53778
53777
  function validateShapeData(shapeData) {
@@ -64325,8 +64324,10 @@ class Board {
64325
64324
  }
64326
64325
  }
64327
64326
  const itemDataWithChildren = itemData;
64328
- if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
64329
- itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId]);
64327
+ if ("childIds" in itemDataWithChildren && itemDataWithChildren.childIds?.length) {
64328
+ itemDataWithChildren.childIds = itemDataWithChildren.childIds.map((childId) => newItemIdMap[childId] || childId);
64329
+ } else if ("children" in itemDataWithChildren && itemDataWithChildren.children?.length) {
64330
+ itemDataWithChildren.children = itemDataWithChildren.children.map((childId) => newItemIdMap[childId] || childId);
64330
64331
  }
64331
64332
  newMap[newItemId] = itemData;
64332
64333
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.13.61",
3
+ "version": "0.13.63",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",