microboard-temp 0.1.12 → 0.1.13

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.
@@ -5124,6 +5124,32 @@ class BrowserPath2D {
5124
5124
  }
5125
5125
  }
5126
5126
 
5127
+ // src/api/MockDocumentFactory.ts
5128
+ class MockDocumentFactory {
5129
+ logPreInitializationCall(methodName) {
5130
+ console.warn(`WARNING: DocumentFactory.${methodName} was called before initialization.`, `
5131
+ Please make sure to initialize DocumentFactory properly before using it.`, `
5132
+ The application will continue but may not work as expected.`);
5133
+ console.trace(`Stack trace for DocumentFactory.${methodName} call:`);
5134
+ }
5135
+ createElement(tagName) {
5136
+ this.logPreInitializationCall("createElement");
5137
+ return {};
5138
+ }
5139
+ createElementNS(namespace, tagName) {
5140
+ this.logPreInitializationCall("createElementNS");
5141
+ return {};
5142
+ }
5143
+ caretPositionFromPoint(x, y, options) {
5144
+ this.logPreInitializationCall("caretPositionFromPoint");
5145
+ return null;
5146
+ }
5147
+ caretRangeFromPoint(x, y) {
5148
+ this.logPreInitializationCall("caretRangeFromPoint");
5149
+ return null;
5150
+ }
5151
+ }
5152
+
5127
5153
  // src/api/MockPath2D.ts
5128
5154
  class MockPath2D {
5129
5155
  nativePath = null;
@@ -5226,7 +5252,7 @@ var ExportQuality;
5226
5252
  var conf2 = {
5227
5253
  connection: undefined,
5228
5254
  path2DFactory: typeof Path2D !== "undefined" ? BrowserPath2D : MockPath2D,
5229
- documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : undefined,
5255
+ documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : new MockDocumentFactory,
5230
5256
  getDOMParser: undefined,
5231
5257
  measureCtx: undefined,
5232
5258
  i18n: {},
package/dist/cjs/index.js CHANGED
@@ -5015,6 +5015,32 @@ class BrowserPath2D {
5015
5015
  }
5016
5016
  }
5017
5017
 
5018
+ // src/api/MockDocumentFactory.ts
5019
+ class MockDocumentFactory {
5020
+ logPreInitializationCall(methodName) {
5021
+ console.warn(`WARNING: DocumentFactory.${methodName} was called before initialization.`, `
5022
+ Please make sure to initialize DocumentFactory properly before using it.`, `
5023
+ The application will continue but may not work as expected.`);
5024
+ console.trace(`Stack trace for DocumentFactory.${methodName} call:`);
5025
+ }
5026
+ createElement(tagName) {
5027
+ this.logPreInitializationCall("createElement");
5028
+ return {};
5029
+ }
5030
+ createElementNS(namespace, tagName) {
5031
+ this.logPreInitializationCall("createElementNS");
5032
+ return {};
5033
+ }
5034
+ caretPositionFromPoint(x, y, options) {
5035
+ this.logPreInitializationCall("caretPositionFromPoint");
5036
+ return null;
5037
+ }
5038
+ caretRangeFromPoint(x, y) {
5039
+ this.logPreInitializationCall("caretRangeFromPoint");
5040
+ return null;
5041
+ }
5042
+ }
5043
+
5018
5044
  // src/api/MockPath2D.ts
5019
5045
  class MockPath2D {
5020
5046
  nativePath = null;
@@ -5117,7 +5143,7 @@ var ExportQuality;
5117
5143
  var conf2 = {
5118
5144
  connection: undefined,
5119
5145
  path2DFactory: typeof Path2D !== "undefined" ? BrowserPath2D : MockPath2D,
5120
- documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : undefined,
5146
+ documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : new MockDocumentFactory,
5121
5147
  getDOMParser: undefined,
5122
5148
  measureCtx: undefined,
5123
5149
  i18n: {},
package/dist/cjs/node.js CHANGED
@@ -144238,6 +144238,32 @@ class BrowserPath2D {
144238
144238
  }
144239
144239
  }
144240
144240
 
144241
+ // src/api/MockDocumentFactory.ts
144242
+ class MockDocumentFactory {
144243
+ logPreInitializationCall(methodName) {
144244
+ console.warn(`WARNING: DocumentFactory.${methodName} was called before initialization.`, `
144245
+ Please make sure to initialize DocumentFactory properly before using it.`, `
144246
+ The application will continue but may not work as expected.`);
144247
+ console.trace(`Stack trace for DocumentFactory.${methodName} call:`);
144248
+ }
144249
+ createElement(tagName) {
144250
+ this.logPreInitializationCall("createElement");
144251
+ return {};
144252
+ }
144253
+ createElementNS(namespace, tagName) {
144254
+ this.logPreInitializationCall("createElementNS");
144255
+ return {};
144256
+ }
144257
+ caretPositionFromPoint(x, y, options) {
144258
+ this.logPreInitializationCall("caretPositionFromPoint");
144259
+ return null;
144260
+ }
144261
+ caretRangeFromPoint(x, y) {
144262
+ this.logPreInitializationCall("caretRangeFromPoint");
144263
+ return null;
144264
+ }
144265
+ }
144266
+
144241
144267
  // src/api/MockPath2D.ts
144242
144268
  class MockPath2D {
144243
144269
  nativePath = null;
@@ -144340,7 +144366,7 @@ var ExportQuality;
144340
144366
  var conf2 = {
144341
144367
  connection: undefined,
144342
144368
  path2DFactory: typeof Path2D !== "undefined" ? BrowserPath2D : MockPath2D,
144343
- documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : undefined,
144369
+ documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : new MockDocumentFactory,
144344
144370
  getDOMParser: undefined,
144345
144371
  measureCtx: undefined,
144346
144372
  i18n: {},
@@ -4965,6 +4965,32 @@ class BrowserPath2D {
4965
4965
  }
4966
4966
  }
4967
4967
 
4968
+ // src/api/MockDocumentFactory.ts
4969
+ class MockDocumentFactory {
4970
+ logPreInitializationCall(methodName) {
4971
+ console.warn(`WARNING: DocumentFactory.${methodName} was called before initialization.`, `
4972
+ Please make sure to initialize DocumentFactory properly before using it.`, `
4973
+ The application will continue but may not work as expected.`);
4974
+ console.trace(`Stack trace for DocumentFactory.${methodName} call:`);
4975
+ }
4976
+ createElement(tagName) {
4977
+ this.logPreInitializationCall("createElement");
4978
+ return {};
4979
+ }
4980
+ createElementNS(namespace, tagName) {
4981
+ this.logPreInitializationCall("createElementNS");
4982
+ return {};
4983
+ }
4984
+ caretPositionFromPoint(x, y, options) {
4985
+ this.logPreInitializationCall("caretPositionFromPoint");
4986
+ return null;
4987
+ }
4988
+ caretRangeFromPoint(x, y) {
4989
+ this.logPreInitializationCall("caretRangeFromPoint");
4990
+ return null;
4991
+ }
4992
+ }
4993
+
4968
4994
  // src/api/MockPath2D.ts
4969
4995
  class MockPath2D {
4970
4996
  nativePath = null;
@@ -5067,7 +5093,7 @@ var ExportQuality;
5067
5093
  var conf2 = {
5068
5094
  connection: undefined,
5069
5095
  path2DFactory: typeof Path2D !== "undefined" ? BrowserPath2D : MockPath2D,
5070
- documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : undefined,
5096
+ documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : new MockDocumentFactory,
5071
5097
  getDOMParser: undefined,
5072
5098
  measureCtx: undefined,
5073
5099
  i18n: {},
package/dist/esm/index.js CHANGED
@@ -4856,6 +4856,32 @@ class BrowserPath2D {
4856
4856
  }
4857
4857
  }
4858
4858
 
4859
+ // src/api/MockDocumentFactory.ts
4860
+ class MockDocumentFactory {
4861
+ logPreInitializationCall(methodName) {
4862
+ console.warn(`WARNING: DocumentFactory.${methodName} was called before initialization.`, `
4863
+ Please make sure to initialize DocumentFactory properly before using it.`, `
4864
+ The application will continue but may not work as expected.`);
4865
+ console.trace(`Stack trace for DocumentFactory.${methodName} call:`);
4866
+ }
4867
+ createElement(tagName) {
4868
+ this.logPreInitializationCall("createElement");
4869
+ return {};
4870
+ }
4871
+ createElementNS(namespace, tagName) {
4872
+ this.logPreInitializationCall("createElementNS");
4873
+ return {};
4874
+ }
4875
+ caretPositionFromPoint(x, y, options) {
4876
+ this.logPreInitializationCall("caretPositionFromPoint");
4877
+ return null;
4878
+ }
4879
+ caretRangeFromPoint(x, y) {
4880
+ this.logPreInitializationCall("caretRangeFromPoint");
4881
+ return null;
4882
+ }
4883
+ }
4884
+
4859
4885
  // src/api/MockPath2D.ts
4860
4886
  class MockPath2D {
4861
4887
  nativePath = null;
@@ -4958,7 +4984,7 @@ var ExportQuality;
4958
4984
  var conf2 = {
4959
4985
  connection: undefined,
4960
4986
  path2DFactory: typeof Path2D !== "undefined" ? BrowserPath2D : MockPath2D,
4961
- documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : undefined,
4987
+ documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : new MockDocumentFactory,
4962
4988
  getDOMParser: undefined,
4963
4989
  measureCtx: undefined,
4964
4990
  i18n: {},
package/dist/esm/node.js CHANGED
@@ -143826,6 +143826,32 @@ class BrowserPath2D {
143826
143826
  }
143827
143827
  }
143828
143828
 
143829
+ // src/api/MockDocumentFactory.ts
143830
+ class MockDocumentFactory {
143831
+ logPreInitializationCall(methodName) {
143832
+ console.warn(`WARNING: DocumentFactory.${methodName} was called before initialization.`, `
143833
+ Please make sure to initialize DocumentFactory properly before using it.`, `
143834
+ The application will continue but may not work as expected.`);
143835
+ console.trace(`Stack trace for DocumentFactory.${methodName} call:`);
143836
+ }
143837
+ createElement(tagName) {
143838
+ this.logPreInitializationCall("createElement");
143839
+ return {};
143840
+ }
143841
+ createElementNS(namespace, tagName) {
143842
+ this.logPreInitializationCall("createElementNS");
143843
+ return {};
143844
+ }
143845
+ caretPositionFromPoint(x, y, options) {
143846
+ this.logPreInitializationCall("caretPositionFromPoint");
143847
+ return null;
143848
+ }
143849
+ caretRangeFromPoint(x, y) {
143850
+ this.logPreInitializationCall("caretRangeFromPoint");
143851
+ return null;
143852
+ }
143853
+ }
143854
+
143829
143855
  // src/api/MockPath2D.ts
143830
143856
  class MockPath2D {
143831
143857
  nativePath = null;
@@ -143928,7 +143954,7 @@ var ExportQuality;
143928
143954
  var conf2 = {
143929
143955
  connection: undefined,
143930
143956
  path2DFactory: typeof Path2D !== "undefined" ? BrowserPath2D : MockPath2D,
143931
- documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : undefined,
143957
+ documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : new MockDocumentFactory,
143932
143958
  getDOMParser: undefined,
143933
143959
  measureCtx: undefined,
143934
143960
  i18n: {},
@@ -1,7 +1,8 @@
1
- import { DocumentFactory } from "./api/DocumentFactory";
2
1
  import { Path2DFactory } from "./api/Path2DFactory";
3
2
  import { BoardSnapshot } from "./Board";
3
+ import { BrowserDocumentFactory } from "./api/BrowserDocumentFactory";
4
4
  import { BrowserPath2D } from "./api/BrowserPath2DFactory";
5
+ import { MockDocumentFactory } from "./api/MockDocumentFactory";
5
6
  export interface Connection {
6
7
  connectionId: number;
7
8
  getCurrentUser: () => string;
@@ -117,7 +118,7 @@ type ReactEditorToSlatePoint = (editor: any, domNode: Node, offset: number, opti
117
118
  export declare const conf: {
118
119
  connection: Connection;
119
120
  path2DFactory: typeof BrowserPath2D | typeof MockPath2D;
120
- documentFactory: DocumentFactory;
121
+ documentFactory: BrowserDocumentFactory | MockDocumentFactory;
121
122
  getDOMParser: GetDOMParser;
122
123
  measureCtx: CanvasRenderingContext2D;
123
124
  i18n: I18NextInterface;
@@ -0,0 +1,8 @@
1
+ import { DocumentFactory } from "./DocumentFactory";
2
+ export declare class MockDocumentFactory implements DocumentFactory {
3
+ private logPreInitializationCall;
4
+ createElement(tagName: string): HTMLElement;
5
+ createElementNS(namespace: string, tagName: string): Element;
6
+ caretPositionFromPoint(x: number, y: number, options?: CaretPositionFromPointOptions): CaretPosition | null;
7
+ caretRangeFromPoint(x: number, y: number): Range | null;
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",