@tinacms/app 1.0.5 → 1.0.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/appFiles/node_modules/.package-lock.json +3 -3
- package/appFiles/node_modules/@babel/parser/lib/index.js +42 -34
- package/appFiles/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/appFiles/node_modules/@babel/parser/package.json +1 -1
- package/appFiles/src/App.tsx +1 -10
- package/appFiles/src/fields/rich-text/index.tsx +1 -10
- package/appFiles/src/fields/rich-text/monaco/error-message.tsx +0 -12
- package/appFiles/src/fields/rich-text/monaco/index.tsx +0 -12
- package/appFiles/src/fields/rich-text/monaco/use-debounce.ts +0 -12
- package/appFiles/src/lib/formify/index.ts +1 -10
- package/appFiles/src/lib/machines/document-machine.ts +1 -10
- package/appFiles/src/lib/machines/query-machine.ts +1 -10
- package/appFiles/src/lib/machines/util.ts +1 -10
- package/appFiles/src/main.tsx +1 -10
- package/appFiles/src/preview.tsx +1 -10
- package/appFiles/src/vite-env.d.ts +1 -10
- package/dist/index.js +16 -1
- package/package.json +5 -5
|
@@ -120,9 +120,9 @@
|
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
"node_modules/@babel/parser": {
|
|
123
|
-
"version": "7.20.
|
|
124
|
-
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.
|
|
125
|
-
"integrity": "sha512-
|
|
123
|
+
"version": "7.20.15",
|
|
124
|
+
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.15.tgz",
|
|
125
|
+
"integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==",
|
|
126
126
|
"bin": {
|
|
127
127
|
"parser": "bin/babel-parser.js"
|
|
128
128
|
},
|
|
@@ -113,6 +113,7 @@ var StandardErrors = {
|
|
|
113
113
|
AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
|
|
114
114
|
AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
|
|
115
115
|
AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
|
|
116
|
+
AwaitInUsingBinding: "'await' is not allowed to be used as a name in 'using' declarations.",
|
|
116
117
|
AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
|
|
117
118
|
AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
|
|
118
119
|
BadGetterArity: "A 'get' accessor must not have any formal parameters.",
|
|
@@ -1401,25 +1402,27 @@ const SCOPE_OTHER = 0b000000000,
|
|
|
1401
1402
|
SCOPE_STATIC_BLOCK = 0b010000000,
|
|
1402
1403
|
SCOPE_TS_MODULE = 0b100000000,
|
|
1403
1404
|
SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_STATIC_BLOCK | SCOPE_TS_MODULE;
|
|
1404
|
-
const BIND_KIND_VALUE =
|
|
1405
|
-
BIND_KIND_TYPE =
|
|
1406
|
-
BIND_SCOPE_VAR =
|
|
1407
|
-
BIND_SCOPE_LEXICAL =
|
|
1408
|
-
BIND_SCOPE_FUNCTION =
|
|
1409
|
-
BIND_FLAGS_NONE =
|
|
1410
|
-
BIND_FLAGS_CLASS =
|
|
1411
|
-
BIND_FLAGS_TS_ENUM =
|
|
1412
|
-
BIND_FLAGS_TS_CONST_ENUM =
|
|
1413
|
-
BIND_FLAGS_TS_EXPORT_ONLY =
|
|
1414
|
-
BIND_FLAGS_FLOW_DECLARE_FN =
|
|
1415
|
-
BIND_FLAGS_TS_IMPORT =
|
|
1416
|
-
|
|
1417
|
-
|
|
1405
|
+
const BIND_KIND_VALUE = 0b0000000000001,
|
|
1406
|
+
BIND_KIND_TYPE = 0b0000000000010,
|
|
1407
|
+
BIND_SCOPE_VAR = 0b0000000000100,
|
|
1408
|
+
BIND_SCOPE_LEXICAL = 0b0000000001000,
|
|
1409
|
+
BIND_SCOPE_FUNCTION = 0b0000000010000,
|
|
1410
|
+
BIND_FLAGS_NONE = 0b00000001000000,
|
|
1411
|
+
BIND_FLAGS_CLASS = 0b00000010000000,
|
|
1412
|
+
BIND_FLAGS_TS_ENUM = 0b00000100000000,
|
|
1413
|
+
BIND_FLAGS_TS_CONST_ENUM = 0b00001000000000,
|
|
1414
|
+
BIND_FLAGS_TS_EXPORT_ONLY = 0b00010000000000,
|
|
1415
|
+
BIND_FLAGS_FLOW_DECLARE_FN = 0b00100000000000,
|
|
1416
|
+
BIND_FLAGS_TS_IMPORT = 0b01000000000000,
|
|
1417
|
+
BIND_FLAGS_NO_LET_IN_LEXICAL = 0b10000000000000;
|
|
1418
|
+
const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS | BIND_FLAGS_NO_LET_IN_LEXICAL,
|
|
1419
|
+
BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | BIND_FLAGS_NO_LET_IN_LEXICAL,
|
|
1420
|
+
BIND_CATCH_PARAM = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0,
|
|
1418
1421
|
BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0,
|
|
1419
1422
|
BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0,
|
|
1420
1423
|
BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS,
|
|
1421
1424
|
BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0,
|
|
1422
|
-
BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,
|
|
1425
|
+
BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM | BIND_FLAGS_NO_LET_IN_LEXICAL,
|
|
1423
1426
|
BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
|
|
1424
1427
|
BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE,
|
|
1425
1428
|
BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE,
|
|
@@ -10372,7 +10375,6 @@ class LValParser extends NodeUtils {
|
|
|
10372
10375
|
binding = BIND_NONE,
|
|
10373
10376
|
checkClashes = false,
|
|
10374
10377
|
strictModeChanged = false,
|
|
10375
|
-
allowingSloppyLetBinding = !(binding & BIND_SCOPE_LEXICAL),
|
|
10376
10378
|
hasParenthesizedAncestor = false
|
|
10377
10379
|
}) {
|
|
10378
10380
|
var _expression$extra;
|
|
@@ -10386,8 +10388,8 @@ class LValParser extends NodeUtils {
|
|
|
10386
10388
|
}
|
|
10387
10389
|
return;
|
|
10388
10390
|
}
|
|
10389
|
-
if (
|
|
10390
|
-
this.checkIdentifier(expression, binding, strictModeChanged
|
|
10391
|
+
if (type === "Identifier") {
|
|
10392
|
+
this.checkIdentifier(expression, binding, strictModeChanged);
|
|
10391
10393
|
const {
|
|
10392
10394
|
name
|
|
10393
10395
|
} = expression;
|
|
@@ -10402,37 +10404,33 @@ class LValParser extends NodeUtils {
|
|
|
10402
10404
|
}
|
|
10403
10405
|
return;
|
|
10404
10406
|
}
|
|
10405
|
-
const validity = this.isValidLVal(
|
|
10407
|
+
const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding);
|
|
10406
10408
|
if (validity === true) return;
|
|
10407
10409
|
if (validity === false) {
|
|
10408
10410
|
const ParseErrorClass = binding === BIND_NONE ? Errors.InvalidLhs : Errors.InvalidLhsBinding;
|
|
10409
10411
|
this.raise(ParseErrorClass, {
|
|
10410
10412
|
at: expression,
|
|
10411
|
-
ancestor
|
|
10412
|
-
type: "UpdateExpression",
|
|
10413
|
-
prefix: ancestor.prefix
|
|
10414
|
-
} : {
|
|
10415
|
-
type: ancestor.type
|
|
10416
|
-
}
|
|
10413
|
+
ancestor
|
|
10417
10414
|
});
|
|
10418
10415
|
return;
|
|
10419
10416
|
}
|
|
10420
10417
|
const [key, isParenthesizedExpression] = Array.isArray(validity) ? validity : [validity, type === "ParenthesizedExpression"];
|
|
10421
|
-
const nextAncestor =
|
|
10418
|
+
const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" || type === "ParenthesizedExpression" ? {
|
|
10419
|
+
type
|
|
10420
|
+
} : ancestor;
|
|
10422
10421
|
for (const child of [].concat(expression[key])) {
|
|
10423
10422
|
if (child) {
|
|
10424
10423
|
this.checkLVal(child, {
|
|
10425
10424
|
in: nextAncestor,
|
|
10426
10425
|
binding,
|
|
10427
10426
|
checkClashes,
|
|
10428
|
-
allowingSloppyLetBinding,
|
|
10429
10427
|
strictModeChanged,
|
|
10430
10428
|
hasParenthesizedAncestor: isParenthesizedExpression
|
|
10431
10429
|
});
|
|
10432
10430
|
}
|
|
10433
10431
|
}
|
|
10434
10432
|
}
|
|
10435
|
-
checkIdentifier(at, bindingType, strictModeChanged = false
|
|
10433
|
+
checkIdentifier(at, bindingType, strictModeChanged = false) {
|
|
10436
10434
|
if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) {
|
|
10437
10435
|
if (bindingType === BIND_NONE) {
|
|
10438
10436
|
this.raise(Errors.StrictEvalArguments, {
|
|
@@ -10446,7 +10444,7 @@ class LValParser extends NodeUtils {
|
|
|
10446
10444
|
});
|
|
10447
10445
|
}
|
|
10448
10446
|
}
|
|
10449
|
-
if (
|
|
10447
|
+
if (bindingType & BIND_FLAGS_NO_LET_IN_LEXICAL && at.name === "let") {
|
|
10450
10448
|
this.raise(Errors.LetInLexicalBinding, {
|
|
10451
10449
|
at
|
|
10452
10450
|
});
|
|
@@ -11542,12 +11540,13 @@ class ExpressionParser extends LValParser {
|
|
|
11542
11540
|
return this.finishNode(node, "NewExpression");
|
|
11543
11541
|
}
|
|
11544
11542
|
parseNewCallee(node) {
|
|
11543
|
+
var _node$callee$extra;
|
|
11545
11544
|
node.callee = this.parseNoCallExpr();
|
|
11546
11545
|
if (node.callee.type === "Import") {
|
|
11547
11546
|
this.raise(Errors.ImportCallNotNewExpression, {
|
|
11548
11547
|
at: node.callee
|
|
11549
11548
|
});
|
|
11550
|
-
} else if (this.isOptionalChain(node.callee)) {
|
|
11549
|
+
} else if (this.isOptionalChain(node.callee) && !((_node$callee$extra = node.callee.extra) != null && _node$callee$extra.parenthesized)) {
|
|
11551
11550
|
this.raise(Errors.OptionalChainingNoNew, {
|
|
11552
11551
|
at: this.state.lastTokEndLoc
|
|
11553
11552
|
});
|
|
@@ -12980,8 +12979,7 @@ class StatementParser extends ExpressionParser {
|
|
|
12980
12979
|
in: {
|
|
12981
12980
|
type: "CatchClause"
|
|
12982
12981
|
},
|
|
12983
|
-
binding:
|
|
12984
|
-
allowingSloppyLetBinding: true
|
|
12982
|
+
binding: BIND_CATCH_PARAM
|
|
12985
12983
|
});
|
|
12986
12984
|
return param;
|
|
12987
12985
|
}
|
|
@@ -13195,6 +13193,11 @@ class StatementParser extends ExpressionParser {
|
|
|
13195
13193
|
return node;
|
|
13196
13194
|
}
|
|
13197
13195
|
parseVarId(decl, kind) {
|
|
13196
|
+
if (kind === "using" && !this.inModule && this.match(96)) {
|
|
13197
|
+
this.raise(Errors.AwaitInUsingBinding, {
|
|
13198
|
+
at: this.state.startLoc
|
|
13199
|
+
});
|
|
13200
|
+
}
|
|
13198
13201
|
const id = this.parseBindingAtom();
|
|
13199
13202
|
this.checkLVal(id, {
|
|
13200
13203
|
in: {
|
|
@@ -13612,9 +13615,12 @@ class StatementParser extends ExpressionParser {
|
|
|
13612
13615
|
return this.finishNode(node, "ExportAllDeclaration");
|
|
13613
13616
|
}
|
|
13614
13617
|
const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
|
|
13615
|
-
if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers
|
|
13618
|
+
if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) {
|
|
13616
13619
|
throw this.unexpected(null, 5);
|
|
13617
13620
|
}
|
|
13621
|
+
if (hasNamespace && parseAfterNamespace) {
|
|
13622
|
+
throw this.unexpected(null, 97);
|
|
13623
|
+
}
|
|
13618
13624
|
let hasDeclaration;
|
|
13619
13625
|
if (isFromRequired || hasSpecifiers) {
|
|
13620
13626
|
hasDeclaration = false;
|
|
@@ -14053,7 +14059,9 @@ class StatementParser extends ExpressionParser {
|
|
|
14053
14059
|
}
|
|
14054
14060
|
finishImportSpecifier(specifier, type, bindingType = BIND_LEXICAL) {
|
|
14055
14061
|
this.checkLVal(specifier.local, {
|
|
14056
|
-
in:
|
|
14062
|
+
in: {
|
|
14063
|
+
type
|
|
14064
|
+
},
|
|
14057
14065
|
binding: bindingType
|
|
14058
14066
|
});
|
|
14059
14067
|
return this.finishNode(specifier, type);
|