@tailor-cms/ce-accordion-display 0.0.10 → 0.0.12

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/dist/index.cjs CHANGED
@@ -2,15 +2,59 @@
2
2
  var import_style = require("./style.css");
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
4
4
  const vue = require("vue");
5
+ const byteToHex = [];
6
+ for (let i = 0; i < 256; ++i) {
7
+ byteToHex.push((i + 256).toString(16).slice(1));
8
+ }
9
+ function unsafeStringify(arr, offset = 0) {
10
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
11
+ }
12
+ let getRandomValues;
13
+ const rnds8 = new Uint8Array(16);
14
+ function rng() {
15
+ if (!getRandomValues) {
16
+ if (typeof crypto === "undefined" || !crypto.getRandomValues) {
17
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
18
+ }
19
+ getRandomValues = crypto.getRandomValues.bind(crypto);
20
+ }
21
+ return getRandomValues(rnds8);
22
+ }
23
+ const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
24
+ const native = { randomUUID };
25
+ function v4(options, buf, offset) {
26
+ var _a;
27
+ if (native.randomUUID && !buf && !options) {
28
+ return native.randomUUID();
29
+ }
30
+ options = options || {};
31
+ const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
32
+ if (rnds.length < 16) {
33
+ throw new Error("Random bytes length must be >= 16");
34
+ }
35
+ rnds[6] = rnds[6] & 15 | 64;
36
+ rnds[8] = rnds[8] & 63 | 128;
37
+ if (buf) {
38
+ offset = offset || 0;
39
+ if (offset < 0 || offset + 16 > buf.length) {
40
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
41
+ }
42
+ for (let i = 0; i < 16; ++i) {
43
+ buf[offset + i] = rnds[i];
44
+ }
45
+ return buf;
46
+ }
47
+ return unsafeStringify(rnds);
48
+ }
5
49
  var type = "CE_ACCORDION";
6
50
  var name = "Accordion";
7
51
  var initState = () => ({
8
52
  embeds: {},
9
- items: []
53
+ items: [{ id: v4(), title: "Accordion Item Title", elementIds: [] }]
10
54
  });
11
55
  var ui = {
12
56
  // Display icon, https://pictogrammers.com/library/mdi/
13
- icon: "mdi-view-list",
57
+ icon: "mdi-view-day",
14
58
  // Does element support only full width or can be used within layouts
15
59
  // (e.g. 50/50 layout)
16
60
  forceFullWidth: true
@@ -658,8 +702,8 @@ function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
658
702
  }
659
703
  var _equalArrays = equalArrays$2;
660
704
  var root$4 = _root;
661
- var Uint8Array$1 = root$4.Uint8Array;
662
- var _Uint8Array = Uint8Array$1;
705
+ var Uint8Array$2 = root$4.Uint8Array;
706
+ var _Uint8Array = Uint8Array$2;
663
707
  function mapToArray$1(map) {
664
708
  var index = -1, result = Array(map.size);
665
709
  map.forEach(function(value, key) {
@@ -676,7 +720,7 @@ function setToArray$1(set) {
676
720
  return result;
677
721
  }
678
722
  var _setToArray = setToArray$1;
679
- var Symbol$1 = _Symbol, Uint8Array = _Uint8Array, eq$1 = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
723
+ var Symbol$1 = _Symbol, Uint8Array$1 = _Uint8Array, eq$1 = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
680
724
  var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
681
725
  var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag = "[object Symbol]";
682
726
  var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]";
@@ -690,7 +734,7 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
690
734
  object = object.buffer;
691
735
  other = other.buffer;
692
736
  case arrayBufferTag$1:
693
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
737
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
694
738
  return false;
695
739
  }
696
740
  return true;
package/dist/index.js CHANGED
@@ -1,14 +1,58 @@
1
1
  import "./style.css";
2
2
  import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
3
+ const byteToHex = [];
4
+ for (let i = 0; i < 256; ++i) {
5
+ byteToHex.push((i + 256).toString(16).slice(1));
6
+ }
7
+ function unsafeStringify(arr, offset = 0) {
8
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
9
+ }
10
+ let getRandomValues;
11
+ const rnds8 = new Uint8Array(16);
12
+ function rng() {
13
+ if (!getRandomValues) {
14
+ if (typeof crypto === "undefined" || !crypto.getRandomValues) {
15
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
16
+ }
17
+ getRandomValues = crypto.getRandomValues.bind(crypto);
18
+ }
19
+ return getRandomValues(rnds8);
20
+ }
21
+ const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
22
+ const native = { randomUUID };
23
+ function v4(options, buf, offset) {
24
+ var _a;
25
+ if (native.randomUUID && !buf && !options) {
26
+ return native.randomUUID();
27
+ }
28
+ options = options || {};
29
+ const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
30
+ if (rnds.length < 16) {
31
+ throw new Error("Random bytes length must be >= 16");
32
+ }
33
+ rnds[6] = rnds[6] & 15 | 64;
34
+ rnds[8] = rnds[8] & 63 | 128;
35
+ if (buf) {
36
+ offset = offset || 0;
37
+ if (offset < 0 || offset + 16 > buf.length) {
38
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
39
+ }
40
+ for (let i = 0; i < 16; ++i) {
41
+ buf[offset + i] = rnds[i];
42
+ }
43
+ return buf;
44
+ }
45
+ return unsafeStringify(rnds);
46
+ }
3
47
  var type = "CE_ACCORDION";
4
48
  var name = "Accordion";
5
49
  var initState = () => ({
6
50
  embeds: {},
7
- items: []
51
+ items: [{ id: v4(), title: "Accordion Item Title", elementIds: [] }]
8
52
  });
9
53
  var ui = {
10
54
  // Display icon, https://pictogrammers.com/library/mdi/
11
- icon: "mdi-view-list",
55
+ icon: "mdi-view-day",
12
56
  // Does element support only full width or can be used within layouts
13
57
  // (e.g. 50/50 layout)
14
58
  forceFullWidth: true
@@ -656,8 +700,8 @@ function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
656
700
  }
657
701
  var _equalArrays = equalArrays$2;
658
702
  var root$4 = _root;
659
- var Uint8Array$1 = root$4.Uint8Array;
660
- var _Uint8Array = Uint8Array$1;
703
+ var Uint8Array$2 = root$4.Uint8Array;
704
+ var _Uint8Array = Uint8Array$2;
661
705
  function mapToArray$1(map) {
662
706
  var index = -1, result = Array(map.size);
663
707
  map.forEach(function(value, key) {
@@ -674,7 +718,7 @@ function setToArray$1(set) {
674
718
  return result;
675
719
  }
676
720
  var _setToArray = setToArray$1;
677
- var Symbol$1 = _Symbol, Uint8Array = _Uint8Array, eq$1 = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
721
+ var Symbol$1 = _Symbol, Uint8Array$1 = _Uint8Array, eq$1 = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
678
722
  var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
679
723
  var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag = "[object Symbol]";
680
724
  var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]";
@@ -688,7 +732,7 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
688
732
  object = object.buffer;
689
733
  other = other.buffer;
690
734
  case arrayBufferTag$1:
691
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
735
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
692
736
  return false;
693
737
  }
694
738
  return true;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Tailor CMS accordion element",
4
4
  "author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
5
5
  "type": "module",
6
- "version": "0.0.10",
6
+ "version": "0.0.12",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "typescript": "^5.1.6",
25
25
  "vite": "^4.4.5",
26
26
  "vue-tsc": "^1.8.5",
27
- "@tailor-cms/ce-accordion-manifest": "0.0.10"
27
+ "@tailor-cms/ce-accordion-manifest": "0.0.12"
28
28
  },
29
29
  "dependencies": {
30
30
  "lodash": "^4.17.21"