@atscript/core 0.1.43 → 0.1.45
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 +4 -147
- package/dist/index.mjs +4 -147
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3333,14 +3333,14 @@ var AtscriptDoc = class {
|
|
|
3333
3333
|
if (argSpec?.type === "query" && args?.[i]?.queryNode) args[i].queryNode.registerAtDocument(this);
|
|
3334
3334
|
}
|
|
3335
3335
|
} else {
|
|
3336
|
-
let severity =
|
|
3336
|
+
let severity = 1;
|
|
3337
3337
|
switch (this.config.unknownAnnotation) {
|
|
3338
3338
|
case "warn": {
|
|
3339
3339
|
severity = 2;
|
|
3340
3340
|
break;
|
|
3341
3341
|
}
|
|
3342
|
-
case "
|
|
3343
|
-
severity =
|
|
3342
|
+
case "allow": {
|
|
3343
|
+
severity = 0;
|
|
3344
3344
|
break;
|
|
3345
3345
|
}
|
|
3346
3346
|
default:
|
|
@@ -4774,148 +4774,6 @@ const primitives = {
|
|
|
4774
4774
|
}
|
|
4775
4775
|
};
|
|
4776
4776
|
|
|
4777
|
-
//#endregion
|
|
4778
|
-
//#region packages/core/src/defaults/ui-annotations.ts
|
|
4779
|
-
const uiAnnotations = {
|
|
4780
|
-
placeholder: new AnnotationSpec({
|
|
4781
|
-
description: "Defines **placeholder text** for UI input fields.\n\n**Example:**\n```atscript\n@ui.placeholder \"Enter your name\"\nname: string\n```\n",
|
|
4782
|
-
nodeType: ["prop", "type"],
|
|
4783
|
-
argument: {
|
|
4784
|
-
name: "text",
|
|
4785
|
-
type: "string",
|
|
4786
|
-
description: "The placeholder text to display in UI input fields."
|
|
4787
|
-
}
|
|
4788
|
-
}),
|
|
4789
|
-
component: new AnnotationSpec({
|
|
4790
|
-
description: "Hints which **UI component** to use when rendering this field.\n\n**Example:**\n```atscript\n@ui.component \"select\"\ncountry: string\n```\n",
|
|
4791
|
-
nodeType: ["prop", "type"],
|
|
4792
|
-
argument: {
|
|
4793
|
-
name: "name",
|
|
4794
|
-
type: "string",
|
|
4795
|
-
description: "The component name or type to use for rendering."
|
|
4796
|
-
}
|
|
4797
|
-
}),
|
|
4798
|
-
hidden: new AnnotationSpec({
|
|
4799
|
-
description: "Hides this field or entity from **UI forms and tables** entirely.\n\n**Example:**\n```atscript\n@ui.hidden\ninternalId: string\n```\n",
|
|
4800
|
-
nodeType: [
|
|
4801
|
-
"prop",
|
|
4802
|
-
"type",
|
|
4803
|
-
"interface"
|
|
4804
|
-
]
|
|
4805
|
-
}),
|
|
4806
|
-
group: new AnnotationSpec({
|
|
4807
|
-
description: "Groups fields into **form sections**. Fields sharing the same group name are rendered together.\n\n**Example:**\n```atscript\n@ui.group \"personal\"\nfirstName: string\n\n@ui.group \"personal\"\nlastName: string\n\n@ui.group \"contact\"\nemail: string.email\n```\n",
|
|
4808
|
-
nodeType: ["prop"],
|
|
4809
|
-
argument: {
|
|
4810
|
-
name: "name",
|
|
4811
|
-
type: "string",
|
|
4812
|
-
description: "The section/group name to place this field in."
|
|
4813
|
-
}
|
|
4814
|
-
}),
|
|
4815
|
-
order: new AnnotationSpec({
|
|
4816
|
-
description: "Sets the **display order** of a field in auto-generated forms. Lower numbers appear first.\n\n**Example:**\n```atscript\n@ui.order 1\nname: string\n\n@ui.order 2\nemail: string.email\n```\n",
|
|
4817
|
-
nodeType: ["prop"],
|
|
4818
|
-
argument: {
|
|
4819
|
-
name: "order",
|
|
4820
|
-
type: "number",
|
|
4821
|
-
description: "Display order number. Lower values appear first."
|
|
4822
|
-
}
|
|
4823
|
-
}),
|
|
4824
|
-
width: new AnnotationSpec({
|
|
4825
|
-
description: "Provides a **layout width hint** for the field in auto-generated forms.\n\n**Example:**\n```atscript\n@ui.width \"half\"\nfirstName: string\n```\n",
|
|
4826
|
-
nodeType: ["prop", "type"],
|
|
4827
|
-
argument: {
|
|
4828
|
-
name: "width",
|
|
4829
|
-
type: "string",
|
|
4830
|
-
description: "Layout width hint (e.g., \"half\", \"full\", \"third\", \"quarter\")."
|
|
4831
|
-
}
|
|
4832
|
-
}),
|
|
4833
|
-
icon: new AnnotationSpec({
|
|
4834
|
-
description: "Provides an **icon hint** for the field or entity.\n\n**Example:**\n```atscript\n@ui.icon \"mail\"\nemail: string.email\n```\n",
|
|
4835
|
-
nodeType: [
|
|
4836
|
-
"prop",
|
|
4837
|
-
"type",
|
|
4838
|
-
"interface"
|
|
4839
|
-
],
|
|
4840
|
-
argument: {
|
|
4841
|
-
name: "name",
|
|
4842
|
-
type: "string",
|
|
4843
|
-
description: "Icon name or identifier."
|
|
4844
|
-
}
|
|
4845
|
-
}),
|
|
4846
|
-
hint: new AnnotationSpec({
|
|
4847
|
-
description: "Provides **help text or tooltip** displayed near the field in UI forms.\n\n**Example:**\n```atscript\n@ui.hint \"Must be a valid business email\"\nemail: string.email\n```\n",
|
|
4848
|
-
nodeType: ["prop", "type"],
|
|
4849
|
-
argument: {
|
|
4850
|
-
name: "text",
|
|
4851
|
-
type: "string",
|
|
4852
|
-
description: "Help text or tooltip content."
|
|
4853
|
-
}
|
|
4854
|
-
}),
|
|
4855
|
-
disabled: new AnnotationSpec({
|
|
4856
|
-
description: "Marks a field as **disabled** (rendered but non-interactive) in UI forms.\n\n**Example:**\n```atscript\n@ui.disabled\nreferralCode: string\n```\n",
|
|
4857
|
-
nodeType: ["prop", "type"]
|
|
4858
|
-
}),
|
|
4859
|
-
type: new AnnotationSpec({
|
|
4860
|
-
description: "Specifies the **input type** for the field in UI forms. Maps to HTML input types or framework-specific equivalents.\n\n**Example:**\n```atscript\n@ui.type \"textarea\"\nbio: string\n\n@ui.type \"password\"\nsecret: string\n```\n",
|
|
4861
|
-
nodeType: ["prop", "type"],
|
|
4862
|
-
argument: {
|
|
4863
|
-
name: "type",
|
|
4864
|
-
type: "string",
|
|
4865
|
-
description: "Input type (e.g., \"text\", \"textarea\", \"password\", \"number\", \"date\", \"color\", \"range\")."
|
|
4866
|
-
}
|
|
4867
|
-
}),
|
|
4868
|
-
attr: new AnnotationSpec({
|
|
4869
|
-
description: "Passes an arbitrary **HTML/component attribute** to the rendered field. Multiple `@ui.attr` annotations can be used on the same field.\n\n**Example:**\n```atscript\n@ui.attr \"rows\", \"5\"\n@ui.attr \"autocomplete\", \"off\"\nbio: string\n```\n",
|
|
4870
|
-
nodeType: [
|
|
4871
|
-
"prop",
|
|
4872
|
-
"type",
|
|
4873
|
-
"interface"
|
|
4874
|
-
],
|
|
4875
|
-
multiple: true,
|
|
4876
|
-
mergeStrategy: "append",
|
|
4877
|
-
argument: [{
|
|
4878
|
-
name: "key",
|
|
4879
|
-
type: "string",
|
|
4880
|
-
description: "Attribute name."
|
|
4881
|
-
}, {
|
|
4882
|
-
name: "value",
|
|
4883
|
-
type: "string",
|
|
4884
|
-
description: "Attribute value."
|
|
4885
|
-
}]
|
|
4886
|
-
}),
|
|
4887
|
-
class: new AnnotationSpec({
|
|
4888
|
-
description: "Adds **CSS class names** to the rendered field or entity. Multiple `@ui.class` annotations are appended.\n\n**Example:**\n```atscript\n@ui.class \"text-bold\"\n@ui.class \"mt-4\"\ntitle: string\n```\n",
|
|
4889
|
-
nodeType: [
|
|
4890
|
-
"prop",
|
|
4891
|
-
"type",
|
|
4892
|
-
"interface"
|
|
4893
|
-
],
|
|
4894
|
-
multiple: true,
|
|
4895
|
-
mergeStrategy: "append",
|
|
4896
|
-
argument: {
|
|
4897
|
-
name: "names",
|
|
4898
|
-
type: "string",
|
|
4899
|
-
description: "One or more CSS class names (space-separated)."
|
|
4900
|
-
}
|
|
4901
|
-
}),
|
|
4902
|
-
style: new AnnotationSpec({
|
|
4903
|
-
description: "Adds **inline CSS styles** to the rendered field or entity. Multiple `@ui.style` annotations are appended.\n\n**Example:**\n```atscript\n@ui.style \"color: red\"\n@ui.style \"font-weight: bold\"\nwarning: string\n```\n",
|
|
4904
|
-
nodeType: [
|
|
4905
|
-
"prop",
|
|
4906
|
-
"type",
|
|
4907
|
-
"interface"
|
|
4908
|
-
],
|
|
4909
|
-
multiple: true,
|
|
4910
|
-
mergeStrategy: "append",
|
|
4911
|
-
argument: {
|
|
4912
|
-
name: "css",
|
|
4913
|
-
type: "string",
|
|
4914
|
-
description: "CSS style declarations (semicolon-separated)."
|
|
4915
|
-
}
|
|
4916
|
-
})
|
|
4917
|
-
};
|
|
4918
|
-
|
|
4919
4777
|
//#endregion
|
|
4920
4778
|
//#region packages/core/src/default-atscript-config.ts
|
|
4921
4779
|
function getDefaultAtscriptConfig() {
|
|
@@ -4924,8 +4782,7 @@ function getDefaultAtscriptConfig() {
|
|
|
4924
4782
|
annotations: {
|
|
4925
4783
|
meta: { ...metaAnnotations },
|
|
4926
4784
|
expect: { ...expectAnnotations },
|
|
4927
|
-
emit: { ...emitAnnotations }
|
|
4928
|
-
ui: { ...uiAnnotations }
|
|
4785
|
+
emit: { ...emitAnnotations }
|
|
4929
4786
|
}
|
|
4930
4787
|
};
|
|
4931
4788
|
return defaulTAtscriptConfig;
|
package/dist/index.mjs
CHANGED
|
@@ -3309,14 +3309,14 @@ var AtscriptDoc = class {
|
|
|
3309
3309
|
if (argSpec?.type === "query" && args?.[i]?.queryNode) args[i].queryNode.registerAtDocument(this);
|
|
3310
3310
|
}
|
|
3311
3311
|
} else {
|
|
3312
|
-
let severity =
|
|
3312
|
+
let severity = 1;
|
|
3313
3313
|
switch (this.config.unknownAnnotation) {
|
|
3314
3314
|
case "warn": {
|
|
3315
3315
|
severity = 2;
|
|
3316
3316
|
break;
|
|
3317
3317
|
}
|
|
3318
|
-
case "
|
|
3319
|
-
severity =
|
|
3318
|
+
case "allow": {
|
|
3319
|
+
severity = 0;
|
|
3320
3320
|
break;
|
|
3321
3321
|
}
|
|
3322
3322
|
default:
|
|
@@ -4750,148 +4750,6 @@ const primitives = {
|
|
|
4750
4750
|
}
|
|
4751
4751
|
};
|
|
4752
4752
|
|
|
4753
|
-
//#endregion
|
|
4754
|
-
//#region packages/core/src/defaults/ui-annotations.ts
|
|
4755
|
-
const uiAnnotations = {
|
|
4756
|
-
placeholder: new AnnotationSpec({
|
|
4757
|
-
description: "Defines **placeholder text** for UI input fields.\n\n**Example:**\n```atscript\n@ui.placeholder \"Enter your name\"\nname: string\n```\n",
|
|
4758
|
-
nodeType: ["prop", "type"],
|
|
4759
|
-
argument: {
|
|
4760
|
-
name: "text",
|
|
4761
|
-
type: "string",
|
|
4762
|
-
description: "The placeholder text to display in UI input fields."
|
|
4763
|
-
}
|
|
4764
|
-
}),
|
|
4765
|
-
component: new AnnotationSpec({
|
|
4766
|
-
description: "Hints which **UI component** to use when rendering this field.\n\n**Example:**\n```atscript\n@ui.component \"select\"\ncountry: string\n```\n",
|
|
4767
|
-
nodeType: ["prop", "type"],
|
|
4768
|
-
argument: {
|
|
4769
|
-
name: "name",
|
|
4770
|
-
type: "string",
|
|
4771
|
-
description: "The component name or type to use for rendering."
|
|
4772
|
-
}
|
|
4773
|
-
}),
|
|
4774
|
-
hidden: new AnnotationSpec({
|
|
4775
|
-
description: "Hides this field or entity from **UI forms and tables** entirely.\n\n**Example:**\n```atscript\n@ui.hidden\ninternalId: string\n```\n",
|
|
4776
|
-
nodeType: [
|
|
4777
|
-
"prop",
|
|
4778
|
-
"type",
|
|
4779
|
-
"interface"
|
|
4780
|
-
]
|
|
4781
|
-
}),
|
|
4782
|
-
group: new AnnotationSpec({
|
|
4783
|
-
description: "Groups fields into **form sections**. Fields sharing the same group name are rendered together.\n\n**Example:**\n```atscript\n@ui.group \"personal\"\nfirstName: string\n\n@ui.group \"personal\"\nlastName: string\n\n@ui.group \"contact\"\nemail: string.email\n```\n",
|
|
4784
|
-
nodeType: ["prop"],
|
|
4785
|
-
argument: {
|
|
4786
|
-
name: "name",
|
|
4787
|
-
type: "string",
|
|
4788
|
-
description: "The section/group name to place this field in."
|
|
4789
|
-
}
|
|
4790
|
-
}),
|
|
4791
|
-
order: new AnnotationSpec({
|
|
4792
|
-
description: "Sets the **display order** of a field in auto-generated forms. Lower numbers appear first.\n\n**Example:**\n```atscript\n@ui.order 1\nname: string\n\n@ui.order 2\nemail: string.email\n```\n",
|
|
4793
|
-
nodeType: ["prop"],
|
|
4794
|
-
argument: {
|
|
4795
|
-
name: "order",
|
|
4796
|
-
type: "number",
|
|
4797
|
-
description: "Display order number. Lower values appear first."
|
|
4798
|
-
}
|
|
4799
|
-
}),
|
|
4800
|
-
width: new AnnotationSpec({
|
|
4801
|
-
description: "Provides a **layout width hint** for the field in auto-generated forms.\n\n**Example:**\n```atscript\n@ui.width \"half\"\nfirstName: string\n```\n",
|
|
4802
|
-
nodeType: ["prop", "type"],
|
|
4803
|
-
argument: {
|
|
4804
|
-
name: "width",
|
|
4805
|
-
type: "string",
|
|
4806
|
-
description: "Layout width hint (e.g., \"half\", \"full\", \"third\", \"quarter\")."
|
|
4807
|
-
}
|
|
4808
|
-
}),
|
|
4809
|
-
icon: new AnnotationSpec({
|
|
4810
|
-
description: "Provides an **icon hint** for the field or entity.\n\n**Example:**\n```atscript\n@ui.icon \"mail\"\nemail: string.email\n```\n",
|
|
4811
|
-
nodeType: [
|
|
4812
|
-
"prop",
|
|
4813
|
-
"type",
|
|
4814
|
-
"interface"
|
|
4815
|
-
],
|
|
4816
|
-
argument: {
|
|
4817
|
-
name: "name",
|
|
4818
|
-
type: "string",
|
|
4819
|
-
description: "Icon name or identifier."
|
|
4820
|
-
}
|
|
4821
|
-
}),
|
|
4822
|
-
hint: new AnnotationSpec({
|
|
4823
|
-
description: "Provides **help text or tooltip** displayed near the field in UI forms.\n\n**Example:**\n```atscript\n@ui.hint \"Must be a valid business email\"\nemail: string.email\n```\n",
|
|
4824
|
-
nodeType: ["prop", "type"],
|
|
4825
|
-
argument: {
|
|
4826
|
-
name: "text",
|
|
4827
|
-
type: "string",
|
|
4828
|
-
description: "Help text or tooltip content."
|
|
4829
|
-
}
|
|
4830
|
-
}),
|
|
4831
|
-
disabled: new AnnotationSpec({
|
|
4832
|
-
description: "Marks a field as **disabled** (rendered but non-interactive) in UI forms.\n\n**Example:**\n```atscript\n@ui.disabled\nreferralCode: string\n```\n",
|
|
4833
|
-
nodeType: ["prop", "type"]
|
|
4834
|
-
}),
|
|
4835
|
-
type: new AnnotationSpec({
|
|
4836
|
-
description: "Specifies the **input type** for the field in UI forms. Maps to HTML input types or framework-specific equivalents.\n\n**Example:**\n```atscript\n@ui.type \"textarea\"\nbio: string\n\n@ui.type \"password\"\nsecret: string\n```\n",
|
|
4837
|
-
nodeType: ["prop", "type"],
|
|
4838
|
-
argument: {
|
|
4839
|
-
name: "type",
|
|
4840
|
-
type: "string",
|
|
4841
|
-
description: "Input type (e.g., \"text\", \"textarea\", \"password\", \"number\", \"date\", \"color\", \"range\")."
|
|
4842
|
-
}
|
|
4843
|
-
}),
|
|
4844
|
-
attr: new AnnotationSpec({
|
|
4845
|
-
description: "Passes an arbitrary **HTML/component attribute** to the rendered field. Multiple `@ui.attr` annotations can be used on the same field.\n\n**Example:**\n```atscript\n@ui.attr \"rows\", \"5\"\n@ui.attr \"autocomplete\", \"off\"\nbio: string\n```\n",
|
|
4846
|
-
nodeType: [
|
|
4847
|
-
"prop",
|
|
4848
|
-
"type",
|
|
4849
|
-
"interface"
|
|
4850
|
-
],
|
|
4851
|
-
multiple: true,
|
|
4852
|
-
mergeStrategy: "append",
|
|
4853
|
-
argument: [{
|
|
4854
|
-
name: "key",
|
|
4855
|
-
type: "string",
|
|
4856
|
-
description: "Attribute name."
|
|
4857
|
-
}, {
|
|
4858
|
-
name: "value",
|
|
4859
|
-
type: "string",
|
|
4860
|
-
description: "Attribute value."
|
|
4861
|
-
}]
|
|
4862
|
-
}),
|
|
4863
|
-
class: new AnnotationSpec({
|
|
4864
|
-
description: "Adds **CSS class names** to the rendered field or entity. Multiple `@ui.class` annotations are appended.\n\n**Example:**\n```atscript\n@ui.class \"text-bold\"\n@ui.class \"mt-4\"\ntitle: string\n```\n",
|
|
4865
|
-
nodeType: [
|
|
4866
|
-
"prop",
|
|
4867
|
-
"type",
|
|
4868
|
-
"interface"
|
|
4869
|
-
],
|
|
4870
|
-
multiple: true,
|
|
4871
|
-
mergeStrategy: "append",
|
|
4872
|
-
argument: {
|
|
4873
|
-
name: "names",
|
|
4874
|
-
type: "string",
|
|
4875
|
-
description: "One or more CSS class names (space-separated)."
|
|
4876
|
-
}
|
|
4877
|
-
}),
|
|
4878
|
-
style: new AnnotationSpec({
|
|
4879
|
-
description: "Adds **inline CSS styles** to the rendered field or entity. Multiple `@ui.style` annotations are appended.\n\n**Example:**\n```atscript\n@ui.style \"color: red\"\n@ui.style \"font-weight: bold\"\nwarning: string\n```\n",
|
|
4880
|
-
nodeType: [
|
|
4881
|
-
"prop",
|
|
4882
|
-
"type",
|
|
4883
|
-
"interface"
|
|
4884
|
-
],
|
|
4885
|
-
multiple: true,
|
|
4886
|
-
mergeStrategy: "append",
|
|
4887
|
-
argument: {
|
|
4888
|
-
name: "css",
|
|
4889
|
-
type: "string",
|
|
4890
|
-
description: "CSS style declarations (semicolon-separated)."
|
|
4891
|
-
}
|
|
4892
|
-
})
|
|
4893
|
-
};
|
|
4894
|
-
|
|
4895
4753
|
//#endregion
|
|
4896
4754
|
//#region packages/core/src/default-atscript-config.ts
|
|
4897
4755
|
function getDefaultAtscriptConfig() {
|
|
@@ -4900,8 +4758,7 @@ function getDefaultAtscriptConfig() {
|
|
|
4900
4758
|
annotations: {
|
|
4901
4759
|
meta: { ...metaAnnotations },
|
|
4902
4760
|
expect: { ...expectAnnotations },
|
|
4903
|
-
emit: { ...emitAnnotations }
|
|
4904
|
-
ui: { ...uiAnnotations }
|
|
4761
|
+
emit: { ...emitAnnotations }
|
|
4905
4762
|
}
|
|
4906
4763
|
};
|
|
4907
4764
|
return defaulTAtscriptConfig;
|