@monimesl/dot-cli 0.1.0-alpha.14 → 0.1.0-alpha.16
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/cli.js +1 -1
- package/dist/{server-Dbrgkelo.js → server-uIyYmYnp.js} +7 -2
- package/dist/{server-Dbrgkelo.js.map → server-uIyYmYnp.js.map} +1 -1
- package/dist/templates/showcase/dot.ts +11 -0
- package/dist/templates/showcase/pages/device/controller.ts +25 -0
- package/dist/templates/showcase/pages/device/state.ts +9 -0
- package/dist/templates/showcase/pages/device/view.dml +20 -0
- package/dist/templates/showcase/pages/files/controller.ts +23 -1
- package/dist/templates/showcase/pages/files/state.ts +8 -0
- package/dist/templates/showcase/pages/files/view.dml +14 -0
- package/dist/templates/showcase/pages/index/state.ts +8 -2
- package/dist/templates/showcase/pages/navigation/state.ts +1 -1
- package/dist/templates/showcase/pages/styles/controller.ts +5 -0
- package/dist/templates/showcase/pages/styles/state.ts +3 -0
- package/dist/templates/showcase/pages/styles/view.dml +61 -0
- package/package.json +6 -6
package/dist/cli.js
CHANGED
|
@@ -816,7 +816,7 @@ async function main(argv) {
|
|
|
816
816
|
});
|
|
817
817
|
const [command, target, pagePath] = positionals;
|
|
818
818
|
if (command === "lsp" && !values.help) {
|
|
819
|
-
const { serveStdio } = await import("./server-
|
|
819
|
+
const { serveStdio } = await import("./server-uIyYmYnp.js");
|
|
820
820
|
serveStdio();
|
|
821
821
|
return new Promise(() => {});
|
|
822
822
|
}
|
|
@@ -6,7 +6,7 @@ import { existsSync } from "node:fs";
|
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
7
7
|
import { parseDmlToIR } from "@monimesl/dot-dml-parser";
|
|
8
8
|
import { ScriptParseError, parseExpression, parseLogicModule, parseStateModule } from "@monimesl/dot-script-parser";
|
|
9
|
-
import { SourceError, builtinRegistry, eventName, eventProp, isEventProp } from "@monimesl/dot-core";
|
|
9
|
+
import { SourceError, builtinRegistry, eventName, eventProp, isEventProp, isWordsOr, otherThanWords } from "@monimesl/dot-core";
|
|
10
10
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
11
11
|
import ts from "typescript";
|
|
12
12
|
//#region \0rolldown/runtime.js
|
|
@@ -10625,6 +10625,10 @@ function valueCompletions(element, attribute, page, scope, components) {
|
|
|
10625
10625
|
if (!component) return [];
|
|
10626
10626
|
if (isEventProp(attribute) && component.events.includes(eventName(attribute))) return handlerItems(page);
|
|
10627
10627
|
const type = component.props[attribute];
|
|
10628
|
+
if (type && isWordsOr(type)) return type.words.map((value) => ({
|
|
10629
|
+
label: value,
|
|
10630
|
+
kind: import_main.CompletionItemKind.EnumMember
|
|
10631
|
+
}));
|
|
10628
10632
|
if (Array.isArray(type)) return type.map((value) => ({
|
|
10629
10633
|
label: value,
|
|
10630
10634
|
kind: import_main.CompletionItemKind.EnumMember
|
|
@@ -10866,6 +10870,7 @@ function describeChildren(component) {
|
|
|
10866
10870
|
}
|
|
10867
10871
|
function describeType(type) {
|
|
10868
10872
|
if (typeof type === "string") return type;
|
|
10873
|
+
if (isWordsOr(type)) return `${describeType(type.words)} | ${otherThanWords(type)}`;
|
|
10869
10874
|
return type.map((value) => `"${value}"`).join(" | ");
|
|
10870
10875
|
}
|
|
10871
10876
|
function describeLoopVariable(variable, shape) {
|
|
@@ -11212,4 +11217,4 @@ function serveStdio() {
|
|
|
11212
11217
|
//#endregion
|
|
11213
11218
|
export { serveStdio };
|
|
11214
11219
|
|
|
11215
|
-
//# sourceMappingURL=server-
|
|
11220
|
+
//# sourceMappingURL=server-uIyYmYnp.js.map
|