@tailor-cms/ce-accordion-server 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -32,11 +32,63 @@ __export(src_exports, {
32
32
  });
33
33
  module.exports = __toCommonJS(src_exports);
34
34
 
35
+ // ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/stringify.js
36
+ var byteToHex = [];
37
+ for (let i = 0; i < 256; ++i) {
38
+ byteToHex.push((i + 256).toString(16).slice(1));
39
+ }
40
+ function unsafeStringify(arr, offset = 0) {
41
+ 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();
42
+ }
43
+
44
+ // ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/rng.js
45
+ var import_crypto = require("crypto");
46
+ var rnds8Pool = new Uint8Array(256);
47
+ var poolPtr = rnds8Pool.length;
48
+ function rng() {
49
+ if (poolPtr > rnds8Pool.length - 16) {
50
+ (0, import_crypto.randomFillSync)(rnds8Pool);
51
+ poolPtr = 0;
52
+ }
53
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
54
+ }
55
+
56
+ // ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/native.js
57
+ var import_crypto2 = require("crypto");
58
+ var native_default = { randomUUID: import_crypto2.randomUUID };
59
+
60
+ // ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/v4.js
61
+ function v4(options, buf, offset) {
62
+ var _a;
63
+ if (native_default.randomUUID && !buf && !options) {
64
+ return native_default.randomUUID();
65
+ }
66
+ options = options || {};
67
+ const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
68
+ if (rnds.length < 16) {
69
+ throw new Error("Random bytes length must be >= 16");
70
+ }
71
+ rnds[6] = rnds[6] & 15 | 64;
72
+ rnds[8] = rnds[8] & 63 | 128;
73
+ if (buf) {
74
+ offset = offset || 0;
75
+ if (offset < 0 || offset + 16 > buf.length) {
76
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
77
+ }
78
+ for (let i = 0; i < 16; ++i) {
79
+ buf[offset + i] = rnds[i];
80
+ }
81
+ return buf;
82
+ }
83
+ return unsafeStringify(rnds);
84
+ }
85
+ var v4_default = v4;
86
+
35
87
  // ../manifest/dist/index.js
36
88
  var type = "CE_ACCORDION";
37
89
  var initState = () => ({
38
90
  embeds: {},
39
- items: []
91
+ items: [{ id: v4_default(), title: "Accordion Item Title", elementIds: [] }]
40
92
  });
41
93
 
42
94
  // src/index.ts
package/dist/index.js CHANGED
@@ -1,8 +1,60 @@
1
+ // ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/stringify.js
2
+ var byteToHex = [];
3
+ for (let i = 0; i < 256; ++i) {
4
+ byteToHex.push((i + 256).toString(16).slice(1));
5
+ }
6
+ function unsafeStringify(arr, offset = 0) {
7
+ 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();
8
+ }
9
+
10
+ // ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/rng.js
11
+ import { randomFillSync } from "crypto";
12
+ var rnds8Pool = new Uint8Array(256);
13
+ var poolPtr = rnds8Pool.length;
14
+ function rng() {
15
+ if (poolPtr > rnds8Pool.length - 16) {
16
+ randomFillSync(rnds8Pool);
17
+ poolPtr = 0;
18
+ }
19
+ return rnds8Pool.slice(poolPtr, poolPtr += 16);
20
+ }
21
+
22
+ // ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/native.js
23
+ import { randomUUID } from "crypto";
24
+ var native_default = { randomUUID };
25
+
26
+ // ../../node_modules/.pnpm/uuid@11.0.5/node_modules/uuid/dist/esm/v4.js
27
+ function v4(options, buf, offset) {
28
+ var _a;
29
+ if (native_default.randomUUID && !buf && !options) {
30
+ return native_default.randomUUID();
31
+ }
32
+ options = options || {};
33
+ const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
34
+ if (rnds.length < 16) {
35
+ throw new Error("Random bytes length must be >= 16");
36
+ }
37
+ rnds[6] = rnds[6] & 15 | 64;
38
+ rnds[8] = rnds[8] & 63 | 128;
39
+ if (buf) {
40
+ offset = offset || 0;
41
+ if (offset < 0 || offset + 16 > buf.length) {
42
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
43
+ }
44
+ for (let i = 0; i < 16; ++i) {
45
+ buf[offset + i] = rnds[i];
46
+ }
47
+ return buf;
48
+ }
49
+ return unsafeStringify(rnds);
50
+ }
51
+ var v4_default = v4;
52
+
1
53
  // ../manifest/dist/index.js
2
54
  var type = "CE_ACCORDION";
3
55
  var initState = () => ({
4
56
  embeds: {},
5
- items: []
57
+ items: [{ id: v4_default(), title: "Accordion Item Title", elementIds: [] }]
6
58
  });
7
59
 
8
60
  // src/index.ts
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.11",
6
+ "version": "0.0.13",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "@tailor-cms/eslint-config": "0.0.2",
21
21
  "tsup": "^7.2.0",
22
22
  "typescript": "^5.1.6",
23
- "@tailor-cms/ce-accordion-manifest": "0.0.11"
23
+ "@tailor-cms/ce-accordion-manifest": "0.0.13"
24
24
  },
25
25
  "tsup": {
26
26
  "entry": [