@operato/board 0.2.52 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/custom-elements.json +2565 -2474
- package/demo/index.html +3 -3
- package/dist/src/component/container.js +2 -2
- package/dist/src/component/container.js.map +1 -1
- package/dist/src/component/etc.js +3 -3
- package/dist/src/component/etc.js.map +1 -1
- package/dist/src/component/line.js +5 -5
- package/dist/src/component/line.js.map +1 -1
- package/dist/src/component/shape.js +6 -6
- package/dist/src/component/shape.js.map +1 -1
- package/dist/src/component/text-and-media.js +5 -5
- package/dist/src/component/text-and-media.js.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.js +2 -2
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.js +35 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/modeller/component-toolbar/mode-icons.d.ts +2 -0
- package/dist/src/modeller/component-toolbar/mode-icons.js +86 -0
- package/dist/src/modeller/component-toolbar/mode-icons.js.map +1 -0
- package/dist/src/modeller/edit-toolbar-style.js +4 -4
- package/dist/src/modeller/edit-toolbar-style.js.map +1 -1
- package/dist/src/modeller/edit-toolbar.d.ts +1 -1
- package/dist/src/modeller/edit-toolbar.js +1 -1
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +4 -5
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +3 -3
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.js +2 -2
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.js +2 -2
- package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.js +2 -2
- package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +3 -3
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +3 -3
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.js +2 -2
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js +2 -2
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +3 -3
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-shared-style.js +1 -1
- package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.js +2 -2
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js +1 -1
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +5 -5
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +10 -7
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.js +5 -5
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/src/ox-board-list.d.ts +1 -1
- package/dist/src/ox-board-list.js +4 -4
- package/dist/src/ox-board-list.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +2 -2
- package/dist/src/ox-board-modeller.js +23 -3
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/{assets/images → icons}/components/audio.png +0 -0
- package/{assets/images → icons}/components/both-arrow.png +0 -0
- package/{assets/images → icons}/components/color-image.png +0 -0
- package/{assets/images → icons}/components/container.png +0 -0
- package/{assets/images → icons}/components/dash.png +0 -0
- package/{assets/images → icons}/components/donut.png +0 -0
- package/{assets/images → icons}/components/ellipse.png +0 -0
- package/{assets/images → icons}/components/forklift.png +0 -0
- package/{assets/images → icons}/components/gif-image.png +0 -0
- package/{assets/images → icons}/components/global-reference.png +0 -0
- package/{assets/images → icons}/components/gray-image.png +0 -0
- package/{assets/images → icons}/components/humidity-sensor.png +0 -0
- package/{assets/images → icons}/components/info-window.png +0 -0
- package/{assets/images → icons}/components/line.png +0 -0
- package/{assets/images → icons}/components/local-reference.png +0 -0
- package/{assets/images → icons}/components/no-image.png +0 -0
- package/{assets/images → icons}/components/person.png +0 -0
- package/{assets/images → icons}/components/polygon.png +0 -0
- package/{assets/images → icons}/components/polyline.png +0 -0
- package/{assets/images → icons}/components/popup.png +0 -0
- package/{assets/images → icons}/components/rect.png +0 -0
- package/{assets/images → icons}/components/single-arrow.png +0 -0
- package/{assets/images → icons}/components/star.png +0 -0
- package/{assets/images → icons}/components/text.png +0 -0
- package/{assets/images → icons}/components/triangle.png +0 -0
- package/icons/icon-collapse-active.png +0 -0
- package/icons/icon-collapse.png +0 -0
- package/icons/icon-fullscreen.png +0 -0
- package/icons/icon-htoolbar.png +0 -0
- package/icons/icon-properties-arrow-type.png +0 -0
- package/icons/icon-properties-gradient-direction.png +0 -0
- package/icons/icon-properties-label.png +0 -0
- package/icons/icon-properties-line-type.png +0 -0
- package/icons/icon-properties-padding.png +0 -0
- package/icons/icon-properties-ratio.png +0 -0
- package/icons/icon-properties-table.png +0 -0
- package/icons/icon-properties.png +0 -0
- package/icons/icon-shell-inspector.png +0 -0
- package/package.json +21 -14
- package/src/component/container.ts +3 -2
- package/src/component/etc.ts +4 -3
- package/src/component/line.ts +6 -5
- package/src/component/shape.ts +7 -6
- package/src/component/text-and-media.ts +6 -5
- package/src/index.ts +5 -0
- package/src/modeller/component-toolbar/component-menu.ts +5 -3
- package/src/modeller/component-toolbar/component-toolbar.ts +39 -1
- package/src/modeller/component-toolbar/mode-icons.ts +86 -0
- package/src/modeller/edit-toolbar-style.ts +4 -4
- package/src/modeller/edit-toolbar.ts +3 -2
- package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +5 -5
- package/src/modeller/property-sidebar/data-binding/data-binding.ts +5 -4
- package/src/modeller/property-sidebar/effects/effects.ts +2 -3
- package/src/modeller/property-sidebar/effects/property-animation.ts +2 -2
- package/src/modeller/property-sidebar/effects/property-animations.ts +2 -3
- package/src/modeller/property-sidebar/effects/property-event-hover.ts +4 -3
- package/src/modeller/property-sidebar/effects/property-event-tap.ts +4 -3
- package/src/modeller/property-sidebar/effects/property-event.ts +2 -3
- package/src/modeller/property-sidebar/effects/property-shadow.ts +2 -2
- package/src/modeller/property-sidebar/inspector/inspector.ts +5 -5
- package/src/modeller/property-sidebar/property-shared-style.ts +1 -1
- package/src/modeller/property-sidebar/property-sidebar.ts +3 -3
- package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +1 -1
- package/src/modeller/property-sidebar/shapes/shapes.ts +5 -5
- package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +12 -8
- package/src/modeller/property-sidebar/styles/styles.ts +5 -5
- package/src/ox-board-list.ts +7 -7
- package/src/ox-board-modeller.ts +32 -5
- package/tsconfig.json +1 -0
- package/web-dev-server.config.mjs +2 -0
- package/yarn-error.log +18355 -0
- package/@types/global/index.d.ts +0 -1
- package/assets/images/icon-vtoolbar.png +0 -0
package/demo/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
-webkit-font-smoothing: antialiased;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
ox-board-
|
|
18
|
+
ox-board-viewer {
|
|
19
19
|
width: 100vw;
|
|
20
20
|
height: 100vh;
|
|
21
21
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<div id="demo"></div>
|
|
28
28
|
<script type="module">
|
|
29
29
|
import { html, render } from 'lit'
|
|
30
|
-
import '../dist/src/ox-board-
|
|
30
|
+
import '../dist/src/ox-board-viewer.js'
|
|
31
31
|
import { ReferenceMap, create, error } from '@hatiolab/things-scene'
|
|
32
32
|
|
|
33
33
|
const colors = ['red', 'blue', 'orange', 'yellow', 'magenta', 'violet', 'navy', 'green', 'cyan', 'lime']
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
)
|
|
94
94
|
|
|
95
95
|
render(
|
|
96
|
-
html` <ox-board-
|
|
96
|
+
html` <ox-board-viewer .board=${boards[0]} .provider=${provider}></ox-board-viewer> `,
|
|
97
97
|
document.querySelector('#demo')
|
|
98
98
|
)
|
|
99
99
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const iconContainer = new URL('../../../icons/components/container.png', import.meta.url).href;
|
|
2
|
+
const popup = new URL('../../../icons/components/popup.png', import.meta.url).href;
|
|
3
3
|
const icon = `
|
|
4
4
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
|
5
5
|
<style type="text/css">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/component/container.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/component/container.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,yCAAyC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAC9F,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,qCAAqC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAElF,MAAM,IAAI,GAAG;;;;;;;;;;;;;CAaZ,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAmB;IACvC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,+BAA+B;IAC5C,IAAI;IACJ,SAAS,EAAE;QACT;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE;gBACL,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;gBACX,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;gBACX,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,eAAe;gBAC5B,MAAM,EAAE,IAAI;aACb;SACF;KACF;CACF,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\n\nconst iconContainer = new URL('../../../icons/components/container.png', import.meta.url).href\nconst popup = new URL('../../../icons/components/popup.png', import.meta.url).href\n\nconst icon = `\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 30 30\" style=\"enable-background:new 0 0 30 30;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n .st3{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n .st9{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}\n </style>\n <g>\n <rect x=\"2.8\" y=\"10.3\" class=\"st9\" width=\"24.4\" height=\"13.8\"/>\n <polygon class=\"st0\" points=\"27.7,9.8 2.3,9.8 7.8,5.9 22.2,5.9\"/>\n <line class=\"st3\" x1=\"10.9\" y1=\"15.5\" x2=\"19.1\" y2=\"15.5\"/>\n </g>\n</svg>\n`\n\nexport const container: ComponentGroup = {\n name: 'container',\n description: 'a group of various containers',\n icon,\n templates: [\n {\n type: 'container',\n description: 'general container',\n icon: iconContainer,\n group: 'container',\n model: {\n type: 'container',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n fillStyle: '#fff',\n strokeStyle: '#999',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'popup',\n description: 'popup window',\n icon: popup,\n group: 'container',\n model: {\n type: 'popup',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n fillStyle: '#fff',\n strokeStyle: 'DarkGoldenRod',\n hidden: true\n }\n }\n ]\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const globalReference = new URL('../../../icons/components/global-reference.png', import.meta.url).href;
|
|
2
|
+
const infoWindow = new URL('../../../icons/components/info-window.png', import.meta.url).href;
|
|
3
|
+
const localReference = new URL('../../../icons/components/local-reference.png', import.meta.url).href;
|
|
4
4
|
const icon = `
|
|
5
5
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
|
6
6
|
<style type="text/css">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"etc.js","sourceRoot":"","sources":["../../../src/component/etc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"etc.js","sourceRoot":"","sources":["../../../src/component/etc.ts"],"names":[],"mappings":"AAEA,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,gDAAgD,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AACvG,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,2CAA2C,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAC7F,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,+CAA+C,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAErG,MAAM,IAAI,GAAG;;;;;;;;;;;CAWZ,CAAA;AAED,MAAM,CAAC,MAAM,GAAG,GAAmB;IACjC,IAAI,EAAE,KAAK;IACX,WAAW,EAAE,uDAAuD;IACpE,IAAI;IACJ,SAAS,EAAE;QACT;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE;gBACL,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,EAAE;gBACR,GAAG,EAAE,EAAE;gBACP,KAAK,EAAE,EAAE;gBACT,MAAM,EAAE,EAAE;gBACV,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,eAAe;gBAC5B,MAAM,EAAE,IAAI;gBACZ,iBAAiB,EACf,gJAAgJ;gBAClJ,gBAAgB,EACd,gJAAgJ;gBAClJ,KAAK,EACH,gHAAgH;aACnH;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE;gBACL,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;gBACX,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE;gBACL,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;gBACX,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;KACF;CACF,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\n\nconst globalReference = new URL('../../../icons/components/global-reference.png', import.meta.url).href\nconst infoWindow = new URL('../../../icons/components/info-window.png', import.meta.url).href\nconst localReference = new URL('../../../icons/components/local-reference.png', import.meta.url).href\n\nconst icon = `\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 30 30\" style=\"enable-background:new 0 0 30 30;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <circle class=\"st0\" cx=\"7.1\" cy=\"15\" r=\"2\"/>\n <circle class=\"st0\" cx=\"15\" cy=\"15\" r=\"2\"/>\n <circle class=\"st0\" cx=\"22.9\" cy=\"15\" r=\"2\"/>\n </g>\n</svg>\n`\n\nexport const etc: ComponentGroup = {\n name: 'etc',\n description: 'a group of components that have not yet been defined.',\n icon,\n templates: [\n {\n type: 'info-window',\n description: 'information window',\n icon: infoWindow,\n group: 'etc',\n model: {\n type: 'info-window',\n left: 10,\n top: 10,\n width: 50,\n height: 50,\n fillStyle: '#fff',\n strokeStyle: 'DarkGoldenRod',\n hidden: true,\n frontSideTemplate:\n \"<h2 id='xxx'>\\n\\t<%= text %>\\n</h2>\\n<img src='https://www.tutorialspoint.com/images/html.gif' alt='HTML Tutorial' height='150' width='140' />\",\n backSideTemplate:\n \"<h2 id='yyy'>\\n\\t<%= text %>\\n</h2>\\n<img src='https://www.tutorialspoint.com/images/html.gif' alt='HTML Tutorial' height='150' width='140' />\",\n style:\n '#yyy {\\n\\tbackground-color:navy;\\n\\tcolor:white\\n}\\n#xxx, #yyy {\\n\\twhite-space:nowrap;\\n\\tmin-width:200px;\\n}'\n }\n },\n {\n type: 'local reference',\n description: 'local reference',\n icon: localReference,\n group: 'etc',\n model: {\n type: 'local-ref',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'global reference',\n description: 'global reference',\n icon: globalReference,\n group: 'etc',\n model: {\n type: 'global-ref',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n }\n ]\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const bothArrow = new URL('../../../icons/components/both-arrow.png', import.meta.url).href;
|
|
2
|
+
const dash = new URL('../../../icons/components/dash.png', import.meta.url).href;
|
|
3
|
+
const lineIcon = new URL('../../../icons/components/line.png', import.meta.url).href;
|
|
4
|
+
const polyline = new URL('../../../icons/components/polyline.png', import.meta.url).href;
|
|
5
|
+
const singleArrow = new URL('../../../icons/components/single-arrow.png', import.meta.url).href;
|
|
6
6
|
const icon = `
|
|
7
7
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
|
8
8
|
<style type="text/css">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line.js","sourceRoot":"","sources":["../../../src/component/line.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"line.js","sourceRoot":"","sources":["../../../src/component/line.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,0CAA0C,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAC3F,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,oCAAoC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAChF,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,oCAAoC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,I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AE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;oBAClB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;iBACnB;gBACD,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;KACF;CACF,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\n\nconst bothArrow = new URL('../../../icons/components/both-arrow.png', import.meta.url).href\nconst dash = new URL('../../../icons/components/dash.png', import.meta.url).href\nconst lineIcon = new URL('../../../icons/components/line.png', import.meta.url).href\nconst polyline = new URL('../../../icons/components/polyline.png', import.meta.url).href\nconst singleArrow = new URL('../../../icons/components/single-arrow.png', import.meta.url).href\n\nconst icon = `\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 30 30\" style=\"enable-background:new 0 0 30 30;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n\t .st3{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n\t .st4{fill:none;stroke:{{strokeColor}};stroke-width:1.5;stroke-miterlimit:10;stroke-dasharray:3,1.5;}\n </style>\n <g>\n\t <line class=\"st3\" x1=\"1.7\" y1=\"18.9\" x2=\"26.3\" y2=\"6.2\"/>\n\t <line class=\"st4\" x1=\"1.7\" y1=\"23.8\" x2=\"28.3\" y2=\"10.1\"/>\n </g>\n</svg>\n`\n\nexport const line: ComponentGroup = {\n name: 'line',\n description: 'a group of various lines',\n icon,\n templates: [\n {\n type: 'line',\n description: 'simple line',\n icon: lineIcon,\n group: 'line',\n model: {\n type: 'line',\n x1: 100,\n y1: 100,\n x2: 200,\n y2: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 3,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'dash',\n description: 'dash line',\n icon: dash,\n group: 'line',\n model: {\n type: 'line',\n x1: 100,\n y1: 100,\n x2: 200,\n y2: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 3,\n lineDash: 'round-dot',\n lineCap: 'butt'\n }\n },\n {\n type: 'single arrow',\n description: 'single arrow tip line',\n icon: singleArrow,\n group: 'line',\n model: {\n type: 'line',\n x1: 100,\n y1: 100,\n x2: 200,\n y2: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 3,\n hidden: false,\n lineWidth: 3,\n lineDash: 'solid',\n begin: 'arrow',\n lineCap: 'butt'\n }\n },\n {\n type: 'both arrow',\n description: 'both arrow tip line',\n icon: bothArrow,\n group: 'line',\n model: {\n type: 'line',\n x1: 100,\n y1: 100,\n x2: 200,\n y2: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 3,\n lineDash: 'solid',\n begin: 'arrow',\n end: 'arrow',\n lineCap: 'butt'\n }\n },\n {\n type: 'polyline',\n description: 'polyline',\n icon: polyline,\n group: 'line',\n model: {\n type: 'polyline',\n path: [\n { x: 100, y: 100 },\n { x: 200, y: 100 },\n { x: 200, y: 200 },\n { x: 100, y: 200 }\n ],\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n }\n ]\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const donut = new URL('../../../icons/components/donut.png', import.meta.url).href;
|
|
2
|
+
const ellipse = new URL('../../../icons/components/ellipse.png', import.meta.url).href;
|
|
3
|
+
const polygon = new URL('../../../icons/components/polygon.png', import.meta.url).href;
|
|
4
|
+
const rect = new URL('../../../icons/components/rect.png', import.meta.url).href;
|
|
5
|
+
const star = new URL('../../../icons/components/star.png', import.meta.url).href;
|
|
6
|
+
const triangle = new URL('../../../icons/components/triangle.png', import.meta.url).href;
|
|
7
7
|
const icon = `
|
|
8
8
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
|
9
9
|
<style type="text/css">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../src/component/shape.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../src/component/shape.ts"],"names":[],"mappings":"AAEA,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,qCAAqC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAClF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,uCAAuC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AACtF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,uCAAuC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AACtF,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,oCAAoC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAChF,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,oCAAoC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAChF,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,wCAAwC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAExF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Z,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;QACD;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,OAAO;YACd,KAAK,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,EAAE,EAAE,EAAE;gBACN,EAAE,EAAE,EAAE;gBACN,EAAE,EAAE,GAAG;gBACP,EAAE,EAAE,GAAG;gBACP,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,CAAC;gBACP,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;KACF;CACF,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\n\nconst donut = new URL('../../../icons/components/donut.png', import.meta.url).href\nconst ellipse = new URL('../../../icons/components/ellipse.png', import.meta.url).href\nconst polygon = new URL('../../../icons/components/polygon.png', import.meta.url).href\nconst rect = new URL('../../../icons/components/rect.png', import.meta.url).href\nconst star = new URL('../../../icons/components/star.png', import.meta.url).href\nconst triangle = new URL('../../../icons/components/triangle.png', import.meta.url).href\n\nconst icon = `\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 30 30\" style=\"enable-background:new 0 0 30 30;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}\n </style>\n <g>\n <polyline class=\"st0\" points=\"21.6,9.4 21.6,4.6 1.6,4.6 1.6,17.7 12.5,17.7 \t\"/>\n <circle class=\"st0\" cx=\"21.3\" cy=\"18.3\" r=\"7\"/>\n </g>\n</svg>\n`\n\nexport const shape: ComponentGroup = {\n name: 'shape',\n description: 'a group of simple basic shapes',\n icon,\n templates: [\n {\n type: 'rect',\n description: 'rectangle shape',\n icon: rect,\n group: 'shape',\n model: {\n type: 'rect',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'ellipse',\n description: 'ellipse shape',\n icon: ellipse,\n group: 'shape',\n model: {\n type: 'ellipse',\n rx: 50,\n ry: 50,\n cx: 150,\n cy: 150,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'donut',\n description: 'donut shape',\n icon: donut,\n group: 'shape',\n model: {\n type: 'donut',\n rx: 50,\n ry: 50,\n cx: 150,\n cy: 150,\n ratio: 30,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'triangle',\n description: 'triangle shape',\n icon: triangle,\n group: 'shape',\n model: {\n type: 'triangle',\n x1: 150,\n y1: 100,\n x2: 100,\n y2: 200,\n x3: 200,\n y3: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'polygon',\n description: 'polygon shape',\n icon: polygon,\n group: 'shape',\n model: {\n type: 'polygon',\n path: [\n { x: 100, y: 100 },\n { x: 200, y: 100 },\n { x: 200, y: 200 },\n { x: 100, y: 200 }\n ],\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'star',\n description: 'star shape',\n icon: star,\n group: 'shape',\n model: {\n type: 'star',\n rx: 50,\n ry: 50,\n cx: 150,\n cy: 150,\n ratio: 30,\n wing: 5,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n }\n ]\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const audio = new URL('../../../icons/components/audio.png', import.meta.url).href;
|
|
2
|
+
const colorImage = new URL('../../../icons/components/color-image.png', import.meta.url).href;
|
|
3
|
+
const gifImage = new URL('../../../icons/components/gif-image.png', import.meta.url).href;
|
|
4
|
+
const grayImage = new URL('../../../icons/components/gray-image.png', import.meta.url).href;
|
|
5
|
+
const text = new URL('../../../icons/components/text.png', import.meta.url).href;
|
|
6
6
|
const icon = `
|
|
7
7
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
|
|
8
8
|
<style type="text/css">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-and-media.js","sourceRoot":"","sources":["../../../src/component/text-and-media.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-and-media.js","sourceRoot":"","sources":["../../../src/component/text-and-media.ts"],"names":[],"mappings":"AAEA,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,qCAAqC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAClF,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,2CAA2C,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAC7F,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,yCAAyC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AACzF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ACb,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;QACD;YACE,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,cAAc;YACrB,KAAK,EAAE;gBACL,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;gBACX,MAAM,EAAE,IAAI;gBACZ,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,cAAc;YACrB,KAAK,EAAE;gBACL,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;aACZ;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,cAAc;YACrB,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;aACZ;SACF;KACF;CACF,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\n\nconst audio = new URL('../../../icons/components/audio.png', import.meta.url).href\nconst colorImage = new URL('../../../icons/components/color-image.png', import.meta.url).href\nconst gifImage = new URL('../../../icons/components/gif-image.png', import.meta.url).href\nconst grayImage = new URL('../../../icons/components/gray-image.png', import.meta.url).href\nconst text = new URL('../../../icons/components/text.png', import.meta.url).href\n\nconst icon = `\n<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 30 30\" style=\"enable-background:new 0 0 30 30;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n\t .st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}\n\t .st1{fill:{{strokeColor}};}\n </style>\n <g>\n\t <polyline class=\"st0\" points=\"20.6,12.8 20.6,5.1 1.6,5.1 1.6,18 15,18\"/>\n\t <path class=\"st1\" d=\"M5.7,7.9c-0.9,0-1.6,0.7-1.6,1.6s0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6S6.6,7.9,5.7,7.9z\"/>\n\t <polygon class=\"st1\" points=\"12.8,8.6 8.5,14.7 5.9,12.7 3.2,16.1 15.1,16.1 15.2,13.7\"/>\n\t <path class=\"st1\" d=\"M24.1,15.1h2.1l0.6,2.8h1.7l-0.1-3.8H16.5l-0.1,3.8h1.7l0.4-2.8h2.1c0.1,2,0.1,3.1,0.1,5.2V21\n\t\t c0,1.6,0,1.9,0,2.7l-1.8,0.2V25h6.9v-1.1L24,23.7c0-0.9,0-1.1,0-2.7v-0.7C24,18.1,24,17,24.1,15.1z\"/>\n </g>\n</svg>\n`\n\nexport const textAndMedia: ComponentGroup = {\n name: 'textAndMedia',\n description: 'a group of text and various media components',\n icon,\n templates: [\n {\n type: 'text',\n description: 'text',\n icon: text,\n group: 'textAndMedia',\n model: {\n type: 'text',\n left: 100,\n top: 100,\n width: 200,\n height: 50,\n text: 'Text',\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 5,\n lineDash: 'solid',\n lineCap: 'butt',\n textAlign: 'left',\n textBaseline: 'top',\n textWrap: false,\n fontFamily: 'serif',\n fontSize: 30\n }\n },\n {\n type: 'color image',\n description: 'color image',\n icon: colorImage,\n group: 'textAndMedia',\n model: {\n type: 'image-view',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n isGray: false,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'gray image',\n description: 'gray image',\n icon: grayImage,\n group: 'textAndMedia',\n model: {\n type: 'image-view',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n isGray: true,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'gif image',\n description: 'gif image',\n icon: gifImage,\n group: 'textAndMedia',\n model: {\n type: 'gif-view',\n left: 100,\n top: 100,\n width: 100,\n height: 100\n }\n },\n {\n type: 'audio',\n description: 'audio',\n icon: audio,\n group: 'textAndMedia',\n model: {\n type: 'audio',\n left: 100,\n top: 100,\n width: 100,\n height: 100\n }\n }\n ]\n}\n"]}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export { registerDefaultGroups } from './component/register-default-groups';
|
|
1
3
|
export * from './ox-board-viewer';
|
|
2
4
|
export * from './ox-board-player';
|
|
3
5
|
export * from './ox-board-modeller';
|
|
6
|
+
export * from './ox-board-list';
|
|
4
7
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA","sourcesContent":["export * from './ox-board-viewer'\nexport * from './ox-board-player'\nexport * from './ox-board-modeller'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAE3E,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA","sourcesContent":["export * from './types'\n\nexport { registerDefaultGroups } from './component/register-default-groups'\n\nexport * from './ox-board-viewer'\nexport * from './ox-board-player'\nexport * from './ox-board-modeller'\nexport * from './ox-board-list'\n"]}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __decorate } from "tslib";
|
|
5
5
|
import './component-detail';
|
|
6
|
-
import {
|
|
6
|
+
import { css, html, LitElement } from 'lit';
|
|
7
7
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
8
8
|
import { ScrollbarStyles } from '@operato/styles';
|
|
9
|
-
|
|
9
|
+
const noImage = new URL('../../../../icons/components/no-image.png', import.meta.url).href;
|
|
10
10
|
let ComponentMenu = class ComponentMenu extends LitElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-menu.js","sourceRoot":"","sources":["../../../../src/modeller/component-toolbar/component-menu.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"component-menu.js","sourceRoot":"","sources":["../../../../src/modeller/component-toolbar/component-menu.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EA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inc. All rights reserved.\n */\n\nimport './component-detail'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { Scene } from '@hatiolab/things-scene'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { Pallet, PalletItem } from '../../types'\n\nconst noImage = new URL('../../../../icons/components/no-image.png', import.meta.url).href\n\n@customElement('component-menu')\nclass ComponentMenu extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n align-content: stretch;\n\n background-color: var(--component-menu-background-color);\n margin: 0px;\n padding: 0px;\n\n width: 180px;\n height: 100%;\n\n overflow: visible;\n\n border: 2px solid var(--component-menu-border-color);\n box-sizing: border-box;\n\n position: absolute;\n top: 0px;\n\n z-index: 1;\n }\n\n h2 {\n background-color: var(--component-menu-border-color);\n padding: 1px 5px;\n margin: 0;\n font: var(--component-menu-title);\n color: #fff;\n text-transform: capitalize;\n }\n\n [templates] {\n flex: 1;\n\n display: block;\n margin: 0;\n padding: 0;\n overflow-y: auto;\n\n background-color: var(--component-menu-background-color);\n }\n\n [template] {\n display: flex;\n align-items: center;\n min-height: var(--component-menu-item-icon-size);\n padding: 0 5px 0 0;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n font-size: 11px;\n color: var(--component-menu-item-color);\n }\n\n [template]:hover,\n [template]:focus {\n color: var(--component-menu-item-hover-color);\n font-weight: bold;\n cursor: pointer;\n }\n\n [template] img {\n margin: 5px;\n width: var(--component-menu-item-icon-size);\n height: var(--component-menu-item-icon-size);\n }\n\n component-detail {\n position: absolute;\n top: 0;\n left: 180px;\n height: 100%;\n outline: none;\n }\n\n component-detail[hidden] {\n display: none;\n }\n `\n ]\n\n @property({ type: Object }) groups: Pallet[] = []\n @property({ type: Object }) scene: Scene | null = null\n @property({ type: String }) group: string | null = ''\n\n @state() templates: PalletItem[] = []\n @state() template: PalletItem | any\n\n @query('component-detail') detail!: HTMLElement\n\n render() {\n return this.group\n ? html`\n <h2 onclick=${(e: MouseEvent) => e.stopPropagation()}>${this.group} list</h2>\n\n <div\n templates\n @mouseover=${(e: MouseEvent) => this.onHoverComponent(e)}\n @mouseout=${(e: MouseEvent) => (this.template = null)}\n >\n ${(this.templates || []).map(\n template => html`\n <div @click=${this.onClickTemplate} data-type=${template.type} template>\n <img src=${this.templateIcon(template)} />${template.type}\n </div>\n `\n )}\n </div>\n\n <component-detail\n tabindex=\"-1\"\n @focusout=${() => {\n this.template = null\n }}\n .template=${this.template}\n hidden\n >\n </component-detail>\n `\n : html``\n }\n\n updated(changes: PropertyValues<this>) {\n if (changes.has('group')) {\n if (!this.group) {\n this.templates = []\n this.setAttribute('hidden', '')\n } else {\n this.templates = this.groups.find((g: Pallet) => g.name === this.group)?.templates || []\n this.removeAttribute('active')\n }\n }\n\n if (changes.has('template')) {\n this.template && this.template.about\n ? this.detail.removeAttribute('hidden')\n : this.detail.setAttribute('hidden', '')\n }\n }\n\n findTemplate(type: string | null | undefined) {\n this.template = type && this.templates.find(template => template.type == type)\n }\n\n onHoverComponent(e: MouseEvent) {\n const button = e.target as HTMLElement\n this.findTemplate(button!.closest('[data-type]')?.getAttribute('data-type'))\n }\n\n onClickTemplate(e: MouseEvent) {\n var item = e.target as HTMLElement\n var type = item.closest('[data-type]')?.getAttribute('data-type')\n\n if (!type) {\n return\n }\n\n if (this.scene) {\n this.template = this.templates.find(template => template.type == type)\n this.template && this.scene.add(JSON.parse(JSON.stringify(this.template.model)), { cx: 200, cy: 200 })\n }\n\n this.group = null\n }\n\n templateIcon(template: PalletItem) {\n return template.icon || noImage\n }\n}\n"]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __decorate } from "tslib";
|
|
5
5
|
import './component-menu';
|
|
6
|
+
import { ICON_EDIT_MODE, ICON_SHIFT_MODE } from './mode-icons';
|
|
6
7
|
import { LitElement, css, html } from 'lit';
|
|
7
8
|
import { SCENE_MODE } from '@hatiolab/things-scene';
|
|
8
9
|
import { customElement, property, query, queryAll } from 'lit/decorators.js';
|
|
@@ -10,7 +11,7 @@ let ComponentToolbar = class ComponentToolbar extends LitElement {
|
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments);
|
|
12
13
|
this.componentGroupList = [];
|
|
13
|
-
this.mode = SCENE_MODE.
|
|
14
|
+
this.mode = SCENE_MODE.EDIT;
|
|
14
15
|
this.icons = {};
|
|
15
16
|
}
|
|
16
17
|
updated(changes) {
|
|
@@ -23,6 +24,10 @@ let ComponentToolbar = class ComponentToolbar extends LitElement {
|
|
|
23
24
|
'data:image/svg+xml;charset=UTF-8;base64,' + btoa(group.icon.replace(/{{strokeColor}}/g, color));
|
|
24
25
|
return sum;
|
|
25
26
|
}, {});
|
|
27
|
+
this.icons['mode-edit'] =
|
|
28
|
+
'data:image/svg+xml;charset=UTF-8;base64,' + btoa(ICON_EDIT_MODE.replace(/{{strokeColor}}/g, color));
|
|
29
|
+
this.icons['mode-shift'] =
|
|
30
|
+
'data:image/svg+xml;charset=UTF-8;base64,' + btoa(ICON_SHIFT_MODE.replace(/{{strokeColor}}/g, color));
|
|
26
31
|
}
|
|
27
32
|
if (changes.has('group')) {
|
|
28
33
|
this.groups.forEach(group => {
|
|
@@ -35,7 +40,10 @@ let ComponentToolbar = class ComponentToolbar extends LitElement {
|
|
|
35
40
|
}
|
|
36
41
|
render() {
|
|
37
42
|
const componentList = this.componentGroupList || [];
|
|
43
|
+
const modeIcon = this.icons[this.mode === SCENE_MODE.EDIT ? 'mode-edit' : 'mode-shift'];
|
|
38
44
|
return html `
|
|
45
|
+
<img id="shift" .src=${modeIcon} @click=${(e) => this._onClickShift(e)} />
|
|
46
|
+
|
|
39
47
|
${componentList
|
|
40
48
|
.filter(group => { var _a; return ((_a = group.templates) === null || _a === void 0 ? void 0 : _a.length) > 0; })
|
|
41
49
|
.map(group => html `
|
|
@@ -59,6 +67,25 @@ let ComponentToolbar = class ComponentToolbar extends LitElement {
|
|
|
59
67
|
</component-menu>
|
|
60
68
|
`;
|
|
61
69
|
}
|
|
70
|
+
_setMode(mode) {
|
|
71
|
+
this.mode = mode;
|
|
72
|
+
this.dispatchEvent(new CustomEvent('mode-changed', {
|
|
73
|
+
bubbles: true,
|
|
74
|
+
composed: true,
|
|
75
|
+
detail: { value: mode }
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
_onClickShift(e) {
|
|
79
|
+
const shift = this.shift;
|
|
80
|
+
if (shift.hasAttribute('active')) {
|
|
81
|
+
shift.removeAttribute('active');
|
|
82
|
+
this._setMode(SCENE_MODE.EDIT);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
shift.setAttribute('active', '');
|
|
86
|
+
this._setMode(SCENE_MODE.SHIFT);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
62
89
|
async _onClickGroup(e) {
|
|
63
90
|
var _a, _b;
|
|
64
91
|
var button = e.target;
|
|
@@ -94,6 +121,10 @@ ComponentToolbar.styles = [
|
|
|
94
121
|
box-sizing: border-box;
|
|
95
122
|
}
|
|
96
123
|
|
|
124
|
+
#shift[active] {
|
|
125
|
+
background-color: #beb9b3;
|
|
126
|
+
}
|
|
127
|
+
|
|
97
128
|
component-menu {
|
|
98
129
|
position: absolute;
|
|
99
130
|
top: 0;
|
|
@@ -119,6 +150,9 @@ __decorate([
|
|
|
119
150
|
__decorate([
|
|
120
151
|
property({ type: Number })
|
|
121
152
|
], ComponentToolbar.prototype, "mode", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
query('#shift')
|
|
155
|
+
], ComponentToolbar.prototype, "shift", void 0);
|
|
122
156
|
__decorate([
|
|
123
157
|
query('component-menu')
|
|
124
158
|
], ComponentToolbar.prototype, "menu", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-toolbar.js","sourceRoot":"","sources":["../../../../src/modeller/component-toolbar/component-toolbar.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kBAAkB,CAAA;A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_MODE } from './mode-icons'\nimport { LitElement, PropertyValues, css, html } from 'lit'\nimport { SCENE_MODE, Scene } from '@hatiolab/things-scene'\nimport { customElement, property, query, queryAll } from 'lit/decorators.js'\n\nimport { ComponentGroup } from '../../types'\n\n@customElement('component-toolbar')\nclass ComponentToolbar extends LitElement {\n static styles = [\n css`\n :host {\n left: 0;\n display: block;\n position: relative;\n\n width: var(--component-toolbar-icon-size);\n background-color: var(--component-toolbar-background-color);\n }\n\n img {\n display: flex;\n flex-direction: row;\n\n width: var(--component-toolbar-icon-size);\n height: var(--component-toolbar-icon-size);\n min-width: 50%;\n\n border-bottom: var(--component-toolbar-border);\n margin: 0;\n padding: 6px;\n box-sizing: border-box;\n }\n\n #shift[active] {\n background-color: #beb9b3;\n }\n\n component-menu {\n position: absolute;\n top: 0;\n left: var(--component-toolbar-icon-size);\n height: 100%;\n outline: none;\n }\n\n component-menu[hidden] {\n display: none;\n }\n `\n ]\n\n @property({ type: Array }) componentGroupList: ComponentGroup[] = []\n @property({ type: String }) group?: string | null\n @property({ type: Object }) scene!: Scene\n @property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.EDIT\n\n @query('#shift') shift!: HTMLImageElement\n @query('component-menu') private menu!: HTMLElement\n @queryAll('[data-group]') private groups!: NodeListOf<HTMLElement>\n\n private icons: { [name: string]: string } = {}\n\n updated(changes: PropertyValues<this>) {\n if (changes.has('componentGroupList')) {\n const color = getComputedStyle(this, null).getPropertyValue('--primary-color')\n\n this.icons = (this.componentGroupList || [])\n .filter(group => group.templates?.length > 0)\n .reduce((sum, group: ComponentGroup) => {\n sum[group.name] =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(group.icon.replace(/{{strokeColor}}/g, color))\n return sum\n }, {} as { [name: string]: string })\n\n this.icons['mode-edit'] =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(ICON_EDIT_MODE.replace(/{{strokeColor}}/g, color))\n this.icons['mode-shift'] =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(ICON_SHIFT_MODE.replace(/{{strokeColor}}/g, color))\n }\n\n if (changes.has('group')) {\n this.groups.forEach(group => {\n group.getAttribute('data-group') === this.group\n ? group.setAttribute('active', '')\n : group.removeAttribute('active')\n })\n\n this.group ? this.menu.removeAttribute('hidden') : this.menu.setAttribute('hidden', '')\n }\n }\n\n render() {\n const componentList = this.componentGroupList || []\n const modeIcon = this.icons[this.mode === SCENE_MODE.EDIT ? 'mode-edit' : 'mode-shift']\n\n return html`\n <img id=\"shift\" .src=${modeIcon} @click=${(e: MouseEvent) => this._onClickShift(e)} />\n\n ${componentList\n .filter(group => group.templates?.length > 0)\n .map(\n group => html`\n <img\n data-group=${group.name}\n @click=${(e: MouseEvent) => this._onClickGroup(e)}\n .src=${this.icons[group.name]}\n />\n `\n )}\n\n <component-menu\n tabindex=\"-1\"\n @focusout=${() => {\n this.group = null\n }}\n .scene=${this.scene}\n .group=${this.group}\n .groups=${componentList}\n hidden\n >\n </component-menu>\n `\n }\n\n _setMode(mode: SCENE_MODE) {\n this.mode = mode\n\n this.dispatchEvent(\n new CustomEvent('mode-changed', {\n bubbles: true,\n composed: true,\n detail: { value: mode }\n })\n )\n }\n\n _onClickShift(e: MouseEvent) {\n const shift = this.shift\n\n if (shift.hasAttribute('active')) {\n shift.removeAttribute('active')\n this._setMode(SCENE_MODE.EDIT)\n } else {\n shift.setAttribute('active', '')\n this._setMode(SCENE_MODE.SHIFT)\n }\n }\n\n async _onClickGroup(e: MouseEvent) {\n var button = e.target as HTMLElement\n\n this.group = button!.closest('[data-group]')?.getAttribute('data-group')\n\n if (!this.group) return\n\n await this.updateComplete\n\n this.menu?.focus()\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ICON_EDIT_MODE = "\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 30 30\"\n style=\"enable-background:new 0 0 30 30;\"\n xml:space=\"preserve\"\n >\n <style type=\"text/css\">\n .st0 {\n fill: {{strokeColor}};\n }\n .st1 {\n fill: none;\n stroke: {{strokeColor}};\n stroke-width: 0.75;\n stroke-linejoin: round;\n stroke-miterlimit: 10;\n }\n </style>\n <g>\n <polygon class=\"st0\" points=\"2.7,3.9 2.7,22.8 7.8,17.2 16.1,16.9 \t\" />\n <path\n class=\"st1\"\n d=\"M27.7,20.1L26.1,19c-0.1,0-0.2,0-0.2,0c0,0.1,0,0.2,0,0.2l1.2,0.9h-4.9v-5l0.9,1.2c0,0,0.1,0.1,0.1,0.1\n c0,0,0.1,0,0.1,0c0.1,0,0.1-0.1,0-0.2l-1.1-1.6c-0.1-0.1-0.2-0.1-0.2,0L20.8,16c0,0.1,0,0.2,0,0.2s0.2,0,0.2,0l0.9-1.2v5h-5\n l1.2-0.9c0.1,0,0.1-0.1,0-0.2c0-0.1-0.1-0.1-0.2,0l-1.6,1.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0.1,0.1,0.1l1.6,1.1c0,0,0.1,0,0.1,0\n c0,0,0.1,0,0.1-0.1c0-0.1,0-0.2,0-0.2l-1.2-0.9h5v5L21,24.2c0-0.1-0.1-0.1-0.2,0c-0.1,0-0.1,0.1,0,0.2l1.1,1.6c0,0,0.1,0.1,0.1,0.1\n s0.1,0,0.1-0.1l1.1-1.6c0-0.1,0-0.2,0-0.2c-0.1,0-0.2,0-0.2,0l-0.9,1.2v-5h4.9l-1.2,0.9c-0.1,0-0.1,0.1,0,0.2c0,0,0.1,0.1,0.1,0.1\n c0,0,0.1,0,0.1,0l1.6-1.1c0,0,0.1-0.1,0.1-0.1C27.7,20.2,27.7,20.1,27.7,20.1z\"\n />\n </g>\n </svg>\n";
|
|
2
|
+
export declare const ICON_SHIFT_MODE = "\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 30 30\"\n style=\"enable-background:new 0 0 30 30;\"\n xml:space=\"preserve\"\n >\n <style type=\"text/css\">\n .st0 {\n fill-rule: evenodd;\n clip-rule: evenodd;\n }\n .st1 {\n fill: {{strokeColor}};\n stroke: {{strokeColor}};\n stroke-width: 0.75;\n stroke-linejoin: round;\n stroke-miterlimit: 10;\n }\n </style>\n <g>\n <path\n class=\"st0\"\n d=\"M7.8,23.2c1.6,0,3.8,0,5.7,0c0.8,0,1.3-0.3,1.6-1.2c0.4-2.9,1.5-4.9,2.4-6.9s1.4-2.5,1.6-3.4\n c0.1-0.5,0.2-1.6-0.4-1.9c-0.6-0.3-1.2,0.1-1.9,1.3c-0.8,1.6-1,2-1.4,2c-0.3,0-0.1-4,0-5.4c0.1-1.3-0.6-1.8-1.3-1.8\n c-0.8-0.1-1.5,0.4-1.5,1.5c0,1.5-0.2,5.2-0.7,5.2c-0.4,0-0.3-4.3-0.6-6.7c-0.1-1-0.6-1.8-1.5-1.8C9.1,4.2,8.4,4.7,8.3,5.8\n c-0.1,1.3,1,6.7,0.5,6.7c-0.4,0-1.4-3.3-2.3-5.1C6,6.5,5.6,6,4.6,6.4C3.9,6.7,3.5,7.6,3.8,8.5c0.5,1.2,2.7,6.8,2.2,6.8\n c-0.4,0-1.4-1.4-2.7-2.1c-1.1-0.6-1.8-0.4-2.1-0.1c-0.4,0.3-0.7,1,0.9,2.8c0.6,0.6,3.1,2.3,3.7,3.2c0.7,1.3,0.6,1,0.8,2.8\n C6.7,22.7,7,23.2,7.8,23.2z\"\n />\n <path\n class=\"st1\"\n d=\"M28.7,20.1L27.1,19c-0.1,0-0.2,0-0.2,0c0,0.1,0,0.2,0,0.2l1.2,0.9h-4.9v-5l0.9,1.2c0,0,0.1,0.1,0.1,0.1\n c0,0,0.1,0,0.1,0c0.1,0,0.1-0.1,0-0.2l-1.1-1.6c-0.1-0.1-0.2-0.1-0.2,0L21.8,16c0,0.1,0,0.2,0,0.2s0.2,0,0.2,0l0.9-1.2v5h-5\n l1.2-0.9c0.1,0,0.1-0.1,0-0.2c0-0.1-0.1-0.1-0.2,0l-1.6,1.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0.1,0.1,0.1l1.6,1.1c0,0,0.1,0,0.1,0\n c0,0,0.1,0,0.1-0.1c0-0.1,0-0.2,0-0.2l-1.2-0.9h5v5L22,24.2c0-0.1-0.1-0.1-0.2,0c-0.1,0-0.1,0.1,0,0.2l1.1,1.6c0,0,0.1,0.1,0.1,0.1\n s0.1,0,0.1-0.1l1.1-1.6c0-0.1,0-0.2,0-0.2c-0.1,0-0.2,0-0.2,0l-0.9,1.2v-5h4.9l-1.2,0.9c-0.1,0-0.1,0.1,0,0.2c0,0,0.1,0.1,0.1,0.1\n c0,0,0.1,0,0.1,0l1.6-1.1c0,0,0.1-0.1,0.1-0.1C28.7,20.2,28.7,20.1,28.7,20.1z\"\n />\n </g>\n </svg>\n";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export const ICON_EDIT_MODE = `
|
|
2
|
+
<svg
|
|
3
|
+
version="1.1"
|
|
4
|
+
id="Layer_1"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
7
|
+
x="0px"
|
|
8
|
+
y="0px"
|
|
9
|
+
viewBox="0 0 30 30"
|
|
10
|
+
style="enable-background:new 0 0 30 30;"
|
|
11
|
+
xml:space="preserve"
|
|
12
|
+
>
|
|
13
|
+
<style type="text/css">
|
|
14
|
+
.st0 {
|
|
15
|
+
fill: {{strokeColor}};
|
|
16
|
+
}
|
|
17
|
+
.st1 {
|
|
18
|
+
fill: none;
|
|
19
|
+
stroke: {{strokeColor}};
|
|
20
|
+
stroke-width: 0.75;
|
|
21
|
+
stroke-linejoin: round;
|
|
22
|
+
stroke-miterlimit: 10;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
<g>
|
|
26
|
+
<polygon class="st0" points="2.7,3.9 2.7,22.8 7.8,17.2 16.1,16.9 " />
|
|
27
|
+
<path
|
|
28
|
+
class="st1"
|
|
29
|
+
d="M27.7,20.1L26.1,19c-0.1,0-0.2,0-0.2,0c0,0.1,0,0.2,0,0.2l1.2,0.9h-4.9v-5l0.9,1.2c0,0,0.1,0.1,0.1,0.1
|
|
30
|
+
c0,0,0.1,0,0.1,0c0.1,0,0.1-0.1,0-0.2l-1.1-1.6c-0.1-0.1-0.2-0.1-0.2,0L20.8,16c0,0.1,0,0.2,0,0.2s0.2,0,0.2,0l0.9-1.2v5h-5
|
|
31
|
+
l1.2-0.9c0.1,0,0.1-0.1,0-0.2c0-0.1-0.1-0.1-0.2,0l-1.6,1.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0.1,0.1,0.1l1.6,1.1c0,0,0.1,0,0.1,0
|
|
32
|
+
c0,0,0.1,0,0.1-0.1c0-0.1,0-0.2,0-0.2l-1.2-0.9h5v5L21,24.2c0-0.1-0.1-0.1-0.2,0c-0.1,0-0.1,0.1,0,0.2l1.1,1.6c0,0,0.1,0.1,0.1,0.1
|
|
33
|
+
s0.1,0,0.1-0.1l1.1-1.6c0-0.1,0-0.2,0-0.2c-0.1,0-0.2,0-0.2,0l-0.9,1.2v-5h4.9l-1.2,0.9c-0.1,0-0.1,0.1,0,0.2c0,0,0.1,0.1,0.1,0.1
|
|
34
|
+
c0,0,0.1,0,0.1,0l1.6-1.1c0,0,0.1-0.1,0.1-0.1C27.7,20.2,27.7,20.1,27.7,20.1z"
|
|
35
|
+
/>
|
|
36
|
+
</g>
|
|
37
|
+
</svg>
|
|
38
|
+
`;
|
|
39
|
+
export const ICON_SHIFT_MODE = `
|
|
40
|
+
<svg
|
|
41
|
+
version="1.1"
|
|
42
|
+
id="Layer_1"
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
45
|
+
x="0px"
|
|
46
|
+
y="0px"
|
|
47
|
+
viewBox="0 0 30 30"
|
|
48
|
+
style="enable-background:new 0 0 30 30;"
|
|
49
|
+
xml:space="preserve"
|
|
50
|
+
>
|
|
51
|
+
<style type="text/css">
|
|
52
|
+
.st0 {
|
|
53
|
+
fill-rule: evenodd;
|
|
54
|
+
clip-rule: evenodd;
|
|
55
|
+
}
|
|
56
|
+
.st1 {
|
|
57
|
+
fill: {{strokeColor}};
|
|
58
|
+
stroke: {{strokeColor}};
|
|
59
|
+
stroke-width: 0.75;
|
|
60
|
+
stroke-linejoin: round;
|
|
61
|
+
stroke-miterlimit: 10;
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
64
|
+
<g>
|
|
65
|
+
<path
|
|
66
|
+
class="st0"
|
|
67
|
+
d="M7.8,23.2c1.6,0,3.8,0,5.7,0c0.8,0,1.3-0.3,1.6-1.2c0.4-2.9,1.5-4.9,2.4-6.9s1.4-2.5,1.6-3.4
|
|
68
|
+
c0.1-0.5,0.2-1.6-0.4-1.9c-0.6-0.3-1.2,0.1-1.9,1.3c-0.8,1.6-1,2-1.4,2c-0.3,0-0.1-4,0-5.4c0.1-1.3-0.6-1.8-1.3-1.8
|
|
69
|
+
c-0.8-0.1-1.5,0.4-1.5,1.5c0,1.5-0.2,5.2-0.7,5.2c-0.4,0-0.3-4.3-0.6-6.7c-0.1-1-0.6-1.8-1.5-1.8C9.1,4.2,8.4,4.7,8.3,5.8
|
|
70
|
+
c-0.1,1.3,1,6.7,0.5,6.7c-0.4,0-1.4-3.3-2.3-5.1C6,6.5,5.6,6,4.6,6.4C3.9,6.7,3.5,7.6,3.8,8.5c0.5,1.2,2.7,6.8,2.2,6.8
|
|
71
|
+
c-0.4,0-1.4-1.4-2.7-2.1c-1.1-0.6-1.8-0.4-2.1-0.1c-0.4,0.3-0.7,1,0.9,2.8c0.6,0.6,3.1,2.3,3.7,3.2c0.7,1.3,0.6,1,0.8,2.8
|
|
72
|
+
C6.7,22.7,7,23.2,7.8,23.2z"
|
|
73
|
+
/>
|
|
74
|
+
<path
|
|
75
|
+
class="st1"
|
|
76
|
+
d="M28.7,20.1L27.1,19c-0.1,0-0.2,0-0.2,0c0,0.1,0,0.2,0,0.2l1.2,0.9h-4.9v-5l0.9,1.2c0,0,0.1,0.1,0.1,0.1
|
|
77
|
+
c0,0,0.1,0,0.1,0c0.1,0,0.1-0.1,0-0.2l-1.1-1.6c-0.1-0.1-0.2-0.1-0.2,0L21.8,16c0,0.1,0,0.2,0,0.2s0.2,0,0.2,0l0.9-1.2v5h-5
|
|
78
|
+
l1.2-0.9c0.1,0,0.1-0.1,0-0.2c0-0.1-0.1-0.1-0.2,0l-1.6,1.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0.1,0.1,0.1l1.6,1.1c0,0,0.1,0,0.1,0
|
|
79
|
+
c0,0,0.1,0,0.1-0.1c0-0.1,0-0.2,0-0.2l-1.2-0.9h5v5L22,24.2c0-0.1-0.1-0.1-0.2,0c-0.1,0-0.1,0.1,0,0.2l1.1,1.6c0,0,0.1,0.1,0.1,0.1
|
|
80
|
+
s0.1,0,0.1-0.1l1.1-1.6c0-0.1,0-0.2,0-0.2c-0.1,0-0.2,0-0.2,0l-0.9,1.2v-5h4.9l-1.2,0.9c-0.1,0-0.1,0.1,0,0.2c0,0,0.1,0.1,0.1,0.1
|
|
81
|
+
c0,0,0.1,0,0.1,0l1.6-1.1c0,0,0.1-0.1,0.1-0.1C28.7,20.2,28.7,20.1,28.7,20.1z"
|
|
82
|
+
/>
|
|
83
|
+
</g>
|
|
84
|
+
</svg>
|
|
85
|
+
`;
|
|
86
|
+
//# sourceMappingURL=mode-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mode-icons.js","sourceRoot":"","sources":["../../../../src/modeller/component-toolbar/mode-icons.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqC7B,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C9B,CAAA","sourcesContent":["export const ICON_EDIT_MODE = `\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 30 30\"\n style=\"enable-background:new 0 0 30 30;\"\n xml:space=\"preserve\"\n >\n <style type=\"text/css\">\n .st0 {\n fill: {{strokeColor}};\n }\n .st1 {\n fill: none;\n stroke: {{strokeColor}};\n stroke-width: 0.75;\n stroke-linejoin: round;\n stroke-miterlimit: 10;\n }\n </style>\n <g>\n <polygon class=\"st0\" points=\"2.7,3.9 2.7,22.8 7.8,17.2 16.1,16.9 \t\" />\n <path\n class=\"st1\"\n d=\"M27.7,20.1L26.1,19c-0.1,0-0.2,0-0.2,0c0,0.1,0,0.2,0,0.2l1.2,0.9h-4.9v-5l0.9,1.2c0,0,0.1,0.1,0.1,0.1\n c0,0,0.1,0,0.1,0c0.1,0,0.1-0.1,0-0.2l-1.1-1.6c-0.1-0.1-0.2-0.1-0.2,0L20.8,16c0,0.1,0,0.2,0,0.2s0.2,0,0.2,0l0.9-1.2v5h-5\n l1.2-0.9c0.1,0,0.1-0.1,0-0.2c0-0.1-0.1-0.1-0.2,0l-1.6,1.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0.1,0.1,0.1l1.6,1.1c0,0,0.1,0,0.1,0\n c0,0,0.1,0,0.1-0.1c0-0.1,0-0.2,0-0.2l-1.2-0.9h5v5L21,24.2c0-0.1-0.1-0.1-0.2,0c-0.1,0-0.1,0.1,0,0.2l1.1,1.6c0,0,0.1,0.1,0.1,0.1\n s0.1,0,0.1-0.1l1.1-1.6c0-0.1,0-0.2,0-0.2c-0.1,0-0.2,0-0.2,0l-0.9,1.2v-5h4.9l-1.2,0.9c-0.1,0-0.1,0.1,0,0.2c0,0,0.1,0.1,0.1,0.1\n c0,0,0.1,0,0.1,0l1.6-1.1c0,0,0.1-0.1,0.1-0.1C27.7,20.2,27.7,20.1,27.7,20.1z\"\n />\n </g>\n </svg>\n`\n\nexport const ICON_SHIFT_MODE = `\n <svg\n version=\"1.1\"\n id=\"Layer_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 30 30\"\n style=\"enable-background:new 0 0 30 30;\"\n xml:space=\"preserve\"\n >\n <style type=\"text/css\">\n .st0 {\n fill-rule: evenodd;\n clip-rule: evenodd;\n }\n .st1 {\n fill: {{strokeColor}};\n stroke: {{strokeColor}};\n stroke-width: 0.75;\n stroke-linejoin: round;\n stroke-miterlimit: 10;\n }\n </style>\n <g>\n <path\n class=\"st0\"\n d=\"M7.8,23.2c1.6,0,3.8,0,5.7,0c0.8,0,1.3-0.3,1.6-1.2c0.4-2.9,1.5-4.9,2.4-6.9s1.4-2.5,1.6-3.4\n c0.1-0.5,0.2-1.6-0.4-1.9c-0.6-0.3-1.2,0.1-1.9,1.3c-0.8,1.6-1,2-1.4,2c-0.3,0-0.1-4,0-5.4c0.1-1.3-0.6-1.8-1.3-1.8\n c-0.8-0.1-1.5,0.4-1.5,1.5c0,1.5-0.2,5.2-0.7,5.2c-0.4,0-0.3-4.3-0.6-6.7c-0.1-1-0.6-1.8-1.5-1.8C9.1,4.2,8.4,4.7,8.3,5.8\n c-0.1,1.3,1,6.7,0.5,6.7c-0.4,0-1.4-3.3-2.3-5.1C6,6.5,5.6,6,4.6,6.4C3.9,6.7,3.5,7.6,3.8,8.5c0.5,1.2,2.7,6.8,2.2,6.8\n c-0.4,0-1.4-1.4-2.7-2.1c-1.1-0.6-1.8-0.4-2.1-0.1c-0.4,0.3-0.7,1,0.9,2.8c0.6,0.6,3.1,2.3,3.7,3.2c0.7,1.3,0.6,1,0.8,2.8\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