tetrons 2.3.48 → 2.3.49
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 +8 -13
- package/dist/index.mjs +7 -12
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/
|
|
2
|
-
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
3
|
-
var _url = require('url');
|
|
4
|
-
|
|
5
|
-
// src/components/tetrons/EditorContent.tsx
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/components/tetrons/EditorContent.tsx
|
|
6
2
|
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
7
3
|
|
|
8
4
|
|
|
@@ -955,11 +951,11 @@ var ResolvedPos = class _ResolvedPos {
|
|
|
955
951
|
/**
|
|
956
952
|
@internal
|
|
957
953
|
*/
|
|
958
|
-
constructor(pos,
|
|
954
|
+
constructor(pos, path, parentOffset) {
|
|
959
955
|
this.pos = pos;
|
|
960
|
-
this.path =
|
|
956
|
+
this.path = path;
|
|
961
957
|
this.parentOffset = parentOffset;
|
|
962
|
-
this.depth =
|
|
958
|
+
this.depth = path.length / 3 - 1;
|
|
963
959
|
}
|
|
964
960
|
/**
|
|
965
961
|
@internal
|
|
@@ -1190,12 +1186,12 @@ var ResolvedPos = class _ResolvedPos {
|
|
|
1190
1186
|
static resolve(doc3, pos) {
|
|
1191
1187
|
if (!(pos >= 0 && pos <= doc3.content.size))
|
|
1192
1188
|
throw new RangeError("Position " + pos + " out of range");
|
|
1193
|
-
let
|
|
1189
|
+
let path = [];
|
|
1194
1190
|
let start = 0, parentOffset = pos;
|
|
1195
1191
|
for (let node = doc3; ; ) {
|
|
1196
1192
|
let { index, offset } = node.content.findIndex(parentOffset);
|
|
1197
1193
|
let rem = parentOffset - offset;
|
|
1198
|
-
|
|
1194
|
+
path.push(node, index, start + offset);
|
|
1199
1195
|
if (!rem)
|
|
1200
1196
|
break;
|
|
1201
1197
|
node = node.child(index);
|
|
@@ -1204,7 +1200,7 @@ var ResolvedPos = class _ResolvedPos {
|
|
|
1204
1200
|
parentOffset = rem - 1;
|
|
1205
1201
|
start += offset + 1;
|
|
1206
1202
|
}
|
|
1207
|
-
return new _ResolvedPos(pos,
|
|
1203
|
+
return new _ResolvedPos(pos, path, parentOffset);
|
|
1208
1204
|
}
|
|
1209
1205
|
/**
|
|
1210
1206
|
@internal
|
|
@@ -17012,8 +17008,7 @@ async function initializeTetrons(apiKey) {
|
|
|
17012
17008
|
if (!API_VALID) {
|
|
17013
17009
|
throw new Error("API Key is not valid.");
|
|
17014
17010
|
}
|
|
17015
|
-
const
|
|
17016
|
-
const { getOrCreateInstallDate, getRemainingDays } = await Promise.resolve().then(() => _interopRequireWildcard(require(_path2.default.join(__dirname, "./internal/licenseUtils.js"))));
|
|
17011
|
+
const { getOrCreateInstallDate, getRemainingDays } = await Promise.resolve().then(() => _interopRequireWildcard(require("./licenseUtils-2F6HALFV.cjs")));
|
|
17017
17012
|
const validityDays = API_VERSION === "free" ? 14 : 30;
|
|
17018
17013
|
const installedAt = getOrCreateInstallDate();
|
|
17019
17014
|
const remainingDays = getRemainingDays(installedAt, validityDays);
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// src/index.ts
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
|
|
5
1
|
// src/components/tetrons/EditorContent.tsx
|
|
6
2
|
import React14, { useEffect as useEffect8, useRef as useRef7, useState as useState9 } from "react";
|
|
7
3
|
import {
|
|
@@ -955,11 +951,11 @@ var ResolvedPos = class _ResolvedPos {
|
|
|
955
951
|
/**
|
|
956
952
|
@internal
|
|
957
953
|
*/
|
|
958
|
-
constructor(pos,
|
|
954
|
+
constructor(pos, path, parentOffset) {
|
|
959
955
|
this.pos = pos;
|
|
960
|
-
this.path =
|
|
956
|
+
this.path = path;
|
|
961
957
|
this.parentOffset = parentOffset;
|
|
962
|
-
this.depth =
|
|
958
|
+
this.depth = path.length / 3 - 1;
|
|
963
959
|
}
|
|
964
960
|
/**
|
|
965
961
|
@internal
|
|
@@ -1190,12 +1186,12 @@ var ResolvedPos = class _ResolvedPos {
|
|
|
1190
1186
|
static resolve(doc3, pos) {
|
|
1191
1187
|
if (!(pos >= 0 && pos <= doc3.content.size))
|
|
1192
1188
|
throw new RangeError("Position " + pos + " out of range");
|
|
1193
|
-
let
|
|
1189
|
+
let path = [];
|
|
1194
1190
|
let start = 0, parentOffset = pos;
|
|
1195
1191
|
for (let node = doc3; ; ) {
|
|
1196
1192
|
let { index, offset } = node.content.findIndex(parentOffset);
|
|
1197
1193
|
let rem = parentOffset - offset;
|
|
1198
|
-
|
|
1194
|
+
path.push(node, index, start + offset);
|
|
1199
1195
|
if (!rem)
|
|
1200
1196
|
break;
|
|
1201
1197
|
node = node.child(index);
|
|
@@ -1204,7 +1200,7 @@ var ResolvedPos = class _ResolvedPos {
|
|
|
1204
1200
|
parentOffset = rem - 1;
|
|
1205
1201
|
start += offset + 1;
|
|
1206
1202
|
}
|
|
1207
|
-
return new _ResolvedPos(pos,
|
|
1203
|
+
return new _ResolvedPos(pos, path, parentOffset);
|
|
1208
1204
|
}
|
|
1209
1205
|
/**
|
|
1210
1206
|
@internal
|
|
@@ -17012,8 +17008,7 @@ async function initializeTetrons(apiKey) {
|
|
|
17012
17008
|
if (!API_VALID) {
|
|
17013
17009
|
throw new Error("API Key is not valid.");
|
|
17014
17010
|
}
|
|
17015
|
-
const
|
|
17016
|
-
const { getOrCreateInstallDate, getRemainingDays } = await import(path.join(__dirname, "./internal/licenseUtils.js"));
|
|
17011
|
+
const { getOrCreateInstallDate, getRemainingDays } = await import("./licenseUtils-FRSC7JAY.mjs");
|
|
17017
17012
|
const validityDays = API_VERSION === "free" ? 14 : 30;
|
|
17018
17013
|
const installedAt = getOrCreateInstallDate();
|
|
17019
17014
|
const remainingDays = getRemainingDays(installedAt, validityDays);
|