marko 6.3.20 → 6.3.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.
- package/cheatsheet.md +29 -3
- package/dist/common/accessor.d.ts +21 -75
- package/dist/common/accessor.debug.d.ts +21 -75
- package/dist/common/constants/accessor-prefix.d.ts +16 -0
- package/dist/common/constants/accessor-prefix.debug.d.ts +16 -0
- package/dist/common/constants/accessor-prop.d.ts +30 -0
- package/dist/common/constants/accessor-prop.debug.d.ts +30 -0
- package/dist/common/constants/closure-signal-prop.d.ts +6 -0
- package/dist/common/constants/closure-signal-prop.debug.d.ts +6 -0
- package/dist/common/constants/controlled-type.d.ts +9 -0
- package/dist/common/constants/keyed-scopes-prop.d.ts +4 -0
- package/dist/common/constants/keyed-scopes-prop.debug.d.ts +4 -0
- package/dist/common/constants/load-signal-value.d.ts +5 -0
- package/dist/common/constants/load-signal-value.debug.d.ts +5 -0
- package/dist/common/constants/node-type.d.ts +7 -0
- package/dist/common/constants/pending-render-prop.d.ts +9 -0
- package/dist/common/constants/pending-render-prop.debug.d.ts +9 -0
- package/dist/common/constants/renderer-prop.d.ts +12 -0
- package/dist/common/constants/renderer-prop.debug.d.ts +12 -0
- package/dist/common/constants/resume-symbol.d.ts +10 -0
- package/dist/common/constants/walk-code.d.ts +17 -0
- package/dist/common/constants/walk-range-size.d.ts +7 -0
- package/dist/common/types.d.ts +15 -45
- package/dist/debug/dom.js +291 -225
- package/dist/debug/dom.mjs +291 -225
- package/dist/debug/html.js +184 -41
- package/dist/debug/html.mjs +184 -41
- package/dist/dom/compat.d.ts +1 -1
- package/dist/dom/control-flow.d.ts +1 -1
- package/dist/dom/renderer.d.ts +2 -2
- package/dist/dom/scope.d.ts +1 -1
- package/dist/dom.js +8 -6
- package/dist/dom.mjs +8 -6
- package/dist/html/constants/char.d.ts +11 -0
- package/dist/html/constants/flush-status.d.ts +6 -0
- package/dist/html/constants/mark.d.ts +6 -0
- package/dist/html/constants/runtime-key.d.ts +7 -0
- package/dist/html/writer.d.ts +19 -23
- package/dist/html.js +127 -28
- package/dist/html.mjs +127 -28
- package/dist/translator/core/if.d.ts +7 -7
- package/dist/translator/core/index.d.ts +7 -7
- package/dist/translator/index.d.ts +9 -9
- package/dist/translator/index.js +185 -132
- package/dist/translator/interop/constants/feature-type.d.ts +5 -0
- package/dist/translator/interop/index.d.ts +2 -2
- package/dist/translator/util/body-to-text-literal.d.ts +2 -2
- package/dist/translator/util/constants/binding-type.d.ts +10 -0
- package/dist/translator/util/constants/compile-stage.d.ts +8 -0
- package/dist/translator/util/constants/content-type.d.ts +8 -0
- package/dist/translator/util/constants/step.d.ts +5 -0
- package/dist/translator/util/constants/tag-name-type.d.ts +7 -0
- package/dist/translator/util/is-static.d.ts +1 -1
- package/dist/translator/util/references.d.ts +5 -12
- package/dist/translator/util/sections.d.ts +4 -8
- package/dist/translator/util/signals.d.ts +1 -0
- package/dist/translator/util/tag-name-type.d.ts +4 -7
- package/dist/translator/util/walks.d.ts +4 -6
- package/dist/translator/visitors/constants/sibling-text.d.ts +7 -0
- package/dist/translator/visitors/placeholder.d.ts +2 -6
- package/dist/translator/visitors/tag/constants/class-hydration.d.ts +5 -0
- package/dist/translator/visitors/tag/dynamic-tag.d.ts +2 -4
- package/package.json +15 -15
- package/tags-html.d.ts +98 -22
|
@@ -3,8 +3,8 @@ type Taglibs = [taglibId: string, taglib: Record<string, unknown>][];
|
|
|
3
3
|
export declare function createInteropTranslator(translate5: any): {
|
|
4
4
|
version: any;
|
|
5
5
|
preferAPI: any;
|
|
6
|
-
transform: Record<"
|
|
7
|
-
analyze: Record<"
|
|
6
|
+
transform: Record<"Accessor" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayExpression" | "ArrayPattern" | "ArrayTypeAnnotation" | "ArrowFunctionExpression" | "AssignmentExpression" | "AssignmentPattern" | "AwaitExpression" | "BigIntLiteral" | "Binary" | "BinaryExpression" | "BindExpression" | "BindingIdentifier" | "Block" | "BlockParent" | "BlockScoped" | "BlockStatement" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "CallExpression" | "CatchClause" | "Class" | "ClassAccessorProperty" | "ClassBody" | "ClassDeclaration" | "ClassExpression" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "CompletionStatement" | "Conditional" | "ConditionalExpression" | "ContinueStatement" | "DebuggerStatement" | "DecimalLiteral" | "Declaration" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "DoWhileStatement" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBody" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistentialTypeParam" | "ExistsTypeAnnotation" | "ExportAllDeclaration" | "ExportDeclaration" | "ExportDefaultDeclaration" | "ExportDefaultSpecifier" | "ExportNamedDeclaration" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "Expression" | "ExpressionStatement" | "ExpressionWrapper" | "File" | "Flow" | "FlowBaseAnnotation" | "FlowDeclaration" | "FlowPredicate" | "FlowType" | "For" | "ForAwaitStatement" | "ForInStatement" | "ForOfStatement" | "ForStatement" | "ForXStatement" | "Function" | "FunctionDeclaration" | "FunctionExpression" | "FunctionParameter" | "FunctionParent" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "Generated" | "GenericTypeAnnotation" | "Identifier" | "IfStatement" | "Immutable" | "Import" | "ImportAttribute" | "ImportDeclaration" | "ImportDefaultSpecifier" | "ImportExpression" | "ImportNamespaceSpecifier" | "ImportOrExportDeclaration" | "ImportSpecifier" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSX" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXFragment" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "LVal" | "LabeledStatement" | "Literal" | "LogicalExpression" | "Loop" | "Marko" | "MarkoAttribute" | "MarkoCDATA" | "MarkoClass" | "MarkoComment" | "MarkoDeclaration" | "MarkoDocumentType" | "MarkoParseError" | "MarkoPlaceholder" | "MarkoScriptlet" | "MarkoSpreadAttribute" | "MarkoTag" | "MarkoTagBody" | "MarkoText" | "MemberExpression" | "MetaProperty" | "Method" | "Miscellaneous" | "MixedTypeAnnotation" | "ModuleDeclaration" | "ModuleExpression" | "ModuleSpecifier" | "NewExpression" | "Noop" | "NullLiteral" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "NumericLiteral" | "NumericLiteralTypeAnnotation" | "ObjectExpression" | "ObjectMember" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalCallExpression" | "OptionalIndexedAccessType" | "OptionalMemberExpression" | "ParenthesizedExpression" | "Pattern" | "PatternLike" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "Placeholder" | "Private" | "PrivateName" | "Program" | "Property" | "Pure" | "Pureish" | "QualifiedTypeIdentifier" | "RecordExpression" | "Referenced" | "ReferencedIdentifier" | "ReferencedMemberExpression" | "RegExpLiteral" | "RegexLiteral" | "RestElement" | "RestProperty" | "ReturnStatement" | "Scopable" | "Scope" | "SequenceExpression" | "SpreadElement" | "SpreadProperty" | "Standardized" | "Statement" | "StaticBlock" | "StringLiteral" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "Super" | "SwitchCase" | "SwitchStatement" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSAsExpression" | "TSBaseType" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEntityName" | "TSEnumBody" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInstantiationExpression" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNonNullExpression" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSSatisfiesExpression" | "TSStringKeyword" | "TSSymbolKeyword" | "TSTemplateLiteralType" | "TSThisType" | "TSTupleType" | "TSType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeAssertion" | "TSTypeElement" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "TaggedTemplateExpression" | "TemplateElement" | "TemplateLiteral" | "Terminatorless" | "ThisExpression" | "ThisTypeAnnotation" | "ThrowStatement" | "TopicReference" | "TryStatement" | "TupleExpression" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeCastExpression" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeScript" | "TypeofTypeAnnotation" | "UnaryExpression" | "UnaryLike" | "UnionTypeAnnotation" | "UpdateExpression" | "User" | "UserWhitespacable" | "V8IntrinsicIdentifier" | "Var" | "VariableDeclaration" | "VariableDeclarator" | "Variance" | "VoidPattern" | "VoidTypeAnnotation" | "While" | "WhileStatement" | "WithStatement" | "YieldExpression" | "enter" | "exit" | `${string}|${string}`, t.VisitNode<unknown, t.Node> | undefined>;
|
|
7
|
+
analyze: Record<"Accessor" | "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayExpression" | "ArrayPattern" | "ArrayTypeAnnotation" | "ArrowFunctionExpression" | "AssignmentExpression" | "AssignmentPattern" | "AwaitExpression" | "BigIntLiteral" | "Binary" | "BinaryExpression" | "BindExpression" | "BindingIdentifier" | "Block" | "BlockParent" | "BlockScoped" | "BlockStatement" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "CallExpression" | "CatchClause" | "Class" | "ClassAccessorProperty" | "ClassBody" | "ClassDeclaration" | "ClassExpression" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "CompletionStatement" | "Conditional" | "ConditionalExpression" | "ContinueStatement" | "DebuggerStatement" | "DecimalLiteral" | "Declaration" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "DoWhileStatement" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBody" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistentialTypeParam" | "ExistsTypeAnnotation" | "ExportAllDeclaration" | "ExportDeclaration" | "ExportDefaultDeclaration" | "ExportDefaultSpecifier" | "ExportNamedDeclaration" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "Expression" | "ExpressionStatement" | "ExpressionWrapper" | "File" | "Flow" | "FlowBaseAnnotation" | "FlowDeclaration" | "FlowPredicate" | "FlowType" | "For" | "ForAwaitStatement" | "ForInStatement" | "ForOfStatement" | "ForStatement" | "ForXStatement" | "Function" | "FunctionDeclaration" | "FunctionExpression" | "FunctionParameter" | "FunctionParent" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "Generated" | "GenericTypeAnnotation" | "Identifier" | "IfStatement" | "Immutable" | "Import" | "ImportAttribute" | "ImportDeclaration" | "ImportDefaultSpecifier" | "ImportExpression" | "ImportNamespaceSpecifier" | "ImportOrExportDeclaration" | "ImportSpecifier" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSX" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXFragment" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "LVal" | "LabeledStatement" | "Literal" | "LogicalExpression" | "Loop" | "Marko" | "MarkoAttribute" | "MarkoCDATA" | "MarkoClass" | "MarkoComment" | "MarkoDeclaration" | "MarkoDocumentType" | "MarkoParseError" | "MarkoPlaceholder" | "MarkoScriptlet" | "MarkoSpreadAttribute" | "MarkoTag" | "MarkoTagBody" | "MarkoText" | "MemberExpression" | "MetaProperty" | "Method" | "Miscellaneous" | "MixedTypeAnnotation" | "ModuleDeclaration" | "ModuleExpression" | "ModuleSpecifier" | "NewExpression" | "Noop" | "NullLiteral" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "NumericLiteral" | "NumericLiteralTypeAnnotation" | "ObjectExpression" | "ObjectMember" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalCallExpression" | "OptionalIndexedAccessType" | "OptionalMemberExpression" | "ParenthesizedExpression" | "Pattern" | "PatternLike" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "Placeholder" | "Private" | "PrivateName" | "Program" | "Property" | "Pure" | "Pureish" | "QualifiedTypeIdentifier" | "RecordExpression" | "Referenced" | "ReferencedIdentifier" | "ReferencedMemberExpression" | "RegExpLiteral" | "RegexLiteral" | "RestElement" | "RestProperty" | "ReturnStatement" | "Scopable" | "Scope" | "SequenceExpression" | "SpreadElement" | "SpreadProperty" | "Standardized" | "Statement" | "StaticBlock" | "StringLiteral" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "Super" | "SwitchCase" | "SwitchStatement" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSAsExpression" | "TSBaseType" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEntityName" | "TSEnumBody" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInstantiationExpression" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNonNullExpression" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSSatisfiesExpression" | "TSStringKeyword" | "TSSymbolKeyword" | "TSTemplateLiteralType" | "TSThisType" | "TSTupleType" | "TSType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeAssertion" | "TSTypeElement" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "TaggedTemplateExpression" | "TemplateElement" | "TemplateLiteral" | "Terminatorless" | "ThisExpression" | "ThisTypeAnnotation" | "ThrowStatement" | "TopicReference" | "TryStatement" | "TupleExpression" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeCastExpression" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeScript" | "TypeofTypeAnnotation" | "UnaryExpression" | "UnaryLike" | "UnionTypeAnnotation" | "UpdateExpression" | "User" | "UserWhitespacable" | "V8IntrinsicIdentifier" | "Var" | "VariableDeclaration" | "VariableDeclarator" | "Variance" | "VoidPattern" | "VoidTypeAnnotation" | "While" | "WhileStatement" | "WithStatement" | "YieldExpression" | "enter" | "exit" | `${string}|${string}`, t.VisitNode<unknown, t.Node> | undefined>;
|
|
8
8
|
translate: t.Visitor<unknown>;
|
|
9
9
|
tagDiscoveryDirs: any[];
|
|
10
10
|
taglibs: Taglibs;
|
|
@@ -5,6 +5,6 @@ declare module "@marko/compiler/dist/types" {
|
|
|
5
5
|
[kRawText]?: true;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
export declare function bodyToTextLiteral(body: t.MarkoTagBody): t.ArrayExpression | t.ArrowFunctionExpression | t.AssignmentExpression | t.AwaitExpression | t.BigIntLiteral | t.BinaryExpression | t.BindExpression | t.BooleanLiteral | t.CallExpression | t.ClassExpression | t.ConditionalExpression | t.DecimalLiteral | t.DoExpression | t.FunctionExpression | t.Identifier | t.Import | t.ImportExpression | t.JSXElement | t.JSXFragment | t.LogicalExpression | t.MemberExpression | t.MetaProperty | t.ModuleExpression | t.NewExpression | t.NullLiteral | t.NumericLiteral | t.ObjectExpression | t.OptionalCallExpression | t.OptionalMemberExpression | t.ParenthesizedExpression | t.PipelineBareFunction | t.PipelinePrimaryTopicReference | t.PipelineTopicExpression | t.RecordExpression | t.RegExpLiteral | t.SequenceExpression | t.StringLiteral | t.Super | t.TSAsExpression | t.TSInstantiationExpression | t.TSNonNullExpression | t.TSSatisfiesExpression | t.TSTypeAssertion | t.TaggedTemplateExpression | t.TemplateLiteral | t.ThisExpression | t.TopicReference | t.TupleExpression | t.TypeCastExpression | t.UnaryExpression | t.UpdateExpression | t.YieldExpression
|
|
9
|
-
export declare function bodyToRawTextLiteral(body: t.MarkoTagBody): t.ArrayExpression | t.ArrowFunctionExpression | t.AssignmentExpression | t.AwaitExpression | t.BigIntLiteral | t.BinaryExpression | t.BindExpression | t.BooleanLiteral | t.CallExpression | t.ClassExpression | t.ConditionalExpression | t.DecimalLiteral | t.DoExpression | t.FunctionExpression | t.Identifier | t.Import | t.ImportExpression | t.JSXElement | t.JSXFragment | t.LogicalExpression | t.MemberExpression | t.MetaProperty | t.ModuleExpression | t.NewExpression | t.NullLiteral | t.NumericLiteral | t.ObjectExpression | t.OptionalCallExpression | t.OptionalMemberExpression | t.ParenthesizedExpression | t.PipelineBareFunction | t.PipelinePrimaryTopicReference | t.PipelineTopicExpression | t.RecordExpression | t.RegExpLiteral | t.SequenceExpression | t.StringLiteral | t.Super | t.TSAsExpression | t.TSInstantiationExpression | t.TSNonNullExpression | t.TSSatisfiesExpression | t.TSTypeAssertion | t.TaggedTemplateExpression | t.TemplateLiteral | t.ThisExpression | t.TopicReference | t.TupleExpression | t.TypeCastExpression | t.UnaryExpression | t.UpdateExpression | t.YieldExpression
|
|
8
|
+
export declare function bodyToTextLiteral(body: t.MarkoTagBody): t.ArrayExpression | t.ArrowFunctionExpression | t.AssignmentExpression | t.AwaitExpression | t.BigIntLiteral | t.BinaryExpression | t.BindExpression | t.BooleanLiteral | t.CallExpression | t.ClassExpression | t.ConditionalExpression | t.DecimalLiteral | t.DoExpression | t.FunctionExpression | t.Identifier | t.Import | t.ImportExpression | t.JSXElement | t.JSXFragment | t.LogicalExpression | t.MarkoParseError | t.MemberExpression | t.MetaProperty | t.ModuleExpression | t.NewExpression | t.NullLiteral | t.NumericLiteral | t.ObjectExpression | t.OptionalCallExpression | t.OptionalMemberExpression | t.ParenthesizedExpression | t.PipelineBareFunction | t.PipelinePrimaryTopicReference | t.PipelineTopicExpression | t.RecordExpression | t.RegExpLiteral | t.SequenceExpression | t.StringLiteral | t.Super | t.TSAsExpression | t.TSInstantiationExpression | t.TSNonNullExpression | t.TSSatisfiesExpression | t.TSTypeAssertion | t.TaggedTemplateExpression | t.TemplateLiteral | t.ThisExpression | t.TopicReference | t.TupleExpression | t.TypeCastExpression | t.UnaryExpression | t.UpdateExpression | t.YieldExpression;
|
|
9
|
+
export declare function bodyToRawTextLiteral(body: t.MarkoTagBody): t.ArrayExpression | t.ArrowFunctionExpression | t.AssignmentExpression | t.AwaitExpression | t.BigIntLiteral | t.BinaryExpression | t.BindExpression | t.BooleanLiteral | t.CallExpression | t.ClassExpression | t.ConditionalExpression | t.DecimalLiteral | t.DoExpression | t.FunctionExpression | t.Identifier | t.Import | t.ImportExpression | t.JSXElement | t.JSXFragment | t.LogicalExpression | t.MarkoParseError | t.MemberExpression | t.MetaProperty | t.ModuleExpression | t.NewExpression | t.NullLiteral | t.NumericLiteral | t.ObjectExpression | t.OptionalCallExpression | t.OptionalMemberExpression | t.ParenthesizedExpression | t.PipelineBareFunction | t.PipelinePrimaryTopicReference | t.PipelineTopicExpression | t.RecordExpression | t.RegExpLiteral | t.SequenceExpression | t.StringLiteral | t.Super | t.TSAsExpression | t.TSInstantiationExpression | t.TSNonNullExpression | t.TSSatisfiesExpression | t.TSTypeAssertion | t.TaggedTemplateExpression | t.TemplateLiteral | t.ThisExpression | t.TopicReference | t.TupleExpression | t.TypeCastExpression | t.UnaryExpression | t.UpdateExpression | t.YieldExpression;
|
|
10
10
|
export declare function injectTextCoercion(expr: t.Expression): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const dom = 0;
|
|
2
|
+
declare const let_ = 1;
|
|
3
|
+
export { let_ as let };
|
|
4
|
+
export declare const input = 2;
|
|
5
|
+
export declare const param = 3;
|
|
6
|
+
export declare const local = 4;
|
|
7
|
+
export declare const derived = 5;
|
|
8
|
+
export declare const constant = 6;
|
|
9
|
+
type Self = typeof import("./binding-type");
|
|
10
|
+
export type Value = Self[keyof Self];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const parse = "parse";
|
|
2
|
+
export declare const migrate = "migrate";
|
|
3
|
+
export declare const transform = "transform";
|
|
4
|
+
export declare const analyze = "analyze";
|
|
5
|
+
export declare const translate = "translate";
|
|
6
|
+
type Self = typeof import("./compile-stage");
|
|
7
|
+
export type Value = Self[keyof Self];
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const Comment = 0;
|
|
2
|
+
export declare const Dynamic = 1;
|
|
3
|
+
export declare const Placeholder = 2;
|
|
4
|
+
export declare const Tag = 3;
|
|
5
|
+
export declare const Text = 4;
|
|
6
|
+
type Self = typeof import("./content-type");
|
|
7
|
+
export type Value = Self[keyof Self];
|
|
8
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { types as t } from "@marko/compiler";
|
|
2
|
-
export default function isStatic(path: t.NodePath<any>): path is t.NodePath<t.
|
|
2
|
+
export default function isStatic(path: t.NodePath<any>): path is t.NodePath<t.ImportDeclaration> | t.NodePath<t.MarkoScriptlet> | t.NodePath<t.ExportDeclaration>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import type { AccessorPrefix } from "../../common/accessor.debug";
|
|
3
|
+
import * as BindingType from "./constants/binding-type";
|
|
3
4
|
import { type Many, type Opt, Sorted } from "./optional";
|
|
4
5
|
import { type Section } from "./sections";
|
|
5
6
|
import { type SerializeReason } from "./serialize-reasons";
|
|
@@ -8,15 +9,8 @@ export declare const kBranchSerializeReason: unique symbol;
|
|
|
8
9
|
export type Aliases = undefined | Binding | {
|
|
9
10
|
[property: string]: Aliases;
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let = 1,
|
|
14
|
-
input = 2,
|
|
15
|
-
param = 3,
|
|
16
|
-
local = 4,
|
|
17
|
-
derived = 5,
|
|
18
|
-
constant = 6
|
|
19
|
-
}
|
|
12
|
+
type BindingType = BindingType.Value;
|
|
13
|
+
export { BindingType };
|
|
20
14
|
export interface Sources {
|
|
21
15
|
state: Opt<Binding>;
|
|
22
16
|
param: Opt<InputBinding | ParamBinding>;
|
|
@@ -54,10 +48,10 @@ export interface Binding {
|
|
|
54
48
|
reserveSize: number;
|
|
55
49
|
}
|
|
56
50
|
export interface InputBinding extends Binding {
|
|
57
|
-
type: BindingType.input;
|
|
51
|
+
type: typeof BindingType.input;
|
|
58
52
|
}
|
|
59
53
|
export interface ParamBinding extends Binding {
|
|
60
|
-
type: BindingType.param;
|
|
54
|
+
type: typeof BindingType.param;
|
|
61
55
|
}
|
|
62
56
|
export type ReferencedBindings = Opt<Binding>;
|
|
63
57
|
export type Intersection = Many<Binding>;
|
|
@@ -180,4 +174,3 @@ export declare function isRegisteredFnExtra(extra: t.NodeExtra | undefined): ext
|
|
|
180
174
|
export declare function getCanonicalExtra<T extends t.NodeExtra>(extra: T): T;
|
|
181
175
|
export declare function getAllSerializeReasonsForExtra(extra: t.NodeExtra): undefined | SerializeReason;
|
|
182
176
|
export declare function getAllSerializeReasonsForBinding(binding: Binding, properties?: Opt<string> | true): undefined | SerializeReason;
|
|
183
|
-
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import type { AccessorPrefix } from "../../common/accessor.debug";
|
|
3
|
+
import * as ContentType from "./constants/content-type";
|
|
3
4
|
import { type Opt, Sorted } from "./optional";
|
|
4
5
|
import { type Binding, type InputBinding, type ParamBinding, type ReferencedBindings, type Sources } from "./references";
|
|
5
6
|
import { type SerializeReason } from "./serialize-reasons";
|
|
@@ -11,13 +12,8 @@ export type ParamSerializeReasonGroups = [
|
|
|
11
12
|
ParamSerializeReasonGroup,
|
|
12
13
|
...ParamSerializeReasonGroup[]
|
|
13
14
|
];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Dynamic = 1,
|
|
17
|
-
Placeholder = 2,
|
|
18
|
-
Tag = 3,
|
|
19
|
-
Text = 4
|
|
20
|
-
}
|
|
15
|
+
type ContentType = ContentType.Value;
|
|
16
|
+
export { ContentType };
|
|
21
17
|
export interface Section {
|
|
22
18
|
id: number;
|
|
23
19
|
name: string;
|
|
@@ -77,7 +73,7 @@ export declare const getSectionParentIsOwner: (section: Section) => boolean, set
|
|
|
77
73
|
export declare const getBranchRendererArgs: (section: Section) => [template?: t.Expression | undefined, walks?: t.Expression | undefined, setup?: t.Expression | undefined, params?: t.Expression | undefined], setBranchRendererArgs: (section: Section, value: [template?: t.Expression | undefined, walks?: t.Expression | undefined, setup?: t.Expression | undefined, params?: t.Expression | undefined]) => void;
|
|
78
74
|
export declare function forEachSection(fn: (section: Section) => void): void;
|
|
79
75
|
export declare function forEachSectionReverse(fn: (section: Section) => void): void;
|
|
80
|
-
export declare function getNodeContentType(path: t.NodePath<t.Statement>, extraMember: "startType" | "endType", contentInfo?: Section["content"]): ContentType | null;
|
|
76
|
+
export declare function getNodeContentType(path: t.NodePath<t.Statement>, extraMember: "startType" | "endType", contentInfo?: Section["content"]): ContentType.Value | null;
|
|
81
77
|
export declare function getSectionRegisterReasons(section: Section): false | SerializeReason;
|
|
82
78
|
export declare function isImmediateOwner(section: Section, binding: Binding): boolean;
|
|
83
79
|
export declare function isDirectClosure(section: Section, closure: Binding): boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import type { LoadImportConfig } from "../visitors/import-declaration";
|
|
3
|
+
import * as TagNameType from "./constants/tag-name-type";
|
|
3
4
|
declare module "@marko/compiler/dist/types" {
|
|
4
5
|
interface ProgramExtra {
|
|
5
6
|
featureType?: "class" | "tags";
|
|
@@ -13,10 +14,6 @@ declare module "@marko/compiler/dist/types" {
|
|
|
13
14
|
featureType?: ProgramExtra["featureType"];
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
DynamicTag = 2,
|
|
20
|
-
AttributeTag = 3
|
|
21
|
-
}
|
|
22
|
-
export default function analyzeTagNameType(tag: t.NodePath<t.MarkoTag>, allowDynamic?: boolean): TagNameType;
|
|
17
|
+
type TagNameType = TagNameType.Value;
|
|
18
|
+
export { TagNameType };
|
|
19
|
+
export default function analyzeTagNameType(tag: t.NodePath<t.MarkoTag>, allowDynamic?: boolean): TagNameType.Value;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import { WalkCode } from "../../common/types";
|
|
3
3
|
import { type Section } from "../util/sections";
|
|
4
|
+
import * as Step from "./constants/step";
|
|
4
5
|
type Walk = string | t.Expression | (() => undefined | string | t.Expression);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
type VisitCodes = WalkCode.Get | WalkCode.Replace | WalkCode.DynamicTagWithVar;
|
|
6
|
+
type Step = Step.Value;
|
|
7
|
+
export { Step };
|
|
8
|
+
type VisitCodes = typeof WalkCode.Get | typeof WalkCode.Replace | typeof WalkCode.DynamicTagWithVar;
|
|
10
9
|
export declare function enter(path: t.NodePath<any>): void;
|
|
11
10
|
export declare function exit(path: t.NodePath<any>): void;
|
|
12
11
|
export declare function enterShallow(path: t.NodePath<any>): void;
|
|
13
12
|
export declare function injectWalks(tag: t.NodePath<t.MarkoTag>, name: string, expr?: Walk): void;
|
|
14
13
|
export declare function visit(path: t.NodePath<t.MarkoTag | t.MarkoPlaceholder | t.Program>, code: VisitCodes): void;
|
|
15
14
|
export declare function getWalkString(section: Section): t.Expression | undefined;
|
|
16
|
-
export {};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import { type Binding } from "../util/references";
|
|
3
|
+
import * as SiblingText from "./constants/sibling-text";
|
|
3
4
|
declare const kNodeBinding: unique symbol;
|
|
4
5
|
declare const kSiblingText: unique symbol;
|
|
5
6
|
declare const kSharedText: unique symbol;
|
|
6
|
-
|
|
7
|
-
None = 0,
|
|
8
|
-
Before = 1,
|
|
9
|
-
After = 2,
|
|
10
|
-
NodeBefore = 3
|
|
11
|
-
}
|
|
7
|
+
type SiblingText = SiblingText.Value;
|
|
12
8
|
declare module "@marko/compiler/dist/types" {
|
|
13
9
|
interface MarkoPlaceholderExtra {
|
|
14
10
|
[kNodeBinding]?: Binding;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import { type Binding } from "../../util/references";
|
|
3
3
|
import { type Section } from "../../util/sections";
|
|
4
|
+
import * as ClassHydration from "./constants/class-hydration";
|
|
4
5
|
declare const kDOMBinding: unique symbol;
|
|
5
6
|
declare const kChildOffsetScopeBinding: unique symbol;
|
|
6
|
-
|
|
7
|
-
Self = "self",
|
|
8
|
-
Descendant = "descendant"
|
|
9
|
-
}
|
|
7
|
+
type ClassHydration = ClassHydration.Value;
|
|
10
8
|
declare module "@marko/compiler" {
|
|
11
9
|
interface MarkoMeta {
|
|
12
10
|
classHydration?: ClassHydration;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.21",
|
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -10,12 +10,24 @@
|
|
|
10
10
|
],
|
|
11
11
|
"homepage": "https://github.com/marko-js/marko",
|
|
12
12
|
"bugs": "https://github.com/marko-js/marko/issues",
|
|
13
|
+
"license": "MIT",
|
|
13
14
|
"repository": {
|
|
14
15
|
"type": "git",
|
|
15
16
|
"url": "git+https://github.com/marko-js/marko.git",
|
|
16
17
|
"directory": "packages/runtime-tags"
|
|
17
18
|
},
|
|
18
|
-
"
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"tags",
|
|
22
|
+
"index.d.ts",
|
|
23
|
+
"translator.js",
|
|
24
|
+
"tags-html.d.ts",
|
|
25
|
+
"!**/meta.*.json",
|
|
26
|
+
"!**/__tests__",
|
|
27
|
+
"!**/*.tsbuildinfo",
|
|
28
|
+
"cheatsheet.md"
|
|
29
|
+
],
|
|
30
|
+
"types": "index.d.ts",
|
|
19
31
|
"exports": {
|
|
20
32
|
".": {
|
|
21
33
|
"types": "./index.d.ts"
|
|
@@ -35,18 +47,6 @@
|
|
|
35
47
|
"default": "./dist/*.js"
|
|
36
48
|
}
|
|
37
49
|
},
|
|
38
|
-
"types": "index.d.ts",
|
|
39
|
-
"files": [
|
|
40
|
-
"dist",
|
|
41
|
-
"tags",
|
|
42
|
-
"index.d.ts",
|
|
43
|
-
"translator.js",
|
|
44
|
-
"tags-html.d.ts",
|
|
45
|
-
"!**/meta.*.json",
|
|
46
|
-
"!**/__tests__",
|
|
47
|
-
"!**/*.tsbuildinfo",
|
|
48
|
-
"cheatsheet.md"
|
|
49
|
-
],
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@marko/compiler": "^5.41.4",
|
|
52
52
|
"csstype": "^3.2.3",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"magic-string": "^0.30.21"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@marko/runtime-tags": "npm:marko@6.3.
|
|
57
|
+
"@marko/runtime-tags": "npm:marko@6.3.21",
|
|
58
58
|
"marko": "5.39.27"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|