@tiptap/core 3.0.0-beta.2 → 3.0.0-beta.21

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.
@@ -0,0 +1,59 @@
1
+ // ../../node_modules/.pnpm/prosemirror-dev-tools@4.2.0_@babel+core@7.26.0_@babel+template@7.25.9_@types+react@19.1.6_rea_wz3aei26oeuigobt6rwizjq3ci/node_modules/prosemirror-dev-tools/dist/esm/state/idle-scheduler.js
2
+ function _classCallCheck(instance, Constructor) {
3
+ if (!(instance instanceof Constructor)) {
4
+ throw new TypeError("Cannot call a class as a function");
5
+ }
6
+ }
7
+ function _defineProperties(target, props) {
8
+ for (var i = 0; i < props.length; i++) {
9
+ var descriptor = props[i];
10
+ descriptor.enumerable = descriptor.enumerable || false;
11
+ descriptor.configurable = true;
12
+ if ("value" in descriptor) descriptor.writable = true;
13
+ Object.defineProperty(target, descriptor.key, descriptor);
14
+ }
15
+ }
16
+ function _createClass(Constructor, protoProps, staticProps) {
17
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
18
+ if (staticProps) _defineProperties(Constructor, staticProps);
19
+ Object.defineProperty(Constructor, "prototype", { writable: false });
20
+ return Constructor;
21
+ }
22
+ function _defineProperty(obj, key, value) {
23
+ if (key in obj) {
24
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
25
+ } else {
26
+ obj[key] = value;
27
+ }
28
+ return obj;
29
+ }
30
+ var IdleScheduler = /* @__PURE__ */ function() {
31
+ function IdleScheduler2() {
32
+ _classCallCheck(this, IdleScheduler2);
33
+ _defineProperty(this, "task", void 0);
34
+ }
35
+ _createClass(IdleScheduler2, [{
36
+ key: "request",
37
+ value: function request() {
38
+ this.cancel();
39
+ var request2 = window.requestIdleCallback || window.requestAnimationFrame;
40
+ return new Promise(function(resolve) {
41
+ return request2(resolve);
42
+ });
43
+ }
44
+ }, {
45
+ key: "cancel",
46
+ value: function cancel() {
47
+ var cancel2 = window.cancelIdleCallack || window.cancelAnimationFrame;
48
+ if (this.task) {
49
+ cancel2(this.task);
50
+ }
51
+ }
52
+ }]);
53
+ return IdleScheduler2;
54
+ }();
55
+
56
+ export {
57
+ IdleScheduler
58
+ };
59
+ //# sourceMappingURL=chunk-GRT2MR5L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/prosemirror-dev-tools@4.2.0_@babel+core@7.26.0_@babel+template@7.25.9_@types+react@19.1.6_rea_wz3aei26oeuigobt6rwizjq3ci/node_modules/prosemirror-dev-tools/dist/esm/state/idle-scheduler.js"],"sourcesContent":["function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nexport var IdleScheduler = /*#__PURE__*/function () {\n function IdleScheduler() {\n _classCallCheck(this, IdleScheduler);\n _defineProperty(this, \"task\", undefined);\n }\n _createClass(IdleScheduler, [{\n key: \"request\",\n value: function request() {\n this.cancel();\n var request = window.requestIdleCallback || window.requestAnimationFrame;\n return new Promise(function (resolve) {\n return request(resolve);\n });\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n var cancel = window.cancelIdleCallack || window.cancelAnimationFrame;\n if (this.task) {\n cancel(this.task);\n }\n }\n }]);\n return IdleScheduler;\n}();"],"mappings":";AAAA,SAAS,gBAAgB,UAAU,aAAa;AAAE,MAAI,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,KAAK,IAAI;AAAA,MAClB;AAAA,IACF;AAAA,EACF,CAAC,CAAC;AACF,SAAOF;AACT,EAAE;","names":["IdleScheduler","request","cancel"]}
@@ -0,0 +1,43 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
+ });
13
+ var __commonJS = (cb, mod) => function __require2() {
14
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ };
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+
37
+ export {
38
+ __require,
39
+ __commonJS,
40
+ __export,
41
+ __toESM
42
+ };
43
+ //# sourceMappingURL=chunk-PR4QN5HX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,34 @@
1
+ // ../../node_modules/.pnpm/nanoid@3.3.8/node_modules/nanoid/index.js
2
+ import crypto from "crypto";
3
+
4
+ // ../../node_modules/.pnpm/nanoid@3.3.8/node_modules/nanoid/url-alphabet/index.js
5
+ var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
6
+
7
+ // ../../node_modules/.pnpm/nanoid@3.3.8/node_modules/nanoid/index.js
8
+ var POOL_SIZE_MULTIPLIER = 128;
9
+ var pool;
10
+ var poolOffset;
11
+ var fillPool = (bytes) => {
12
+ if (!pool || pool.length < bytes) {
13
+ pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
14
+ crypto.randomFillSync(pool);
15
+ poolOffset = 0;
16
+ } else if (poolOffset + bytes > pool.length) {
17
+ crypto.randomFillSync(pool);
18
+ poolOffset = 0;
19
+ }
20
+ poolOffset += bytes;
21
+ };
22
+ var nanoid = (size = 21) => {
23
+ fillPool(size |= 0);
24
+ let id = "";
25
+ for (let i = poolOffset - size; i < poolOffset; i++) {
26
+ id += urlAlphabet[pool[i] & 63];
27
+ }
28
+ return id;
29
+ };
30
+
31
+ export {
32
+ nanoid
33
+ };
34
+ //# sourceMappingURL=chunk-TH7LERQR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/nanoid@3.3.8/node_modules/nanoid/index.js","../../../node_modules/.pnpm/nanoid@3.3.8/node_modules/nanoid/url-alphabet/index.js"],"sourcesContent":["import crypto from 'crypto'\n\nimport { urlAlphabet } from './url-alphabet/index.js'\n\n// It is best to make fewer, larger requests to the crypto module to\n// avoid system call overhead. So, random numbers are generated in a\n// pool. The pool is a Buffer that is larger than the initial random\n// request size by this multiplier. The pool is enlarged if subsequent\n// requests exceed the maximum buffer size.\nconst POOL_SIZE_MULTIPLIER = 128\nlet pool, poolOffset\n\nlet fillPool = bytes => {\n if (!pool || pool.length < bytes) {\n pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)\n crypto.randomFillSync(pool)\n poolOffset = 0\n } else if (poolOffset + bytes > pool.length) {\n crypto.randomFillSync(pool)\n poolOffset = 0\n }\n poolOffset += bytes\n}\n\nlet random = bytes => {\n // `|=` convert `bytes` to number to prevent `valueOf` abusing and pool pollution\n fillPool((bytes |= 0))\n return pool.subarray(poolOffset - bytes, poolOffset)\n}\n\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n // First, a bitmask is necessary to generate the ID. The bitmask makes bytes\n // values closer to the alphabet size. The bitmask calculates the closest\n // `2^31 - 1` number, which exceeds the alphabet size.\n // For example, the bitmask for the alphabet size 30 is 31 (00011111).\n let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1\n // Though, the bitmask solution is not perfect since the bytes exceeding\n // the alphabet size are refused. Therefore, to reliably generate the ID,\n // the random bytes redundancy has to be satisfied.\n\n // Note: every hardware random generator call is performance expensive,\n // because the system call for entropy collection takes a lot of time.\n // So, to avoid additional system calls, extra bytes are requested in advance.\n\n // Next, a step determines how many random bytes to generate.\n // The number of random bytes gets decided upon the ID size, mask,\n // alphabet size, and magic number 1.6 (using 1.6 peaks at performance\n // according to benchmarks).\n let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)\n\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n // A compact alternative for `for (let i = 0; i < step; i++)`.\n let i = step\n while (i--) {\n // Adding `|| ''` refuses a random byte that exceeds the alphabet size.\n id += alphabet[bytes[i] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\n\nlet customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\n\nlet nanoid = (size = 21) => {\n // `|=` convert `size` to number to prevent `valueOf` abusing and pool pollution\n fillPool((size |= 0))\n let id = ''\n // We are reading directly from the random pool to avoid creating new array\n for (let i = poolOffset - size; i < poolOffset; i++) {\n // It is incorrect to use bytes exceeding the alphabet size.\n // The following mask reduces the random byte in the 0-255 value\n // range to the 0-63 value range. Therefore, adding hacks, such\n // as empty string fallback or magic numbers, is unneccessary because\n // the bitmask trims bytes down to the alphabet size.\n id += urlAlphabet[pool[i] & 63]\n }\n return id\n}\n\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n","// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// Same as in non-secure/index.js\nlet urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\nexport { urlAlphabet }\n"],"mappings":";AAAA,OAAO,YAAY;;;ACGnB,IAAI,cACF;;;ADKF,IAAM,uBAAuB;AAC7B,IAAI;AAAJ,IAAU;AAEV,IAAI,WAAW,WAAS;AACtB,MAAI,CAAC,QAAQ,KAAK,SAAS,OAAO;AAChC,WAAO,OAAO,YAAY,QAAQ,oBAAoB;AACtD,WAAO,eAAe,IAAI;AAC1B,iBAAa;AAAA,EACf,WAAW,aAAa,QAAQ,KAAK,QAAQ;AAC3C,WAAO,eAAe,IAAI;AAC1B,iBAAa;AAAA,EACf;AACA,gBAAc;AAChB;AA8CA,IAAI,SAAS,CAAC,OAAO,OAAO;AAE1B,WAAU,QAAQ,CAAE;AACpB,MAAI,KAAK;AAET,WAAS,IAAI,aAAa,MAAM,IAAI,YAAY,KAAK;AAMnD,UAAM,YAAY,KAAK,CAAC,IAAI,EAAE;AAAA,EAChC;AACA,SAAO;AACT;","names":[]}