@operato/board 0.2.15

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 (69) hide show
  1. package/.storybook/main.js +3 -0
  2. package/.storybook/server.mjs +8 -0
  3. package/CHANGELOG.md +22 -0
  4. package/LICENSE +21 -0
  5. package/README.md +95 -0
  6. package/custom-elements.json +1377 -0
  7. package/demo/index-player.html +101 -0
  8. package/demo/index-viewer.html +101 -0
  9. package/demo/index.html +101 -0
  10. package/dist/src/index.d.ts +2 -0
  11. package/dist/src/index.js +3 -0
  12. package/dist/src/index.js.map +1 -0
  13. package/dist/src/ox-board-player copy.d.ts +39 -0
  14. package/dist/src/ox-board-player copy.js +258 -0
  15. package/dist/src/ox-board-player copy.js.map +1 -0
  16. package/dist/src/ox-board-player-control.d.ts +39 -0
  17. package/dist/src/ox-board-player-control.js +390 -0
  18. package/dist/src/ox-board-player-control.js.map +1 -0
  19. package/dist/src/ox-board-player-style.d.ts +1 -0
  20. package/dist/src/ox-board-player-style.js +200 -0
  21. package/dist/src/ox-board-player-style.js.map +1 -0
  22. package/dist/src/ox-board-player.d.ts +39 -0
  23. package/dist/src/ox-board-player.js +284 -0
  24. package/dist/src/ox-board-player.js.map +1 -0
  25. package/dist/src/ox-board-viewer.d.ts +45 -0
  26. package/dist/src/ox-board-viewer.js +491 -0
  27. package/dist/src/ox-board-viewer.js.map +1 -0
  28. package/dist/src/ox-board-wrapper.d.ts +1 -0
  29. package/dist/src/ox-board-wrapper.js +88 -0
  30. package/dist/src/ox-board-wrapper.js.map +1 -0
  31. package/dist/src/player/board-player-carousel.d.ts +1 -0
  32. package/dist/src/player/board-player-carousel.js +205 -0
  33. package/dist/src/player/board-player-carousel.js.map +1 -0
  34. package/dist/src/player/board-player-grid.d.ts +1 -0
  35. package/dist/src/player/board-player-grid.js +78 -0
  36. package/dist/src/player/board-player-grid.js.map +1 -0
  37. package/dist/src/utils/fullscreen.d.ts +14 -0
  38. package/dist/src/utils/fullscreen.js +69 -0
  39. package/dist/src/utils/fullscreen.js.map +1 -0
  40. package/dist/src/utils/os.d.ts +20 -0
  41. package/dist/src/utils/os.js +41 -0
  42. package/dist/src/utils/os.js.map +1 -0
  43. package/dist/src/utils/swipe-listener.d.ts +10 -0
  44. package/dist/src/utils/swipe-listener.js +257 -0
  45. package/dist/src/utils/swipe-listener.js.map +1 -0
  46. package/dist/stories/index.stories.d.ts +33 -0
  47. package/dist/stories/index.stories.js +33 -0
  48. package/dist/stories/index.stories.js.map +1 -0
  49. package/dist/test/board-viewer.test.d.ts +1 -0
  50. package/dist/test/board-viewer.test.js +24 -0
  51. package/dist/test/board-viewer.test.js.map +1 -0
  52. package/dist/tsconfig.tsbuildinfo +1 -0
  53. package/package.json +76 -0
  54. package/src/index.ts +2 -0
  55. package/src/ox-board-player-style.ts +200 -0
  56. package/src/ox-board-player.ts +292 -0
  57. package/src/ox-board-viewer.ts +534 -0
  58. package/src/ox-board-wrapper.ts +93 -0
  59. package/src/player/board-player-carousel.ts +197 -0
  60. package/src/player/board-player-grid.ts +78 -0
  61. package/src/utils/fullscreen.ts +82 -0
  62. package/src/utils/os.ts +41 -0
  63. package/src/utils/swipe-listener.ts +290 -0
  64. package/src/utils/things-scene.d.ts +1 -0
  65. package/stories/index.stories.ts +52 -0
  66. package/test/board-viewer.test.ts +35 -0
  67. package/tsconfig.json +22 -0
  68. package/web-dev-server.config.mjs +28 -0
  69. package/web-test-runner.config.mjs +29 -0
@@ -0,0 +1,257 @@
1
+ /**
2
+ * Starts monitoring swipes on the given element and
3
+ * emits `swipe` event when a swipe gesture is performed.
4
+ * @param {DOMElement} element Element on which to listen for swipe gestures.
5
+ * @param {Object} options Optional: Options.
6
+ * @return {Object}
7
+ */
8
+ export function SwipeListener(element, options) {
9
+ if (!element)
10
+ return;
11
+ // CustomEvent polyfill
12
+ if (typeof window !== 'undefined') {
13
+ ;
14
+ (function () {
15
+ if (typeof window.CustomEvent === 'function')
16
+ return false;
17
+ function CustomEvent(event, params) {
18
+ params = params || { bubbles: false, cancelable: false, detail: undefined };
19
+ var evt = document.createEvent('CustomEvent');
20
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
21
+ return evt;
22
+ }
23
+ CustomEvent.prototype = window.Event.prototype;
24
+ window.CustomEvent = CustomEvent;
25
+ })();
26
+ }
27
+ let defaultOpts = {
28
+ minHorizontal: 10,
29
+ minVertical: 10,
30
+ deltaHorizontal: 3,
31
+ deltaVertical: 5,
32
+ preventScroll: false,
33
+ lockAxis: true,
34
+ touch: true,
35
+ mouse: true // Listen for mouse events
36
+ };
37
+ // Set options
38
+ if (!options) {
39
+ options = {};
40
+ }
41
+ options = {
42
+ ...defaultOpts,
43
+ ...options
44
+ };
45
+ // Store the touches
46
+ let touches = [];
47
+ // Not dragging by default.
48
+ let dragging = false;
49
+ // When mouse-click is started, make dragging true.
50
+ const _mousedown = function (e) {
51
+ dragging = true;
52
+ };
53
+ // When mouse-click is released, make dragging false and signify end by imitating `touchend`.
54
+ const _mouseup = function (e) {
55
+ dragging = false;
56
+ _touchend(e);
57
+ };
58
+ // When mouse is moved while being clicked, imitate a `touchmove`.
59
+ const _mousemove = function (e) {
60
+ if (dragging) {
61
+ ;
62
+ e.changedTouches = [
63
+ {
64
+ clientX: e.clientX,
65
+ clientY: e.clientY
66
+ }
67
+ ];
68
+ _touchmove(e);
69
+ }
70
+ };
71
+ if (options.mouse) {
72
+ element.addEventListener('mousedown', _mousedown);
73
+ element.addEventListener('mouseup', _mouseup);
74
+ element.addEventListener('mousemove', _mousemove);
75
+ }
76
+ // When the swipe is completed, calculate the direction.
77
+ const _touchend = function (e) {
78
+ if (!touches.length)
79
+ return;
80
+ const touch = typeof TouchEvent === 'function' && e instanceof TouchEvent;
81
+ let x = [], y = [];
82
+ let directions = {
83
+ top: false,
84
+ right: false,
85
+ bottom: false,
86
+ left: false
87
+ };
88
+ for (let i = 0; i < touches.length; i++) {
89
+ x.push(touches[i].x);
90
+ y.push(touches[i].y);
91
+ }
92
+ const xs = x[0], xe = x[x.length - 1], // Start and end x-coords
93
+ ys = y[0], ye = y[y.length - 1]; // Start and end y-coords
94
+ const eventCoords = {
95
+ x: [xs, xe],
96
+ y: [ys, ye]
97
+ };
98
+ if (touches.length > 1) {
99
+ const swipeReleaseEventData = {
100
+ detail: {
101
+ touch,
102
+ target: e.target,
103
+ ...eventCoords
104
+ }
105
+ };
106
+ let swipeReleaseEvent = new CustomEvent('swiperelease', swipeReleaseEventData);
107
+ element.dispatchEvent(swipeReleaseEvent);
108
+ }
109
+ // Determine left or right
110
+ let diff = x[0] - x[x.length - 1];
111
+ let swipe = 'none';
112
+ if (diff > 0) {
113
+ swipe = 'left';
114
+ }
115
+ else {
116
+ swipe = 'right';
117
+ }
118
+ let min = Math.min(...x), max = Math.max(...x), _diff;
119
+ // If minimum horizontal distance was travelled
120
+ if (Math.abs(diff) >= options.minHorizontal) {
121
+ switch (swipe) {
122
+ case 'left':
123
+ _diff = Math.abs(min - x[x.length - 1]);
124
+ if (_diff <= options.deltaHorizontal) {
125
+ directions.left = true;
126
+ }
127
+ break;
128
+ case 'right':
129
+ _diff = Math.abs(max - x[x.length - 1]);
130
+ if (_diff <= options.deltaHorizontal) {
131
+ directions.right = true;
132
+ }
133
+ break;
134
+ }
135
+ }
136
+ // Determine top or bottom
137
+ diff = y[0] - y[y.length - 1];
138
+ swipe = 'none';
139
+ if (diff > 0) {
140
+ swipe = 'top';
141
+ }
142
+ else {
143
+ swipe = 'bottom';
144
+ }
145
+ min = Math.min(...y);
146
+ max = Math.max(...y);
147
+ // If minimum vertical distance was travelled
148
+ if (Math.abs(diff) >= options.minVertical) {
149
+ switch (swipe) {
150
+ case 'top':
151
+ _diff = Math.abs(min - y[y.length - 1]);
152
+ if (_diff <= options.deltaVertical) {
153
+ directions.top = true;
154
+ }
155
+ break;
156
+ case 'bottom':
157
+ _diff = Math.abs(max - y[y.length - 1]);
158
+ if (_diff <= options.deltaVertical) {
159
+ directions.bottom = true;
160
+ }
161
+ break;
162
+ }
163
+ }
164
+ // Clear touches array.
165
+ touches = [];
166
+ // If there is a swipe direction, emit an event.
167
+ if (directions.top || directions.right || directions.bottom || directions.left) {
168
+ /**
169
+ * If lockAxis is true, determine which axis to select.
170
+ * The axis with the most travel is selected.
171
+ * TODO: Factor in for the orientation of the device
172
+ * and use it as a weight to determine the travel along an axis.
173
+ */
174
+ if (options.lockAxis) {
175
+ if ((directions.left || directions.right) && Math.abs(xs - xe) > Math.abs(ys - ye)) {
176
+ directions.top = directions.bottom = false;
177
+ }
178
+ else if ((directions.top || directions.bottom) && Math.abs(xs - xe) < Math.abs(ys - ye)) {
179
+ directions.left = directions.right = false;
180
+ }
181
+ }
182
+ const eventData = {
183
+ detail: {
184
+ directions,
185
+ touch,
186
+ target: e.target,
187
+ ...eventCoords
188
+ }
189
+ };
190
+ let event = new CustomEvent('swipe', eventData);
191
+ element.dispatchEvent(event);
192
+ }
193
+ else {
194
+ let cancelEvent = new CustomEvent('swipecancel', {
195
+ detail: {
196
+ touch,
197
+ target: e.target,
198
+ ...eventCoords
199
+ }
200
+ });
201
+ element.dispatchEvent(cancelEvent);
202
+ }
203
+ };
204
+ // When a swipe is performed, store the coords.
205
+ const _touchmove = function (e) {
206
+ let touch = e.changedTouches[0];
207
+ touches.push({
208
+ x: touch.clientX,
209
+ y: touch.clientY
210
+ });
211
+ // Emit a `swiping` event if there are more than one touch-points.
212
+ if (touches.length > 1) {
213
+ const xs = touches[0].x, // Start and end x-coords
214
+ xe = touches[touches.length - 1].x, ys = touches[0].y, // Start and end y-coords
215
+ ye = touches[touches.length - 1].y, eventData = {
216
+ detail: {
217
+ x: [xs, xe],
218
+ y: [ys, ye],
219
+ touch: typeof TouchEvent === 'function' && e instanceof TouchEvent,
220
+ target: e.target
221
+ }
222
+ };
223
+ let event = new CustomEvent('swiping', eventData);
224
+ const shouldPrevent = options.preventScroll === true || (typeof options.preventScroll === 'function' && options.preventScroll(event));
225
+ if (shouldPrevent) {
226
+ e.preventDefault();
227
+ }
228
+ element.dispatchEvent(event);
229
+ }
230
+ };
231
+ // Test via a getter in the options object to see if the passive property is accessed
232
+ let passiveOptions = false;
233
+ try {
234
+ const testOptions = Object.defineProperty({}, 'passive', {
235
+ get: function () {
236
+ passiveOptions = { passive: !options.preventScroll };
237
+ }
238
+ });
239
+ window.addEventListener('testPassive', null, testOptions);
240
+ window.removeEventListener('testPassive', null, testOptions);
241
+ }
242
+ catch (e) { }
243
+ if (options.touch) {
244
+ element.addEventListener('touchmove', _touchmove, passiveOptions);
245
+ element.addEventListener('touchend', _touchend);
246
+ }
247
+ return {
248
+ off: function () {
249
+ element.removeEventListener('touchmove', _touchmove, passiveOptions);
250
+ element.removeEventListener('touchend', _touchend);
251
+ element.removeEventListener('mousedown', _mousedown);
252
+ element.removeEventListener('mouseup', _mouseup);
253
+ element.removeEventListener('mousemove', _mousemove);
254
+ }
255
+ };
256
+ }
257
+ //# sourceMappingURL=swipe-listener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swipe-listener.js","sourceRoot":"","sources":["../../../src/utils/swipe-listener.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,OAAoB,EAAE,OAAa;IAC/D,IAAI,CAAC,OAAO;QAAE,OAAM;IAEpB,uBAAuB;IACvB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,CAAC;QAAA,CAAC;YACA,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,UAAU;gBAAE,OAAO,KAAK,CAAA;YAC1D,SAAS,WAAW,CAAC,KAAa,EAAE,MAAW;gBAC7C,MAAM,GAAG,MAAM,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;gBAC3E,IAAI,GAAG,GAAG,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAA;gBAC7C,GAAG,CAAC,eAAe,CAAC,KAAK,EAAE,M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,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE;YACvD,GAAG,EAAE;gBACH,cAAc,GAAG,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,CAAA;YACtD,CAAC;SACF,CAAC,CAAA;QACF,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAW,EAAE,WAAW,CAAC,CAAA;QAChE,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAW,EAAE,WAAW,CAAC,CAAA;KACpE;IAAC,OAAO,CAAC,EAAE,GAAE;IAEd,IAAI,OAAO,CAAC,KAAK,EAAE;QACjB,OAAO,CAAC,gBAAgB,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAA;QACjE,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;KAChD;IAED,OAAO;QACL,GAAG,EAAE;YACH,OAAO,CAAC,mBAAmB,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAA;YACpE,OAAO,CAAC,mBAAmB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;YAClD,OAAO,CAAC,mBAAmB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;YACpD,OAAO,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;YAChD,OAAO,CAAC,mBAAmB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;QACtD,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["/**\n * Starts monitoring swipes on the given element and\n * emits `swipe` event when a swipe gesture is performed.\n * @param {DOMElement} element Element on which to listen for swipe gestures.\n * @param {Object} options Optional: Options.\n * @return {Object}\n */\nexport function SwipeListener(element: HTMLElement, options?: any) {\n if (!element) return\n\n // CustomEvent polyfill\n if (typeof window !== 'undefined') {\n ;(function () {\n if (typeof window.CustomEvent === 'function') return false\n function CustomEvent(event: string, params: any) {\n params = params || { bubbles: false, cancelable: false, detail: undefined }\n var evt = document.createEvent('CustomEvent')\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail)\n return evt\n }\n CustomEvent.prototype = window.Event.prototype\n ;(window as any).CustomEvent = CustomEvent\n })()\n }\n\n let defaultOpts = {\n minHorizontal: 10, // Minimum number of pixels traveled to count as a horizontal swipe.\n minVertical: 10, // Minimum number of pixels traveled to count as a vertical swipe.\n deltaHorizontal: 3, // Delta for horizontal swipe\n deltaVertical: 5, // Delta for vertical swipe\n preventScroll: false, // Prevents scrolling when swiping.\n lockAxis: true, // Select only one axis to be true instead of multiple.\n touch: true, // Listen for touch events\n mouse: true // Listen for mouse events\n }\n\n // Set options\n if (!options) {\n options = {}\n }\n options = {\n ...defaultOpts,\n ...options\n }\n\n // Store the touches\n let touches: Array<{ x: number; y: number }> = []\n\n // Not dragging by default.\n let dragging = false\n\n // When mouse-click is started, make dragging true.\n const _mousedown = function (e: MouseEvent) {\n dragging = true\n }\n\n // When mouse-click is released, make dragging false and signify end by imitating `touchend`.\n const _mouseup = function (e: MouseEvent) {\n dragging = false\n _touchend(e as any)\n }\n\n // When mouse is moved while being clicked, imitate a `touchmove`.\n const _mousemove = function (e: MouseEvent) {\n if (dragging) {\n ;(e as any).changedTouches = [\n {\n clientX: e.clientX,\n clientY: e.clientY\n }\n ]\n _touchmove(e as any)\n }\n }\n\n if (options.mouse) {\n element.addEventListener('mousedown', _mousedown)\n element.addEventListener('mouseup', _mouseup)\n element.addEventListener('mousemove', _mousemove)\n }\n\n // When the swipe is completed, calculate the direction.\n const _touchend = function (e: TouchEvent) {\n if (!touches.length) return\n\n const touch = typeof TouchEvent === 'function' && e instanceof TouchEvent\n\n let x = [],\n y = []\n\n let directions = {\n top: false,\n right: false,\n bottom: false,\n left: false\n }\n\n for (let i = 0; i < touches.length; i++) {\n x.push(touches[i].x)\n y.push(touches[i].y)\n }\n\n const xs = x[0],\n xe = x[x.length - 1], // Start and end x-coords\n ys = y[0],\n ye = y[y.length - 1] // Start and end y-coords\n\n const eventCoords = {\n x: [xs, xe],\n y: [ys, ye]\n }\n\n if (touches.length > 1) {\n const swipeReleaseEventData = {\n detail: {\n touch,\n target: e.target,\n ...eventCoords\n }\n }\n\n let swipeReleaseEvent = new CustomEvent('swiperelease', swipeReleaseEventData)\n element.dispatchEvent(swipeReleaseEvent)\n }\n\n // Determine left or right\n let diff = x[0] - x[x.length - 1]\n let swipe = 'none'\n if (diff > 0) {\n swipe = 'left'\n } else {\n swipe = 'right'\n }\n\n let min = Math.min(...x),\n max = Math.max(...x),\n _diff\n\n // If minimum horizontal distance was travelled\n if (Math.abs(diff) >= options.minHorizontal) {\n switch (swipe) {\n case 'left':\n _diff = Math.abs(min - x[x.length - 1])\n if (_diff <= options.deltaHorizontal) {\n directions.left = true\n }\n break\n case 'right':\n _diff = Math.abs(max - x[x.length - 1])\n if (_diff <= options.deltaHorizontal) {\n directions.right = true\n }\n break\n }\n }\n\n // Determine top or bottom\n diff = y[0] - y[y.length - 1]\n swipe = 'none'\n if (diff > 0) {\n swipe = 'top'\n } else {\n swipe = 'bottom'\n }\n\n min = Math.min(...y)\n max = Math.max(...y)\n\n // If minimum vertical distance was travelled\n if (Math.abs(diff) >= options.minVertical) {\n switch (swipe) {\n case 'top':\n _diff = Math.abs(min - y[y.length - 1])\n if (_diff <= options.deltaVertical) {\n directions.top = true\n }\n break\n case 'bottom':\n _diff = Math.abs(max - y[y.length - 1])\n if (_diff <= options.deltaVertical) {\n directions.bottom = true\n }\n break\n }\n }\n\n // Clear touches array.\n touches = []\n\n // If there is a swipe direction, emit an event.\n if (directions.top || directions.right || directions.bottom || directions.left) {\n /**\n * If lockAxis is true, determine which axis to select.\n * The axis with the most travel is selected.\n * TODO: Factor in for the orientation of the device\n * and use it as a weight to determine the travel along an axis.\n */\n if (options.lockAxis) {\n if ((directions.left || directions.right) && Math.abs(xs - xe) > Math.abs(ys - ye)) {\n directions.top = directions.bottom = false\n } else if ((directions.top || directions.bottom) && Math.abs(xs - xe) < Math.abs(ys - ye)) {\n directions.left = directions.right = false\n }\n }\n\n const eventData = {\n detail: {\n directions,\n touch,\n target: e.target,\n ...eventCoords\n }\n }\n\n let event = new CustomEvent('swipe', eventData)\n element.dispatchEvent(event)\n } else {\n let cancelEvent = new CustomEvent('swipecancel', {\n detail: {\n touch,\n target: e.target,\n ...eventCoords\n }\n })\n element.dispatchEvent(cancelEvent)\n }\n }\n\n // When a swipe is performed, store the coords.\n const _touchmove = function (e: TouchEvent) {\n let touch = e.changedTouches[0]\n touches.push({\n x: touch.clientX,\n y: touch.clientY\n })\n\n // Emit a `swiping` event if there are more than one touch-points.\n if (touches.length > 1) {\n const xs = touches[0].x, // Start and end x-coords\n xe = touches[touches.length - 1].x,\n ys = touches[0].y, // Start and end y-coords\n ye = touches[touches.length - 1].y,\n eventData = {\n detail: {\n x: [xs, xe],\n y: [ys, ye],\n touch: typeof TouchEvent === 'function' && e instanceof TouchEvent,\n target: e.target\n }\n }\n let event = new CustomEvent('swiping', eventData)\n\n const shouldPrevent =\n options.preventScroll === true || (typeof options.preventScroll === 'function' && options.preventScroll(event))\n\n if (shouldPrevent) {\n e.preventDefault()\n }\n\n element.dispatchEvent(event)\n }\n }\n\n // Test via a getter in the options object to see if the passive property is accessed\n let passiveOptions: any = false\n try {\n const testOptions = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveOptions = { passive: !options.preventScroll }\n }\n })\n window.addEventListener('testPassive', null as any, testOptions)\n window.removeEventListener('testPassive', null as any, testOptions)\n } catch (e) {}\n\n if (options.touch) {\n element.addEventListener('touchmove', _touchmove, passiveOptions)\n element.addEventListener('touchend', _touchend)\n }\n\n return {\n off: function () {\n element.removeEventListener('touchmove', _touchmove, passiveOptions)\n element.removeEventListener('touchend', _touchend)\n element.removeEventListener('mousedown', _mousedown)\n element.removeEventListener('mouseup', _mouseup)\n element.removeEventListener('mousemove', _mousemove)\n }\n }\n}\n"]}
@@ -0,0 +1,33 @@
1
+ import '../index.js.js.js';
2
+ import { TemplateResult } from 'lit';
3
+ declare const _default: {
4
+ title: string;
5
+ component: string;
6
+ argTypes: {
7
+ title: {
8
+ control: string;
9
+ };
10
+ counter: {
11
+ control: string;
12
+ };
13
+ textColor: {
14
+ control: string;
15
+ };
16
+ };
17
+ };
18
+ export default _default;
19
+ interface Story<T> {
20
+ (args: T): TemplateResult;
21
+ args?: Partial<T>;
22
+ argTypes?: Record<string, unknown>;
23
+ }
24
+ interface ArgTypes {
25
+ title?: string;
26
+ counter?: number;
27
+ textColor?: string;
28
+ slot?: TemplateResult;
29
+ }
30
+ export declare const Regular: Story<ArgTypes>;
31
+ export declare const CustomTitle: Story<ArgTypes>;
32
+ export declare const CustomCounter: Story<ArgTypes>;
33
+ export declare const SlottedContent: Story<ArgTypes>;
@@ -0,0 +1,33 @@
1
+ import '../index.js.js.js';
2
+ import { html } from 'lit';
3
+ export default {
4
+ title: 'BoardViewer',
5
+ component: 'board-viewer',
6
+ argTypes: {
7
+ title: { control: 'text' },
8
+ counter: { control: 'number' },
9
+ textColor: { control: 'color' }
10
+ }
11
+ };
12
+ const Template = ({ title = 'Hello world', counter = 5, textColor, slot }) => html `
13
+ <ox-board-viewer style="--board-viewer-text-color: ${textColor || 'black'}" .title=${title} .counter=${counter}>
14
+ ${slot}
15
+ </ox-board-viewer>
16
+ `;
17
+ export const Regular = Template.bind({});
18
+ export const CustomTitle = Template.bind({});
19
+ CustomTitle.args = {
20
+ title: 'My title'
21
+ };
22
+ export const CustomCounter = Template.bind({});
23
+ CustomCounter.args = {
24
+ counter: 123456
25
+ };
26
+ export const SlottedContent = Template.bind({});
27
+ SlottedContent.args = {
28
+ slot: html `<p>Slotted content</p>`
29
+ };
30
+ SlottedContent.argTypes = {
31
+ slot: { table: { disable: true } }
32
+ };
33
+ //# sourceMappingURL=index.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../stories/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,cAAc;IACzB,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9B,SAAS,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KAChC;CACF,CAAA;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,aAAa,EAAE,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;uDACtD,SAAS,IAAI,OAAO,YAAY,KAAK,aAAa,OAAO;MAC1G,IAAI;;CAET,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAExC,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,WAAW,CAAC,IAAI,GAAG;IACjB,KAAK,EAAE,UAAU;CAClB,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC9C,aAAa,CAAC,IAAI,GAAG;IACnB,OAAO,EAAE,MAAM;CAChB,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC/C,cAAc,CAAC,IAAI,GAAG;IACpB,IAAI,EAAE,IAAI,CAAA,wBAAwB;CACnC,CAAA;AACD,cAAc,CAAC,QAAQ,GAAG;IACxB,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACnC,CAAA","sourcesContent":["import '../index.js.js.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'BoardViewer',\n component: 'board-viewer',\n argTypes: {\n title: { control: 'text' },\n counter: { control: 'number' },\n textColor: { control: 'color' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n title?: string\n counter?: number\n textColor?: string\n slot?: TemplateResult\n}\n\nconst Template: Story<ArgTypes> = ({ title = 'Hello world', counter = 5, textColor, slot }: ArgTypes) => html`\n <ox-board-viewer style=\"--board-viewer-text-color: ${textColor || 'black'}\" .title=${title} .counter=${counter}>\n ${slot}\n </ox-board-viewer>\n`\n\nexport const Regular = Template.bind({})\n\nexport const CustomTitle = Template.bind({})\nCustomTitle.args = {\n title: 'My title'\n}\n\nexport const CustomCounter = Template.bind({})\nCustomCounter.args = {\n counter: 123456\n}\n\nexport const SlottedContent = Template.bind({})\nSlottedContent.args = {\n slot: html`<p>Slotted content</p>`\n}\nSlottedContent.argTypes = {\n slot: { table: { disable: true } }\n}\n"]}
@@ -0,0 +1 @@
1
+ import '../board-viewer';
@@ -0,0 +1,24 @@
1
+ import '../board-viewer';
2
+ import { html } from 'lit';
3
+ import { expect, fixture } from '@open-wc/testing';
4
+ describe('BoardViewer', () => {
5
+ it('has a default title "Hey there" and counter 5', async () => {
6
+ const el = await fixture(html ` <ox-board-viewer></ox-board-viewer> `);
7
+ // expect(el.title).to.equal('Hey there')
8
+ // expect(el.counter).to.equal(5)
9
+ });
10
+ it('increases the counter on button click', async () => {
11
+ const el = await fixture(html ` <ox-board-viewer></ox-board-viewer> `);
12
+ el.renderRoot.querySelector('button').click();
13
+ // expect(el.counter).to.equal(6)
14
+ });
15
+ it('can override the title via attribute', async () => {
16
+ const el = await fixture(html ` <board-viewer title="attribute title"></ox-board-viewer> `);
17
+ expect(el.title).to.equal('attribute title');
18
+ });
19
+ it('passes the a11y audit', async () => {
20
+ const el = await fixture(html ` <ox-board-viewer></ox-board-viewer> `);
21
+ await expect(el).shadowDom.to.be.accessible();
22
+ });
23
+ });
24
+ //# sourceMappingURL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sourcesContent":["import '../board-viewer'\n\nimport { html } from 'lit'\n\nimport { expect, fixture } from '@open-wc/testing'\n\nimport { BoardViewer } from '../src/ox-board-viewer'\n\ndescribe('BoardViewer', () => {\n it('has a default title \"Hey there\" and counter 5', async () => {\n const el = await fixture<BoardViewer>(html` <ox-board-viewer></ox-board-viewer> `)\n\n // expect(el.title).to.equal('Hey there')\n // expect(el.counter).to.equal(5)\n })\n\n it('increases the counter on button click', async () => {\n const el = await fixture<BoardViewer>(html` <ox-board-viewer></ox-board-viewer> `)\n el.renderRoot!.querySelector('button')!.click()\n\n // expect(el.counter).to.equal(6)\n })\n\n it('can override the title via attribute', async () => {\n const el = await fixture<BoardViewer>(html` <board-viewer title=\"attribute title\"></ox-board-viewer> `)\n\n expect(el.title).to.equal('attribute title')\n })\n\n it('passes the a11y audit', async () => {\n const el = await fixture<BoardViewer>(html` <ox-board-viewer></ox-board-viewer> `)\n\n await expect(el).shadowDom.to.be.accessible()\n })\n})\n"]}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@material/base/foundation.d.ts","../../../node_modules/@material/base/types.d.ts","../../../node_modules/@material/base/component.d.ts","../../../node_modules/@material/base/index.d.ts","../../../node_modules/@material/mwc-base/node_modules/lit/node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@material/mwc-base/node_modules/lit/node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@material/mwc-base/node_modules/lit/node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/lit-html/directive.d.ts","../../../node_modules/lit-html/lit-html.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/@material/mwc-base/node_modules/lit/index.d.ts","../../../node_modules/@material/mwc-base/utils.d.ts","../../../node_modules/@material/mwc-base/base-element.d.ts","../../../node_modules/@material/ripple/types.d.ts","../../../node_modules/@material/ripple/adapter.d.ts","../../../node_modules/@material/ripple/foundation.d.ts","../../../node_modules/@material/mwc-ripple/node_modules/lit/index.d.ts","../../../node_modules/@material/mwc-ripple/mwc-ripple-base.d.ts","../../../node_modules/@material/mwc-ripple/mwc-ripple.d.ts","../../../node_modules/@material/mwc-ripple/ripple-handlers.d.ts","../../../node_modules/@material/mwc-fab/node_modules/lit/index.d.ts","../../../node_modules/@material/mwc-fab/mwc-fab-base.d.ts","../../../node_modules/@material/mwc-fab/mwc-fab.d.ts","../../../node_modules/@material/mwc-icon/node_modules/lit/index.d.ts","../../../node_modules/@material/mwc-icon/mwc-icon.d.ts","../../../node_modules/lit/index.d.ts","../../../node_modules/@lit/reactive-element/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../../../node_modules/@lit/reactive-element/decorators/property.d.ts","../../../node_modules/@lit/reactive-element/decorators/state.d.ts","../../../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../../../node_modules/@lit/reactive-element/decorators/query.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../../../node_modules/lit/decorators.d.ts","../src/utils/os.ts","../src/utils/fullscreen.ts","../src/ox-board-viewer.ts","../src/ox-board-wrapper.ts","../src/player/board-player-grid.ts","../src/player/board-player-carousel.ts","../src/utils/swipe-listener.ts","../../../node_modules/lit-element/decorators.d.ts","../../../node_modules/lit-element/index.d.ts","../src/ox-board-player-style.ts","../src/ox-board-player.ts","../src/index.ts","../src/utils/things-scene.d.ts","../stories/index.stories.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/get-diffable-html.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff-plugin.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/chai-dom-diff.d.ts","../../../node_modules/@open-wc/semantic-dom-diff/index.d.ts","../../../node_modules/chai-a11y-axe/chai-a11y-axe-plugin.d.ts","../../../node_modules/chai-a11y-axe/src/accessible.d.ts","../../../node_modules/chai-a11y-axe/index.d.ts","../../../node_modules/@types/chai-dom/index.d.ts","../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts","../../../node_modules/@types/sinon/index.d.ts","../../../node_modules/@types/sinon-chai/index.d.ts","../../../node_modules/@open-wc/testing/register-chai-plugins.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/elementupdated.d.ts","../../../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@open-wc/testing-helpers/node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/@open-wc/testing-helpers/node_modules/lit-html/directive.d.ts","../../../node_modules/@open-wc/testing-helpers/node_modules/lit-html/lit-html.d.ts","../../../node_modules/@open-wc/testing-helpers/node_modules/lit-element/lit-element.d.ts","../../../node_modules/@open-wc/testing-helpers/node_modules/lit/index.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/litfixture.d.ts","../../../node_modules/@open-wc/dedupe-mixin/index.d.ts","../../../node_modules/@open-wc/scoped-elements/node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/@open-wc/scoped-elements/types/src/types.d.ts","../../../node_modules/@open-wc/scoped-elements/types/src/scopedelementsmixin.d.ts","../../../node_modules/@open-wc/scoped-elements/types/index.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixture-no-side-effect.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixture.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/fixturewrapper.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/helpers.d.ts","../../../node_modules/@open-wc/testing-helpers/types/src/stringfixture.d.ts","../../../node_modules/@open-wc/testing-helpers/types/index.d.ts","../../../node_modules/@open-wc/testing/index.d.ts","../test/board-viewer.test.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75","a0667520a6521c12128fc28cbd5b2af58eef11c5b2a7441e0f0d47f50bf6c8e3","820c26194ad4089bc503b02bbedbd86a865e9c8a05c58ef88c8d19d9c019712a","eda22dbab152e3579ee541522ba2ddc8e24e32fd7535b913709848f16c517caa","6778cdeced9eb23210b26b801cd757b03c052b7738628475acad7c7a3e94c20f","0c8a56610b08f55e29ffb466cd27626ad6dbe822312a398026e82270c63088e3","1e5743b25a63fd34ffbae89adcbf248ee17db6ed08d90079ffa93803c3e80d2a","3bdd9bf64c082a3977eda98dcd9c7dc3253532d45e957a7f869539129a04005c","2fcd2d22b1f30555e785105597cd8f57ed50300e213c4f1bbca6ae149f782c38",{"version":"bb4248c7f953233ac52332088fac897d62b82be07244e551d87c5049600b6cf7","affectsGlobalScope":true},"70f04c91d3186b1b10157157887fab664968fc9b88377785a5ee42750c202c6d","06e20da1bc94df355f22ac7a9533c2488816ec4cb9134d9b160a263629a07072","3bdd9bf64c082a3977eda98dcd9c7dc3253532d45e957a7f869539129a04005c","c311ef8d8b159d0c268b415f78c1949498dc2d14455a9891c5b8ef84625b1e41","f07a77a7fb1d49aa2b61cb68bf712a083487acd7130d20223a83de03af0c257d","0dcf4c2bf1bb547e2ae5b8dce4656a56fbd15e3401ff5236ea0b93b6c60f9249","9917d466f5b05c616c35c35a778464ae4ec15e00bfce90098743f448fc063d54","d375de88ab19f6c105a65fc89eca1ae782362c5c395283b0c85ef39c7b835dfe","025eb503355f4bbe3e3fecc0bd1a72ecaa9cda73db6e0ecc657779d4172695f2","7b3c1d688dcb8645b5a6c37bce5b047da92b4c298ed8709e03e987e0efb035b1","f07a77a7fb1d49aa2b61cb68bf712a083487acd7130d20223a83de03af0c257d","00096d29ccab72a72092cca31fb92d78b92880bddc53e5904149d21e76648c48",{"version":"87e9ab1e4466fb88c90b179130baaab80d91dd1644de2eb6512c79b24ec11216","affectsGlobalScope":true},"95ff8a2ebfc0b8b9613faf8d9c948dcc6bf8d5c0052a2d4ae21cacf6cdd28cb9","f07a77a7fb1d49aa2b61cb68bf712a083487acd7130d20223a83de03af0c257d","a3b56559920d52e72ecd33e987ced79156926782cd7ad40a64fcdf47ee1d526c",{"version":"decc8ea56258e70dd9faacdd89566644059201a64e89d3a98c200520339b6b84","affectsGlobalScope":true},"f07a77a7fb1d49aa2b61cb68bf712a083487acd7130d20223a83de03af0c257d",{"version":"27b285e901600242883d62a5fff9f5d262c6fa128b6e6c6963f981f2630a957e","affectsGlobalScope":true},"f07a77a7fb1d49aa2b61cb68bf712a083487acd7130d20223a83de03af0c257d","97c58f6db61d45712d91d2260994817ae2b568bbb37cc280013079b6b5d2232d","ac388c7c7a262213a3700451bc921e382a93fb27c0252c34ccf03540b4ce044b","9bdb35d0b28dcd5d8f0879bd29f0cf07b7eb48aa63be4dd44057e32fcfeb1c83","fb0107c83e2e0e75b77dacd0c3c6c3ab6844e98dce2a8f858c6f0a57c12136a6","84610cf09dee3cefc910555318f1ad7b45f1cba36905a86849324ca4fead2385","a25d1e52291791819032826af5c52987e16ffdb96e8bb69f7f1790f5ab080be6","d660961abada6b5030461f3322ef3a2e1d9fec74167574f8b590a7796cf90a72","707b4eae3d469b2f347d2083037151922f94c370a9456ebd5ac0a4fb7441c7e7","ef509d57201aa4e2e3e2b3d1fafd066a8ce68cd2caea737d539c3544f5a99a67","84c66a77a1302611ea5001dc88d10de1b5d87c6b2f30a48585495217421ce1ac",{"version":"7e5708fa640b725f9071833a04d4effb427b18ad41a3725d58a525ed02aee1d6","signature":"0de634db797c8bbed3beeab9adca22c83b194ccbec5410e61c2a62d944dac5a3"},{"version":"b18b9acb5cff76a70fec4f1effd260b9f956bba6edb28c1e160979f0b9a51dd6","signature":"7179b6924a816d72bf206803d8cdc27ccc14f02f2d4f4145d5183eb083f5bf17"},{"version":"6ad379be95171b3bc78bdf0cc14bcbf8dfe0fcd7f6fcecb49ec83b53837efcd0","signature":"c866c93016785671a7de19884312391af98b35ffa5a363d9ec9b708e8b728a78"},{"version":"ae76529cca012d6cf66d19e4d73e13ab3d68b49d25ca1c873757decf0af3a255","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"49a45f01fb7d7d2f605c92c3b51dfb0b5223a97407500fbd54139466569f05c1","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"f644e3c6c6702682c3f3212823c327b13615f872dae3abf90609833b82e553d9","signature":"45ee604dd5b63a4c1061c5cda4f7f2a6ade658d204a0531c1fe2f79791afd677"},{"version":"d1d0e3e5bd9e070e932c938bd580da6fce3b6a9e230b7156584f7b38ce3a9c4e","signature":"f8c86fcbfb0a1e69a0ed28d3249cc33c312fa23a39c17e15cbbcc539bdcdc303"},"73b7d7df7c0dbc9a4c07c8c0f9bf6b436a0c728884e3425b120a65dd7459584e","3e96c96efad5d403b16c4b3d9cf99b3e86267a046abef94fe37cfa97ec013f23",{"version":"cdc5042694d123e281a57d35bb390d7d1809e1680a47f6be797eb6029519af55","signature":"f7dc51825425fffb3630ed9219fb04e7de8fe730a441506efe8f9d4626b816b4"},{"version":"0be33bbce2632114160347109c68f8c4e299cb4fc4aebcdf360ad9c5e5fd74b4","signature":"886749f3b31215d83da40a2b5636a23491f885907c5edb5a065c39d27a21d7d5"},{"version":"eff140c41fcce25c311d50548f956131a0888213739d6a4f06067a9ccbc3126d","signature":"47613d3a5d16f083e93999838ab6985c4d703fb0eb341fbcd80d61c4367bd788"},"f9e70515f2d50c4f62ce32d707178918d79614366baf0311afc94039f062cd60","16ba22355926ccc8c476161d4169465973627db6f126d0979b82d254ab2faed8",{"version":"f7834c76f2d4db5fb156f2f18fdf855431843cf0d32620fcf24b836cd4a85096","affectsGlobalScope":true},"8a659f7d82d932649a78f89643c5b436953424a219d705d49b8b3d9ccd6e35ff",{"version":"75cd6dce1c5f87511772c891de86d0c9e6829e6273dea9f92a5bec9d0479d1e7","affectsGlobalScope":true},{"version":"cd711db43a952f15464b571ac11b7a440332cd52342bc92c4bf908c70688f57f","affectsGlobalScope":true},"9d8709c916778cb34830708ed47b78e9a46d1fb2eb73a682b14eee990bed4aa6",{"version":"5d90911f942229eb9049feab241739a5ced76f137948f8f42a615e5f01d4e7ea","affectsGlobalScope":true},"999a90d30a3183dcee987d0a5a7c586aba5bacbf6ce087ba8635124082ccfeea","8a5878edd52f4a720560b4c6e6247e9ddc3df6118ad9cf2f9927903b03d5f440",{"version":"d95d76d79a0351572ec5b1a6cc1e5c4bce1be82eedeed7278d6f31ea1059fa69","affectsGlobalScope":true},"6b40029289530423f407a22755c85b81740f9acfd88d2b53564f8c1657c26660","15b043358a9bac56ee6a567d61adf545b3a09e2f2ead9c3ef3cc617ed3522e71",{"version":"b98f6185455945922c7cfdad772ec1c46e5c169a2d71aca6530e041f77665f03","affectsGlobalScope":true},"65b91a3725399231d3469529b5e27b85bf2aa98013e607f308e5fe260b47eeff","a11181f6d68200e83ccb1fb48b262a7132a3257e0a230f41c9dc4c351964297a","0c8a56610b08f55e29ffb466cd27626ad6dbe822312a398026e82270c63088e3","1e5743b25a63fd34ffbae89adcbf248ee17db6ed08d90079ffa93803c3e80d2a",{"version":"a25a80c5c07b61db0d40c5baba89c6584048536596e7e3ee7c632c46f641d932","affectsGlobalScope":true},"70f04c91d3186b1b10157157887fab664968fc9b88377785a5ee42750c202c6d","a0c7f94ed02009f741ef243b7adbfced3d1d2e2d79ea4d16af73946fac25dbf4",{"version":"f1bfa18deca3c5a0e2763c2757debee18626820315f50ab551d9cb283eb9a49f","affectsGlobalScope":true},"f07a77a7fb1d49aa2b61cb68bf712a083487acd7130d20223a83de03af0c257d","245731ddcde842fa1024619d54409f90128bb64070c6729088697944dbc58bd5","88cda4269c54f0803834fd62b2fac61af8bff7a085693f7ca9df85c1f19dee8a",{"version":"a25a80c5c07b61db0d40c5baba89c6584048536596e7e3ee7c632c46f641d932","affectsGlobalScope":true},{"version":"494f93d7c6e2178b8e0f53cc10977d2913753a6d7442907022b970d5c0a13d05","affectsGlobalScope":true},"8acb762a884708f254d0bfa25565c14c2a5b79d3767a13d03563ebf6520d0385","fdf0aa1a72ff0188a9013926201a391116ef6701cd439b89850786abdf755fb8","f0b43f422b01042dd784bee89f9c67330001a575258bb49d28fd56e1a581e92e","abf9ea97b78a7b239186cf5b7ed59c4a593abac3c408c8c95fc5e604cfdfdb43","ae91c9161caf0af81c89e780a045fc5ea8382407e516342e409c5db9161d3b32","2c387828a523cc77a4300f5deb063651c9346c5a36ccfbfc127c38df8ab45b0c","d598157512ae6e0d3aa6bb0dd261ae34845831dccf7bc7739695ee2589eb76f5","88740fc0276ac55a747251bc46c2ed96bf8d7455b0a800eff33b1a16df2b36e8","d2173e08898108c0aaa6dbfed27725b4a71f5817153800c86f03fa06456a2fc7",{"version":"31f9c5299e126171ac07b890cb389079c42db2eb01e15858316e5a4b686a4cfa","signature":"eb37b310d4a36ceef3935d066cf308641c433af023c3a27f00f69197ae8c8ea6"},"31c268bcfbbb3a89dd4019ff8001069024921c2c0fb73bccc6f8e6f2da7bff09","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"34f1d0e1f63dd8c0bdc1fd15ec2b7216fd709953781c4d1b1213d88e2d94db9e","affectsGlobalScope":true},"4be51d991034b331db6a518e5a9607cb136b6d3ab2a691191a7d481354836a5f",{"version":"fa56e5f529c26a31207fecafbfd88136936868a4c17f8a347f0e8e6ea18309ad","affectsGlobalScope":true},"2f3a95a0e681afcde084379ed3b404ee09971425cf4600c3dd8b6f4adf058896","3fe5750809a130a0c9ee5dbca9e262913a10d1deda3ddb1280a77b099197e937",{"version":"d7e32c36d30042b47cd8620b197d3e3381954cf8baa413dc4273796e4cf718a1","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","41a3a8f7ba70f6e10fad838a363157217163bd897416480d0ed516b5d63e727e","53cf527b7d4a7ee1c16eeadff678d6df9f2a98cd5ece18f0f9211d8080204734","0038ccd1c90bc523ee4f7eeabc3f4082a48a5775415855e46f142447b9ad1114","aacb7a1f78d635e42d1112144c83508f340722e5293f7f14091581193618dca3","87c064559d14068edb2861fc7d48c1a8196a63523e00cc29aadd57c0eefb24a5","226afbe8d2d18dc02d1aebb449af0a11a278acb98b42c763aeec6d5a8e654441",{"version":"c3a43212afe9781a304d8f5dd3895fd38a143ac46fb64b4d343122e38c83a9ab","affectsGlobalScope":true},"15bd9405b2d4353f043fa12442758a51aba5146d407aea031118605af9799032","01862fc59b8c037ea9fe03c6f3dc1ffc95bfc16fb37d58d6e7603706b9041d97","2163cfbd3438e495c08fb59b29740b1f96c7aec8ebb4faf9c9156f4fe94cb501","644a9cb29158878e67199d04c06699575d03812c90ea40c69d5a075fb8ec6b79","1f66294c9e9c24e84552cfaa70a27422811649de5a2efc69d3cf2ef38e833308","a82a261dac2131e55347889de6846a3e84741283d93d6525550ab3976be85cf6",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"1207275e727d14356922953c0597c77acad13e9812a0109a756c0c59ff0e87f3","dce04e108fbcbe674bceeea757269b7775a8a07693d6a58f55b36e649541675a","c90911387c5e9e024c309e63a14946a9bc3c71293e8f9d09eece16e11f167974","066f0de5d2acf0be06eb29a5ada8107f93891d7a983e6ba095260406650d742d",{"version":"6ae884f4861da8949f2c466b2d44fb087b2f1de82fe3449c3c52bd1d8cf998e6","affectsGlobalScope":true},"cbe717c2735bf2a6ceb29c2131232e74f4f95878072873dfb263566035024f99","5fd00b0ad7ef4e7eb69341da6ec17400922860afbdbc2cc46a37eba833d8a0bd","bc0c9dbd2b273d9466a31143a5f0118e8902232d906b3987d19d1bd67b96ee5d","757fec48e36f86c8b791b770c31f510d0e53817a95f61130df26df57cb382113","c5274b1cfbfb2610697727d460147756b686139af95cc487d894bc1c41133254","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"caa0d6f003d642fab06c4a90ac3c86ad0889b7693294e04360e935ed5376796b","affectsGlobalScope":true},"a279435e7813d1f061c0cab6ab77b1b9377e8d96851e5ed4a76a1ce6eb6e628f","28e6ac6505a2b6755ce0752cd4d2dbd880e0e4e9bbfeaa3c777821825db2711a",{"version":"8a4f510bad5e5f5312fd966d20675381a3467c0c8d1b528b7f8e5ebb732ba1c9","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","8ee0dfa79a0b3e43bd5c0554157051abd87ef47df49884eba3e6a10bba1ecdc1","dcbcf0056d7bcd4e716bd0cc9223913e58373095c4750250f525694d88f49962","715b8aedc97884235eac2346481e7f1cca0379f870a58a60d22f444f8b7c59a8","3dfbe800bece5d51c4a4abf726598bf4aa80b19ae4e8288ada7cf75efdc40930","2ac6c37c23dbb6a87d0657fbaa509bd077dd4ea066fecff1e94a01e19410d8c6","5d50d7b266824bd435c9696f71d64041db90667b6f95d5285adfa6946a73dde5","58250ab8b2768e6d713bb8271d4d1ed1029069bb94631764538a474fe1cb1eca","b9d6227d9cf5e2aac16c149377136b01e8692c0f82f185f6192c78285236e71d","555122eabf41efe584457b407892ed4420c5dc5404004eafed8bc365459f1eef","56f3ed639ae070160aaa79a626e0f956374c7dcd2093216f48cc952981ea2e93",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b77af427289204692955d5095b9c3c8505881678879fa3c8c89b6cce7babb9ee",{"version":"c4c03cf65951d980ba618ae9601d10438730803fc9c8a1f7b34af8739981e205","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[47,172],[70,172],[47,70,172],[45,46,172],[41,42,172],[172],[41,42,43,172],[42,44,54,55,172],[47,51,53,172],[54,62,63,172],[54,65,172],[54,172],[54,55,56,58,59,172],[54,61,172],[55,172],[42,57,172],[41,58,172],[108,109,172],[119,172],[110,116,118,172],[110,116,172],[94,95,172],[96,172],[95,97,172],[110,112,172],[112,172],[49,111,172],[110,112,113,172],[107,114,115,122,123,124,125,172],[115,120,172],[121,172],[116,172],[114,121,172],[94,106,126,172],[98,101,102,105,172],[94,172],[129,172],[132,172],[133,138,172],[134,144,145,152,161,171,172],[134,135,144,152,172],[136,172],[137,138,145,153,172],[138,161,168,172],[139,141,144,152,172],[140,172],[141,142,172],[143,144,172],[144,172],[144,145,146,161,171,172],[144,145,146,161,172],[147,152,161,171,172],[144,145,147,148,152,161,168,171,172],[147,149,161,168,171,172],[129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178],[144,150,172],[151,171,172],[141,144,152,161,172],[153,172],[154,172],[132,155,172],[156,170,172,176],[157,172],[158,172],[144,159,172],[159,160,172,174],[144,161,162,163,172],[161,163,172],[161,162,172],[164,172],[165,172],[144,166,167,172],[166,167,172],[138,152,168,172],[169,172],[152,170,172],[133,147,158,171,172],[138,172],[161,172,173],[172,174],[172,175],[133,138,144,146,155,161,171,172,174,176],[161,172,177],[94,104,172],[103,172],[48,172],[100,172],[99,172],[70,71,72,73,74,75,76,77,78,172],[47,51,53,87,172],[47,51,172],[51,172],[49,50,172],[71,72,73,74,75,76,77,78,172],[40,82,90,172],[40,88,172],[40,66,68,69,79,81,83,85,86,89,172],[40,66,68,69,79,80,81,92,172],[40,69,79,172],[40,69,79,84,172],[40,172],[40,69,172],[40,69,82,127,172],[82,90],[88],[51,66,68,69,83,85],[51,66,68,69],[84]],"referencedMap":[[70,1],[71,2],[74,3],[72,3],[76,3],[78,3],[77,3],[75,3],[73,2],[52,4],[43,5],[41,6],[44,7],[42,6],[56,8],[54,9],[45,6],[46,6],[47,4],[55,6],[65,10],[66,11],[64,9],[68,12],[67,9],[61,13],[62,14],[60,9],[63,15],[58,16],[59,17],[57,6],[116,6],[117,18],[120,19],[119,20],[118,21],[96,22],[97,23],[95,6],[98,24],[108,6],[109,6],[110,18],[113,25],[111,26],[112,27],[114,28],[126,29],[107,6],[121,30],[122,31],[123,6],[124,32],[115,33],[125,31],[127,34],[106,35],[103,6],[102,36],[94,6],[180,6],[129,37],[130,37],[132,38],[133,39],[134,40],[135,41],[136,42],[137,43],[138,44],[139,45],[140,46],[141,47],[142,47],[143,48],[144,49],[145,50],[146,51],[131,6],[178,6],[147,52],[148,53],[149,54],[179,55],[150,56],[151,57],[152,58],[153,59],[154,60],[155,61],[156,62],[157,63],[158,64],[159,65],[160,66],[161,67],[163,68],[162,69],[164,70],[165,71],[166,72],[167,73],[168,74],[169,75],[170,76],[171,77],[172,78],[173,79],[174,80],[175,81],[176,82],[177,83],[105,84],[104,85],[49,86],[48,6],[99,36],[101,87],[100,88],[87,89],[88,90],[53,91],[50,92],[51,93],[79,94],[69,9],[40,6],[8,6],[10,6],[9,6],[2,6],[11,6],[12,6],[13,6],[14,6],[15,6],[16,6],[17,6],[18,6],[3,6],[4,6],[22,6],[19,6],[20,6],[21,6],[23,6],[24,6],[25,6],[5,6],[26,6],[27,6],[28,6],[29,6],[6,6],[30,6],[31,6],[32,6],[33,6],[7,6],[38,6],[34,6],[35,6],[36,6],[37,6],[1,6],[39,6],[91,95],[89,96],[90,97],[82,98],[83,99],[85,100],[84,99],[81,101],[80,101],[86,101],[92,6],[93,102],[128,103]],"exportedModulesMap":[[70,1],[71,2],[74,3],[72,3],[76,3],[78,3],[77,3],[75,3],[73,2],[52,4],[43,5],[41,6],[44,7],[42,6],[56,8],[54,9],[45,6],[46,6],[47,4],[55,6],[65,10],[66,11],[64,9],[68,12],[67,9],[61,13],[62,14],[60,9],[63,15],[58,16],[59,17],[57,6],[116,6],[117,18],[120,19],[119,20],[118,21],[96,22],[97,23],[95,6],[98,24],[108,6],[109,6],[110,18],[113,25],[111,26],[112,27],[114,28],[126,29],[107,6],[121,30],[122,31],[123,6],[124,32],[115,33],[125,31],[127,34],[106,35],[103,6],[102,36],[94,6],[180,6],[129,37],[130,37],[132,38],[133,39],[134,40],[135,41],[136,42],[137,43],[138,44],[139,45],[140,46],[141,47],[142,47],[143,48],[144,49],[145,50],[146,51],[131,6],[178,6],[147,52],[148,53],[149,54],[179,55],[150,56],[151,57],[152,58],[153,59],[154,60],[155,61],[156,62],[157,63],[158,64],[159,65],[160,66],[161,67],[163,68],[162,69],[164,70],[165,71],[166,72],[167,73],[168,74],[169,75],[170,76],[171,77],[172,78],[173,79],[174,80],[175,81],[176,82],[177,83],[105,84],[104,85],[49,86],[48,6],[99,36],[101,87],[100,88],[87,89],[88,90],[53,91],[50,92],[51,93],[79,94],[69,9],[40,6],[8,6],[10,6],[9,6],[2,6],[11,6],[12,6],[13,6],[14,6],[15,6],[16,6],[17,6],[18,6],[3,6],[4,6],[22,6],[19,6],[20,6],[21,6],[23,6],[24,6],[25,6],[5,6],[26,6],[27,6],[28,6],[29,6],[6,6],[30,6],[31,6],[32,6],[33,6],[7,6],[38,6],[34,6],[35,6],[36,6],[37,6],[1,6],[39,6],[91,104],[89,105],[90,106],[82,107],[85,108],[92,6],[93,102]],"semanticDiagnosticsPerFile":[70,71,74,72,76,78,77,75,73,52,43,41,44,42,56,54,45,46,47,55,65,66,64,68,67,61,62,60,63,58,59,57,116,117,120,119,118,96,97,95,98,108,109,110,113,111,112,114,126,107,121,122,123,124,115,125,127,106,103,102,94,180,129,130,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,131,178,147,148,149,179,150,151,152,153,154,155,156,157,158,159,160,161,163,162,164,165,166,167,168,169,170,171,172,173,174,175,176,177,105,104,49,48,99,101,100,87,88,53,50,51,79,69,40,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,38,34,35,36,37,1,39,91,89,90,82,83,85,84,81,80,86,92,93,128]},"version":"4.4.4"}
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@operato/board",
3
+ "version": "0.2.15",
4
+ "description": "Webcomponent for board following open-wc recommendations",
5
+ "author": "heartyoh",
6
+ "license": "MIT",
7
+ "main": "dist/src/index.js",
8
+ "module": "dist/src/index.js",
9
+ "publishConfig": {
10
+ "access": "public",
11
+ "@operato:registry": "https://registry.npmjs.org"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/hatiolab/operato.git",
16
+ "directory": "webcomponents/board"
17
+ },
18
+ "exports": {
19
+ ".": "./dist/src/index.js"
20
+ },
21
+ "scripts": {
22
+ "analyze": "cem analyze --litelement",
23
+ "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
24
+ "build": "tsc && npm run analyze -- --exclude dist",
25
+ "prepublish": "tsc && npm run analyze -- --exclude dist",
26
+ "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
27
+ "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
28
+ "test": "tsc && wtr --coverage",
29
+ "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
30
+ "storybook": "tsc && npm run analyze -- --exclude dist && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds -c .storybook/server.mjs\"",
31
+ "storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
32
+ },
33
+ "dependencies": {
34
+ "lit": "^2.0.2",
35
+ "swipe-listener": "^1.3.0"
36
+ },
37
+ "devDependencies": {
38
+ "@custom-elements-manifest/analyzer": "^0.4.17",
39
+ "@hatiolab/prettier-config": "^1.0.0",
40
+ "@hatiolab/things-scene": "^2.7.12",
41
+ "@material/mwc-fab": "^0.25.3",
42
+ "@material/mwc-icon": "^0.25.3",
43
+ "@open-wc/eslint-config": "^4.3.0",
44
+ "@open-wc/testing": "next",
45
+ "@types/bwip-js": "^2.1.1",
46
+ "@types/w3c-web-usb": "^1.0.5",
47
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
48
+ "@typescript-eslint/parser": "^4.33.0",
49
+ "@web/dev-server": "^0.1.25",
50
+ "@web/dev-server-storybook": "next",
51
+ "@web/test-runner": "next",
52
+ "concurrently": "^5.3.0",
53
+ "eslint": "^7.32.0",
54
+ "eslint-config-prettier": "^8.3.0",
55
+ "husky": "^4.3.8",
56
+ "lint-staged": "^10.5.4",
57
+ "prettier": "^2.4.1",
58
+ "swipe-listener": "^1.3.0",
59
+ "tslib": "^2.3.1",
60
+ "typescript": "^4.4.4"
61
+ },
62
+ "customElements": "custom-elements.json",
63
+ "prettier": "@hatiolab/prettier-config",
64
+ "husky": {
65
+ "hooks": {
66
+ "pre-commit": "lint-staged"
67
+ }
68
+ },
69
+ "lint-staged": {
70
+ "*.ts": [
71
+ "eslint --fix",
72
+ "prettier --write"
73
+ ]
74
+ },
75
+ "gitHead": "9f3c92ae95ed50754eb35d3b70ebf9bd705a98b7"
76
+ }
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './ox-board-viewer'
2
+ export * from './ox-board-player'