openprompt-lang 0.3.0 → 0.4.0
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/README.md +483 -32
- package/bin/cli.js +232 -41
- package/bin/create.js +135 -0
- package/bin/lint.js +20 -21
- package/docs/COMMANDS.md +200 -127
- package/docs/COMMITS/INDEX.md +1 -0
- package/docs/PROMPT_AI_CONTEXT.md +99 -0
- package/docs/langs/dotnet.md +36 -0
- package/docs/langs/java-spring.md +45 -0
- package/docs/langs/python-fastapi.md +35 -0
- package/docs/langs/unity.md +30 -0
- package/docs/langs/vue-nuxt.md +36 -0
- package/package.json +31 -3
- package/scaffolds/.cursorrules +6 -0
- package/scaffolds/AGENTS.md +27 -0
- package/scaffolds/Dockerfile +11 -0
- package/scaffolds/capacitor.config.ts +17 -0
- package/scaffolds/netlify.toml +8 -0
- package/scaffolds/prompt-lang.json +15 -0
- package/scaffolds/railway.json +12 -0
- package/scaffolds/tailwind.config.js +8 -0
- package/scaffolds/tauri.conf.json +26 -0
- package/schemas/language-module.json +116 -0
- package/schemas/prompt-lang.json +38 -3
- package/schemas/structures.json +145 -0
- package/src/ai/prompt-builder.js +184 -0
- package/src/ai/providers.js +247 -0
- package/src/annotations/registry.js +39 -0
- package/src/annotations/tags.json +24 -0
- package/src/commands/ai-gen.js +161 -0
- package/src/commands/component.js +242 -212
- package/src/commands/context.js +184 -109
- package/src/commands/extract.js +242 -0
- package/src/commands/figma.js +15 -15
- package/src/commands/init.js +197 -93
- package/src/commands/integrate.js +406 -0
- package/src/commands/lang.js +148 -0
- package/src/commands/qa-gen.js +139 -0
- package/src/commands/scaffold.js +127 -0
- package/src/commands/suggest.js +24 -14
- package/src/commands/teach.js +110 -0
- package/src/commands/validate.js +143 -83
- package/src/commands/wizard.js +456 -0
- package/src/generators/figma-prompt.js +20 -12
- package/src/language-service/plugin.cjs +94 -0
- package/src/language-service/plugin.d.ts +6 -0
- package/src/mcp-server.js +605 -0
- package/src/templates/langs/react/INDEX.json +262 -0
- package/src/templates/langs/react/MODULE.json +166 -0
- package/src/templates/langs/react/templates/hooks/useAuth.template.ts +134 -0
- package/src/templates/langs/react/templates/hooks/useDebounce.template.ts +45 -0
- package/src/templates/langs/react/templates/hooks/useForm.template.ts +146 -0
- package/src/templates/langs/react/templates/hooks/usePagination.template.ts +108 -0
- package/src/templates/langs/react/templates/services/apiService.template.ts +123 -0
- package/src/templates/langs/react/templates/ui/Button.template.tsx +87 -0
- package/src/templates/langs/react/templates/ui/Card.template.tsx +85 -0
- package/src/templates/langs/react/templates/ui/DataTable.template.tsx +163 -0
- package/src/templates/langs/react/templates/ui/Input.template.tsx +96 -0
- package/src/templates/langs/react/templates/ui/Modal.template.tsx +133 -0
- package/src/templates/langs/react/templates/ui/Select.template.tsx +99 -0
- package/src/templates/langs/vue/INDEX.json +246 -0
- package/src/templates/langs/vue/MODULE.json +105 -0
- package/src/templates/langs/vue/templates/composables/useAuth.template.ts +106 -0
- package/src/templates/langs/vue/templates/composables/useDebounce.template.ts +47 -0
- package/src/templates/langs/vue/templates/composables/useFetch.template.ts +54 -0
- package/src/templates/langs/vue/templates/composables/useForm.template.ts +127 -0
- package/src/templates/langs/vue/templates/composables/usePagination.template.ts +98 -0
- package/src/templates/langs/vue/templates/services/apiService.template.ts +116 -0
- package/src/templates/langs/vue/templates/ui/Button.template.vue +79 -0
- package/src/templates/langs/vue/templates/ui/Card.template.vue +73 -0
- package/src/templates/langs/vue/templates/ui/DataTable.template.vue +115 -0
- package/src/templates/langs/vue/templates/ui/Input.template.vue +70 -0
- package/src/templates/langs/vue/templates/ui/Modal.template.vue +112 -0
- package/src/templates/langs/vue/templates/ui/Select.template.vue +77 -0
- package/src/templates/scripts/log-actividad.sh +32 -0
- package/src/templates/scripts/log-commit.sh +35 -0
- package/src/templates/scripts/log-error.sh +45 -0
- package/src/templates/scripts/validate.sh +23 -0
- package/src/ts-transformer/index.cjs +86 -0
- package/src/utils/ai.js +35 -53
- package/src/utils/annotations.js +260 -214
- package/src/utils/config.js +61 -13
- package/src/utils/error-learner.js +203 -0
- package/src/utils/file-utils.js +119 -0
- package/src/utils/language-loader.js +167 -0
- package/src/utils/template-utils.js +45 -0
- package/src/vite-plugin/index.js +54 -0
- package/vscode-extension/package.json +23 -2
- package/vscode-extension/snippets/promptlang.json +1 -3
- package/vscode-extension/syntaxes/annotations-code.tmGrammar.json +15 -0
|
@@ -25,7 +25,10 @@
|
|
|
25
25
|
"languages": [
|
|
26
26
|
{
|
|
27
27
|
"id": "promptlang",
|
|
28
|
-
"aliases": [
|
|
28
|
+
"aliases": [
|
|
29
|
+
"PromptLang",
|
|
30
|
+
"promptlang"
|
|
31
|
+
],
|
|
29
32
|
"configuration": "./language-configuration.json"
|
|
30
33
|
}
|
|
31
34
|
],
|
|
@@ -42,7 +45,25 @@
|
|
|
42
45
|
{
|
|
43
46
|
"scopeName": "markup.promptlang.comments",
|
|
44
47
|
"path": "./syntaxes/annotations.tmGrammar.json",
|
|
45
|
-
"injectTo": [
|
|
48
|
+
"injectTo": [
|
|
49
|
+
"source.ts",
|
|
50
|
+
"source.tsx",
|
|
51
|
+
"source.js",
|
|
52
|
+
"source.jsx"
|
|
53
|
+
],
|
|
54
|
+
"embeddedLanguages": {
|
|
55
|
+
"meta.annotation.promptlang": "promptlang"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"scopeName": "markup.promptlang.code",
|
|
60
|
+
"path": "./syntaxes/annotations-code.tmGrammar.json",
|
|
61
|
+
"injectTo": [
|
|
62
|
+
"source.ts",
|
|
63
|
+
"source.tsx",
|
|
64
|
+
"source.js",
|
|
65
|
+
"source.jsx"
|
|
66
|
+
],
|
|
46
67
|
"embeddedLanguages": {
|
|
47
68
|
"meta.annotation.promptlang": "promptlang"
|
|
48
69
|
}
|
|
@@ -90,9 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
"PromptLang: Add @use header": {
|
|
92
92
|
"prefix": "@use-header",
|
|
93
|
-
"body": [
|
|
94
|
-
"// @use(kind${1:, contract, props, state, limit, deps, compose, platform, scope})"
|
|
95
|
-
],
|
|
93
|
+
"body": ["// @use(kind${1:, contract, props, state, limit, deps, compose, platform, scope})"],
|
|
96
94
|
"description": "Add @use declaration header"
|
|
97
95
|
},
|
|
98
96
|
"PromptLang: Add @props with TS syntax": {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
3
|
+
"name": "PromptLang Annotations (Code Mode)",
|
|
4
|
+
"scopeName": "markup.promptlang.code",
|
|
5
|
+
"injectionSelector": "L:source.ts -comment, L:source.tsx -comment, L:source.js -comment, L:source.jsx -comment",
|
|
6
|
+
"patterns": [
|
|
7
|
+
{
|
|
8
|
+
"name": "meta.annotation.promptlang.code",
|
|
9
|
+
"match": "^\\s*(@use|@kind|@contract|@props|@state|@limit|@compose|@deps|@platform|@scope|@test|@meta|@forbidden|@pattern|@error)\\(",
|
|
10
|
+
"captures": {
|
|
11
|
+
"1": { "name": "entity.name.tag.promptlang" }
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|