Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5eb215df9 |
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"monorepoCommit": "810617559b0ee9c662c4b566e16cb3629b44fbce",
|
||||
"sourcePath": "quixos-instance/packages/todo-react-runtime"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"messages": {
|
||||
"org.quixos.web-studio.ReactProps": {
|
||||
"module": "@quixos/camino-package-runtime",
|
||||
"export": "opaqueReactPropsBinding"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
# Generated by qx-scaffold-v1
|
||||
package_id: "package:todo-react-runtime"
|
||||
package_revision_id: "package:todo-react-runtime@1"
|
||||
runtime_protocol_version: "quixos-capabilities-v1"
|
||||
exports: { export_id: "export:todo-react-runtime:create-component" runtime_symbol: "createComponent" }
|
||||
exports: { export_id: "export:todo-react-runtime:source-get" runtime_symbol: "source.get" }
|
||||
exports: { export_id: "export:todo-react-runtime:props-get" runtime_symbol: "props.get" }
|
||||
exports: { export_id: "export:todo-react-runtime:props-watch" runtime_symbol: "props.watch" }
|
||||
exports: { export_id: "export:todo-react-runtime:props-watch-stop" runtime_symbol: "props.watchStop" }
|
||||
exports: { export_id: "export:todo-react-runtime:source-get" runtime_symbol: "sourceGet" }
|
||||
exports: { export_id: "export:todo-react-runtime:props-get" runtime_symbol: "propsGet" }
|
||||
exports: { export_id: "export:todo-react-runtime:props-watch" runtime_symbol: "propsWatch" }
|
||||
exports: { export_id: "export:todo-react-runtime:props-watch-stop" runtime_symbol: "propsWatchStop" }
|
||||
|
||||
Generated
+7
-7
@@ -37,17 +37,17 @@
|
||||
"quixosNixHelpers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1788543053,
|
||||
"narHash": "sha256-3YReATWEVxZinYVi/l3cwOz+oFoZUrwj24kUBQTmUpQ=",
|
||||
"ref": "refs/tags/quixos-reachability/56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a",
|
||||
"rev": "56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a",
|
||||
"revCount": 8,
|
||||
"lastModified": 1789364768,
|
||||
"narHash": "sha256-6tINqOSLd3TTACk/HAfhXqo07H69yjX3Q/DrrAPWzus=",
|
||||
"ref": "refs/tags/quixos-reachability/cf7945abb6ee2533a34dff4a7d4a956e70efe007",
|
||||
"rev": "cf7945abb6ee2533a34dff4a7d4a956e70efe007",
|
||||
"revCount": 22,
|
||||
"type": "git",
|
||||
"url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git"
|
||||
},
|
||||
"original": {
|
||||
"ref": "refs/tags/quixos-reachability/56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a",
|
||||
"rev": "56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a",
|
||||
"ref": "refs/tags/quixos-reachability/cf7945abb6ee2533a34dff4a7d4a956e70efe007",
|
||||
"rev": "cf7945abb6ee2533a34dff4a7d4a956e70efe007",
|
||||
"type": "git",
|
||||
"url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git"
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
quixosNixHelpers = {
|
||||
url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git?ref=refs/tags/quixos-reachability/56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a&rev=56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a";
|
||||
url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git?ref=refs/tags/quixos-reachability/cf7945abb6ee2533a34dff4a7d4a956e70efe007&rev=cf7945abb6ee2533a34dff4a7d4a956e70efe007";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
@@ -18,6 +18,8 @@
|
||||
quixosHelpers.mkCaminoTsYarnNixifyFlake {
|
||||
inherit inputs nixpkgs flake-utils;
|
||||
packageRoot = ./.;
|
||||
migrationEntrypoint = "dist/migrate.js";
|
||||
bindingOptions = builtins.fromJSON (builtins.readFile ./bindings.json);
|
||||
promptName = "todo-react-runtime";
|
||||
bundle = {
|
||||
entry = "dist/server.js";
|
||||
|
||||
+3
-1
@@ -12,11 +12,13 @@
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@quixos/camino-package-runtime": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=a998690446ecf647e3af78e369492c1a3663b66d"
|
||||
"@quixos/camino-package-runtime": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24",
|
||||
"@types/react": "^18.3.12",
|
||||
"esbuild": "^0.25.12",
|
||||
"react": "^18.3.1",
|
||||
"typescript": "^7.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"backend": "typescript",
|
||||
"bindingOutput": "src/gen/qx.ts",
|
||||
"options": {
|
||||
"messages": {
|
||||
"org.quixos.web-studio.ReactProps": {
|
||||
"module": "@quixos/camino-package-runtime",
|
||||
"export": "opaqueReactPropsBinding"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
quixos-lock version 1 {
|
||||
quixos source {
|
||||
repository "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos.git";
|
||||
commit "9c3ab572ecfbc83785038c3d9f174516df15d63f";
|
||||
commit "810617559b0ee9c662c4b566e16cb3629b44fbce";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"generatedBy": "qx-scaffold-v1",
|
||||
"schemaVersion": 1,
|
||||
"contracts": {},
|
||||
"migrations": []
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"generatedBy": "qx-scaffold-v1",
|
||||
"resources": []
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"generatedBy": "qx-scaffold-v1",
|
||||
"name": "TodoReactRuntime",
|
||||
"id": "package:todo-react-runtime",
|
||||
"revision": "package:todo-react-runtime@1",
|
||||
"exports": [
|
||||
{
|
||||
"name": "createComponent",
|
||||
"id": "export:todo-react-runtime:create-component",
|
||||
"file": "src/impl/createComponent.ts"
|
||||
},
|
||||
{
|
||||
"name": "sourceGet",
|
||||
"id": "export:todo-react-runtime:source-get",
|
||||
"file": "src/impl/sourceGet.ts"
|
||||
},
|
||||
{
|
||||
"name": "propsGet",
|
||||
"id": "export:todo-react-runtime:props-get",
|
||||
"file": "src/impl/propsGet.ts"
|
||||
},
|
||||
{
|
||||
"name": "propsWatch",
|
||||
"id": "export:todo-react-runtime:props-watch",
|
||||
"file": "src/impl/propsWatch.ts"
|
||||
},
|
||||
{
|
||||
"name": "propsWatchStop",
|
||||
"id": "export:todo-react-runtime:props-watch-stop",
|
||||
"file": "src/impl/propsWatchStop.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"generatedBy": "qx-scaffold-v1",
|
||||
"nixifyPluginUrl": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/yarn-plugin-nixify-patched/raw/commit/4528fdd20b30d869262443b3f044549810e75fb8/dist/yarn-plugin-nixify.js"
|
||||
}
|
||||
+232
@@ -0,0 +1,232 @@
|
||||
// Generated by quixos-codegen-ts. Do not edit. Binding ABI version 1.
|
||||
import { bindQxHandler, type BindingValue, type QxObjectRef, type QxWatchHandle, type QxHandler, type QxDerived, type QxContextLifecycle, type QxLiveValue, type RelationshipCollection, type QxHandlerSpec, type QxMessages } from "@quixos/camino-package-runtime";
|
||||
import { opaqueReactPropsBinding as message0 } from "@quixos/camino-package-runtime";
|
||||
export const packageRevisionId = "package:todo-react-runtime@1";
|
||||
export type Contexts = { "createComponent": { "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": QxObjectRef<"atom:atom:task">; "ports": { } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": QxObjectRef<"atom:atom:task">; "ports": { } } & {signal?: AbortSignal}>; "propsGet": { "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { "subject": { "resolve": () => Promise<Array<QxObjectRef<"atom:atom:task">>>; "collection": () => Promise<RelationshipCollection<QxObjectRef<"atom:atom:task">>> }; "title": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "status": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "priority": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "notes": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "dueDate": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "energy": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> } } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { "subject": { "resolve": () => Promise<Array<QxObjectRef<"atom:atom:task">>>; "collection": () => Promise<RelationshipCollection<QxObjectRef<"atom:atom:task">>> }; "title": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "status": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "priority": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "notes": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "dueDate": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "energy": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> } } } & {signal?: AbortSignal}>; "propsWatch": { "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { "subject": { "resolve": () => Promise<Array<QxObjectRef<"atom:atom:task">>>; "collection": () => Promise<RelationshipCollection<QxObjectRef<"atom:atom:task">>> }; "title": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "status": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "priority": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "notes": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "dueDate": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "energy": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> } } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { "subject": { "resolve": () => Promise<Array<QxObjectRef<"atom:atom:task">>>; "collection": () => Promise<RelationshipCollection<QxObjectRef<"atom:atom:task">>> }; "title": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "status": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "priority": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "notes": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "dueDate": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> }; "energy": { "get": () => Promise<string>; "live": () => Promise<QxLiveValue> } } } & {signal?: AbortSignal}>; "propsWatchStop": { "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": QxWatchHandle; "ports": { } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": QxWatchHandle; "ports": { } } & {signal?: AbortSignal}>; "sourceGet": { "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { } } & QxContextLifecycle<{ "objectId": QxObjectRef<"atom:atom:task-react-component">; "input": null; "ports": { } } & {signal?: AbortSignal}> };
|
||||
export type Implementation = { "createComponent": QxHandler<Contexts["createComponent"], QxObjectRef<"atom:atom:task-react-component">>; "propsGet": QxHandler<Contexts["propsGet"], BindingValue<typeof message0>> | QxDerived<Contexts["propsGet"], BindingValue<typeof message0>>; "propsWatch": QxDerived<Contexts["propsWatch"], BindingValue<typeof message0>>; "propsWatchStop": QxHandler<Contexts["propsWatchStop"], null>; "sourceGet": QxHandler<Contexts["sourceGet"], string> | QxDerived<Contexts["sourceGet"], string> };
|
||||
const messages = { "org.quixos.web-studio.ReactProps": message0 } satisfies QxMessages;
|
||||
const specs = {
|
||||
"createComponent": {
|
||||
"inputType": {
|
||||
"kind": "object-ref",
|
||||
"expectation": {
|
||||
"kind": "atom",
|
||||
"atomId": "atom:task"
|
||||
}
|
||||
},
|
||||
"outputType": {
|
||||
"kind": "object-ref",
|
||||
"expectation": {
|
||||
"kind": "atom",
|
||||
"atomId": "atom:task-react-component"
|
||||
}
|
||||
},
|
||||
"ports": {}
|
||||
},
|
||||
"propsGet": {
|
||||
"inputType": {
|
||||
"kind": "builtin",
|
||||
"name": "unit"
|
||||
},
|
||||
"outputType": {
|
||||
"kind": "message",
|
||||
"descriptorId": "org.quixos.web-studio.ReactProps"
|
||||
},
|
||||
"ports": {
|
||||
"subject": {
|
||||
"kind": "edge",
|
||||
"id": "port:todo-react:subject",
|
||||
"primitives": [
|
||||
"resolve"
|
||||
]
|
||||
},
|
||||
"title": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:title"
|
||||
},
|
||||
"status": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:status"
|
||||
},
|
||||
"priority": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:priority"
|
||||
},
|
||||
"notes": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:notes"
|
||||
},
|
||||
"dueDate": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:due-date"
|
||||
},
|
||||
"energy": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:energy"
|
||||
}
|
||||
}
|
||||
},
|
||||
"propsWatch": {
|
||||
"inputType": {
|
||||
"kind": "builtin",
|
||||
"name": "unit"
|
||||
},
|
||||
"outputType": {
|
||||
"kind": "builtin",
|
||||
"name": "watch-handle"
|
||||
},
|
||||
"eventType": {
|
||||
"kind": "message",
|
||||
"descriptorId": "org.quixos.web-studio.ReactProps"
|
||||
},
|
||||
"ports": {
|
||||
"subject": {
|
||||
"kind": "edge",
|
||||
"id": "port:todo-react:subject",
|
||||
"primitives": [
|
||||
"resolve"
|
||||
]
|
||||
},
|
||||
"title": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:title"
|
||||
},
|
||||
"status": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:status"
|
||||
},
|
||||
"priority": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:priority"
|
||||
},
|
||||
"notes": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:notes"
|
||||
},
|
||||
"dueDate": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:due-date"
|
||||
},
|
||||
"energy": {
|
||||
"kind": "state",
|
||||
"valueType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"primitives": [
|
||||
"read"
|
||||
],
|
||||
"id": "port:todo-react:energy"
|
||||
}
|
||||
}
|
||||
},
|
||||
"propsWatchStop": {
|
||||
"inputType": {
|
||||
"kind": "builtin",
|
||||
"name": "watch-handle"
|
||||
},
|
||||
"outputType": {
|
||||
"kind": "builtin",
|
||||
"name": "unit"
|
||||
},
|
||||
"ports": {}
|
||||
},
|
||||
"sourceGet": {
|
||||
"inputType": {
|
||||
"kind": "builtin",
|
||||
"name": "unit"
|
||||
},
|
||||
"outputType": {
|
||||
"kind": "scalar",
|
||||
"name": "string"
|
||||
},
|
||||
"ports": {}
|
||||
}
|
||||
} satisfies Record<string, QxHandlerSpec>;
|
||||
export const createRuntime = (implementation: Implementation) => ({
|
||||
packageRevisionId,
|
||||
exports: {
|
||||
"export:todo-react-runtime:create-component": bindQxHandler(specs["createComponent"], implementation["createComponent"], messages),
|
||||
"export:todo-react-runtime:props-get": bindQxHandler(specs["propsGet"], implementation["propsGet"], messages),
|
||||
"export:todo-react-runtime:props-watch": bindQxHandler(specs["propsWatch"], implementation["propsWatch"], messages),
|
||||
"export:todo-react-runtime:props-watch-stop": bindQxHandler(specs["propsWatchStop"], implementation["propsWatchStop"], messages),
|
||||
"export:todo-react-runtime:source-get": bindQxHandler(specs["sourceGet"], implementation["sourceGet"], messages),
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
// This adapter keeps the implementation file hand-authored.
|
||||
export {createComponent as handler} from "../todo-react.impl.js";
|
||||
@@ -0,0 +1,2 @@
|
||||
// This adapter keeps the implementation file hand-authored.
|
||||
export {props as handler} from "../todo-react.impl.js";
|
||||
@@ -0,0 +1,2 @@
|
||||
// This adapter keeps the implementation file hand-authored.
|
||||
export {props as handler} from "../todo-react.impl.js";
|
||||
@@ -0,0 +1,2 @@
|
||||
// This adapter keeps the implementation file hand-authored.
|
||||
export {stopWatch as handler} from "../todo-react.impl.js";
|
||||
@@ -0,0 +1,2 @@
|
||||
// This adapter keeps the implementation file hand-authored.
|
||||
export {source as handler} from "../todo-react.impl.js";
|
||||
@@ -0,0 +1,3 @@
|
||||
// Generated by qx-scaffold-v1
|
||||
import {serveMigration} from "@quixos/camino-package-runtime";
|
||||
await serveMigration({});
|
||||
+15
-13
@@ -1,13 +1,15 @@
|
||||
import { servePackageRuntime } from "@quixos/camino-package-runtime";
|
||||
import { createComponent, props, source, stopWatch } from "./todo-react.impl.js";
|
||||
|
||||
servePackageRuntime({
|
||||
packageRevisionId: "package:todo-react-runtime@1",
|
||||
exports: {
|
||||
"export:todo-react-runtime:create-component": createComponent,
|
||||
"export:todo-react-runtime:source-get": source,
|
||||
"export:todo-react-runtime:props-get": props,
|
||||
"export:todo-react-runtime:props-watch": props,
|
||||
"export:todo-react-runtime:props-watch-stop": stopWatch,
|
||||
},
|
||||
});
|
||||
// Generated by qx-scaffold-v1
|
||||
import {servePackageRuntime} from "@quixos/camino-package-runtime";
|
||||
import {createRuntime} from "./gen/qx.js";
|
||||
import {handler as impl0} from "./impl/createComponent.js";
|
||||
import {handler as impl1} from "./impl/sourceGet.js";
|
||||
import {handler as impl2} from "./impl/propsGet.js";
|
||||
import {handler as impl3} from "./impl/propsWatch.js";
|
||||
import {handler as impl4} from "./impl/propsWatchStop.js";
|
||||
servePackageRuntime(createRuntime({
|
||||
"createComponent": impl0,
|
||||
"sourceGet": impl1,
|
||||
"propsGet": impl2,
|
||||
"propsWatch": impl3,
|
||||
"propsWatchStop": impl4,
|
||||
}));
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
h,
|
||||
useLiveField,
|
||||
type LiveFieldProp,
|
||||
type ReactComponentImplementationProps,
|
||||
@@ -20,22 +19,6 @@ type TodoReactComponentCaminoProps = {
|
||||
display_label: string;
|
||||
};
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
div: Record<string, unknown>;
|
||||
button: Record<string, unknown>;
|
||||
input: Record<string, unknown>;
|
||||
label: Record<string, unknown>;
|
||||
option: Record<string, unknown>;
|
||||
select: Record<string, unknown>;
|
||||
span: Record<string, unknown>;
|
||||
strong: Record<string, unknown>;
|
||||
textarea: Record<string, unknown>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const palette = {
|
||||
ink: "#28362d",
|
||||
muted: "#6f776e",
|
||||
|
||||
+17
-45
@@ -1,52 +1,24 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { derived, type RuntimeContext } from "@quixos/camino-package-runtime";
|
||||
import type { Contexts } from "./gen/qx.js";
|
||||
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const componentSourcePath = path.join(dirname, "todo-component.mjs");
|
||||
|
||||
export const source = async () => await fs.readFile(componentSourcePath, "utf8");
|
||||
|
||||
export const createComponent = (context: RuntimeContext) => context.objectId;
|
||||
|
||||
export const props = derived(async (context: RuntimeContext) => {
|
||||
const tasks = await context.edge("port:todo-react:subject").resolve();
|
||||
if (tasks.length !== 1) {
|
||||
throw new Error(`Task component ${context.objectId} has ${tasks.length} subjects`);
|
||||
}
|
||||
const titlePort = context.state<string>("port:todo-react:title");
|
||||
const statusPort = context.state<string>("port:todo-react:status");
|
||||
const priorityPort = context.state<string>("port:todo-react:priority");
|
||||
const notesPort = context.state<string>("port:todo-react:notes");
|
||||
const dueDatePort = context.state<string>("port:todo-react:due-date");
|
||||
const energyPort = context.state<string>("port:todo-react:energy");
|
||||
const [title, status, priority, titleLive, statusLive, priorityLive, notesLive, dueDateLive, energyLive] =
|
||||
await Promise.all([
|
||||
titlePort.get(),
|
||||
statusPort.get(),
|
||||
priorityPort.get(),
|
||||
titlePort.live(),
|
||||
statusPort.live(),
|
||||
priorityPort.live(),
|
||||
notesPort.live(),
|
||||
dueDatePort.live(),
|
||||
energyPort.live(),
|
||||
]);
|
||||
const priorityText = priority && priority !== "NORMAL"
|
||||
? ` ${priority.toLowerCase()}`
|
||||
: "";
|
||||
const componentSourcePath = path.join(path.dirname(fileURLToPath(import.meta.url)), "todo-component.mjs");
|
||||
export const source = () => fs.readFile(componentSourcePath, "utf8");
|
||||
export const createComponent = ({ objectId }: Contexts["createComponent"]) => objectId;
|
||||
export const props = { kind: "derived" as const, get: async ({ objectId, ports }: Contexts["propsGet"]): Promise<Record<string, unknown>> => {
|
||||
const tasks = await ports.subject.resolve();
|
||||
if (tasks.length !== 1) throw new Error(`Task component has ${tasks.length} subjects`);
|
||||
const [title, status, priority, titleLive, statusLive, priorityLive, notesLive, dueDateLive, energyLive] = await Promise.all([
|
||||
ports.title.get(), ports.status.get(), ports.priority.get(),
|
||||
ports.title.live(), ports.status.live(), ports.priority.live(),
|
||||
ports.notes.live(), ports.dueDate.live(), ports.energy.live(),
|
||||
]);
|
||||
const priorityText = priority && priority !== "NORMAL" ? ` ${priority.toLowerCase()}` : "";
|
||||
return {
|
||||
task_id: tasks[0],
|
||||
component_id: context.objectId,
|
||||
title: titleLive,
|
||||
status: statusLive,
|
||||
priority: priorityLive,
|
||||
notes: notesLive,
|
||||
due_date: dueDateLive,
|
||||
energy: energyLive,
|
||||
display_label: `[${status ?? "OPEN"}]${priorityText} ${title ?? "Untitled task"}`,
|
||||
task_id: tasks[0], component_id: objectId, title: titleLive, status: statusLive,
|
||||
priority: priorityLive, notes: notesLive, due_date: dueDateLive, energy: energyLive,
|
||||
display_label: `[${status || "OPEN"}]${priorityText} ${title || "Untitled task"}`,
|
||||
};
|
||||
});
|
||||
|
||||
}};
|
||||
export const stopWatch = () => null;
|
||||
|
||||
+8
-4
@@ -9,11 +9,15 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"preserveSymlinks": true,
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node"],
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"jsx": "react",
|
||||
"jsxFactory": "h"
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx"
|
||||
]
|
||||
}
|
||||
|
||||
+7
-1
@@ -161,11 +161,17 @@ cacheEntries = {
|
||||
"@connectrpc/connect@npm:2.1.2" = { filename = "@connectrpc-connect-npm-2.1.2-ab34825de3-4e15000890.zip"; hash = "sha512-ThUACJAjt1Lv1E+pQKWuHh+gDhvrxLoM7ScruTWSDYw7hbd0UOZErUQruMqaJ1sMFxNviWuo7/A2F4Ex2wHWFQ=="; };
|
||||
"@esbuild/linux-arm64@npm:0.25.12" = { filename = "@esbuild-linux-arm64-npm-0.25.12-a5aaa0e70e-10c0.zip"; hash = "sha512-tm9zhnNR4GZv4A+Sgbt9jdCJ0iGlzvYxGCaxaScbhFH14mX7QWJRYaCvFCZB1dseApmaq6mNwbilL0wJnbB8tw=="; };
|
||||
"@esbuild/linux-x64@npm:0.25.12" = { filename = "@esbuild-linux-x64-npm-0.25.12-07c7c22cce-10c0.zip"; hash = "sha512-U2QGT8ZIZN8q2WPSFDC32+sZGKgp49gvnHzIf/vKVR4xIzjcgBbjAIKI+FqfGBmGBWu8eCpS7lR9JDXdUHOFkw=="; };
|
||||
"@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=a998690446ecf647e3af78e369492c1a3663b66d" = { filename = "@quixos-camino-package-runtime-https-683bcbf33c-c90d5d5c53.zip"; hash = "sha512-yQ1dXFMR2k+xbkka2rrhsAcrQFZlJAZEYM0hqwGzdV5RJ+fhQEh3BEgoPiL2yxrxulU4zg/jsj8BTBFRp1feyg=="; };
|
||||
"@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0" = { filename = "@quixos-camino-package-runtime-https-5a5a438f14-75b1ffcea9.zip"; hash = "sha512-dbH/zqm6gwFck1pSrJAEXNUl6wfHpOL+jj4IwdHCyf5VOMKInCLr73Yx9NYUvqn3zw3AOfdm/8bUeTz2Htxo/A=="; };
|
||||
"@types/node@npm:24.13.3" = { filename = "@types-node-npm-24.13.3-b512a0bbeb-a5bc08f49b.zip"; hash = "sha512-pbwI9JuVgdzcqQ4CzXcZejx5mECAdmSULlzVFhpVPU0q6AZPfjKUQQ10jX0Ji1wYSL5/pQwG8pxBk6sWvk5Z6w=="; };
|
||||
"@types/prop-types@npm:15.7.15" = { filename = "@types-prop-types-npm-15.7.15-cefe16a1fa-b59aad1ad1.zip"; hash = "sha512-tZqtGtGb8XM89ST9TmGBlsbHaQ9I7nCjJ+tFCkKquOigY/vlnKClcBrr4tktWCKSwPuEXqV0dPahX2mUsOJgsg=="; };
|
||||
"@types/react@npm:18.3.31" = { filename = "@types-react-npm-18.3.31-d376eb19a5-44180549dd.zip"; hash = "sha512-RBgFSd0EX1Nuzs0545qs34KOdq3BxKkLEy9FPiPMNwxGSNkQKuQBFy69j9ixl3qQGjniFOU+x3FxsnUUtYjBeQ=="; };
|
||||
"@typescript/typescript-linux-arm64@npm:7.0.2" = { filename = "@typescript-typescript-linux-arm64-npm-7.0.2-9cacfc53a0-10c0.zip"; hash = "sha512-s4c7nGT/lQIw6x0IfrL0b3ECy/D0g7UoDLdiIWJoM6EGXk5N/dmXdxUdA8Cr3hV/3nO2BYKTQ6Ai8/zGhiSQ3A=="; };
|
||||
"@typescript/typescript-linux-x64@npm:7.0.2" = { filename = "@typescript-typescript-linux-x64-npm-7.0.2-8dd7ff8d24-10c0.zip"; hash = "sha512-k9EUK5CZ3OOPnyslp8SAAonHJpnpPmlaulppI/NmFyCzNs3UN/TLPUkyQia3KIxgbyTzKoXI5L5fl8Uj9bJ7Cg=="; };
|
||||
"csstype@npm:3.2.3" = { filename = "csstype-npm-3.2.3-741053244e-cd29c51e70.zip"; hash = "sha512-zSnFHnD6gi8c7NhkGhRFvtcGNpdGnTVjO1FuYP6MG94EsI9sW2AiE2u2abZMY9QXOvVIZFEPu07iMoGAGEGjzg=="; };
|
||||
"esbuild@npm:0.25.12" = { filename = "esbuild-npm-0.25.12-352393c4bd-c205357531.zip"; hash = "sha512-wgU1dTFCMiCp3o4ebGUUJCvJsWZudizWfM34/f3D8dC9dvjZODlYuXrUyVPv23tujB+cpZUc0rfFI16HVbNKaw=="; };
|
||||
"js-tokens@npm:4.0.0" = { filename = "js-tokens-npm-4.0.0-0ac852e9e2-e248708d37.zip"; hash = "sha512-4khwjTd6oFjqzyA3sH3thHeQ5t6JK7rT2sCrui51nLnxIbAAmaZRlWFrrctuyo0U2XXLPonrHP2mRHVkAsiu7Q=="; };
|
||||
"loose-envify@npm:1.4.0" = { filename = "loose-envify-npm-1.4.0-6307b72ccf-655d110220.zip"; hash = "sha512-ZV0RAiCYPBpLnAxnmi6AFtS2f26ce1Q1/1l57Nsg0IE/TewKCGdPy91IRqPwftu1CjaBH9N5MLlKqg2drOsBfg=="; };
|
||||
"react@npm:18.3.1" = { filename = "react-npm-18.3.1-af38f3c1ae-283e8c5efc.zip"; hash = "sha512-KD6MXvzzeALJ0c52fzAt1Wndl6cNm7jHvnmnibmQJFHg0WM0sF1zKZsg8EjLw8fSiLu94QtwH6GU4gicI32+ow=="; };
|
||||
"typescript@npm:7.0.2" = { filename = "typescript-npm-7.0.2-0bde2bcec5-3dcee51ec8.zip"; hash = "sha512-Pc7lHsjDMkkjJbzb999ItmZodR8SfmIq59QbbHFusZGEQkpF4U93UPUPNAIyOItp5ih4WRVfBqXOLfdvEssxzw=="; };
|
||||
"typescript@patch:typescript@npm%3A7.0.2#optional!builtin<compat/typescript>::version=7.0.2&hash=3bafbf" = { filename = "typescript-patch-4859cbaf66-6b3cdc369c.zip"; hash = "sha512-azzcNpzYKdRuAHNOpkIz7oRBnCglrY/kCJFa3ed6vO1LeiQB9+7VF9VKek9dHBhpdTy5kBjfHCFZx2HZ8zSDpg=="; };
|
||||
"undici-types@npm:7.18.2" = { filename = "undici-types-npm-7.18.2-3e6d69d829-85a7918911.zip"; hash = "sha512-haeRiRE6I4lZ16ZHNo5PfFVZw6QE69uPxEiBRc6UJvzYIlKoRKMCeY38Djfm+xeP9IHtA7xMr2NMV1fZ70NSHQ=="; };
|
||||
|
||||
@@ -213,14 +213,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=a998690446ecf647e3af78e369492c1a3663b66d":
|
||||
"@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0":
|
||||
version: 0.1.0
|
||||
resolution: "@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=a998690446ecf647e3af78e369492c1a3663b66d"
|
||||
resolution: "@quixos/camino-package-runtime@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0"
|
||||
dependencies:
|
||||
"@bufbuild/protobuf": "npm:^2.12.1"
|
||||
"@connectrpc/connect": "npm:^2.1.2"
|
||||
"@connectrpc/connect-node": "npm:^2.1.2"
|
||||
checksum: 10c0/c90d5d5c5311da4fb16e491adabae1b0072b40566524064460cd21ab01b3755e5127e7e14048770448283e22f6cb1af1ba5538ce0fe3b23f014c1151a757deca
|
||||
checksum: 10c0/75b1ffcea9ba83015c935a52ac90045cd525eb07c7a4e2fe8e3e08c1d1c2c9fe5538c2889c22ebef7631f4d614bea9f7cf0dc039f766ffc6d4793cf61edc68fc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -228,9 +228,11 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@quixos/todo-react-runtime@workspace:."
|
||||
dependencies:
|
||||
"@quixos/camino-package-runtime": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=a998690446ecf647e3af78e369492c1a3663b66d"
|
||||
"@quixos/camino-package-runtime": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git#commit=110e41b268c8ac309e6757f2af3331de417ff9b0"
|
||||
"@types/node": "npm:^24"
|
||||
"@types/react": "npm:^18.3.12"
|
||||
esbuild: "npm:^0.25.12"
|
||||
react: "npm:^18.3.1"
|
||||
typescript: "npm:^7.0.2"
|
||||
bin:
|
||||
server: dist/server.js
|
||||
@@ -246,6 +248,23 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/prop-types@npm:*":
|
||||
version: 15.7.15
|
||||
resolution: "@types/prop-types@npm:15.7.15"
|
||||
checksum: 10c0/b59aad1ad19bf1733cf524fd4e618196c6c7690f48ee70a327eb450a42aab8e8a063fbe59ca0a5701aebe2d92d582292c0fb845ea57474f6a15f6994b0e260b2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/react@npm:^18.3.12":
|
||||
version: 18.3.31
|
||||
resolution: "@types/react@npm:18.3.31"
|
||||
dependencies:
|
||||
"@types/prop-types": "npm:*"
|
||||
csstype: "npm:^3.2.2"
|
||||
checksum: 10c0/44180549dd045f536ececd39e39aacdf828e76adc1c4a90b132f453e23cc370c4648d9102ae401172ebd8fd8b1977a901a39e214e53ec77171b27514b588c179
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript/typescript-aix-ppc64@npm:7.0.2":
|
||||
version: 7.0.2
|
||||
resolution: "@typescript/typescript-aix-ppc64@npm:7.0.2"
|
||||
@@ -386,6 +405,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"csstype@npm:^3.2.2":
|
||||
version: 3.2.3
|
||||
resolution: "csstype@npm:3.2.3"
|
||||
checksum: 10c0/cd29c51e70fa822f1cecd8641a1445bed7063697469d35633b516e60fe8c1bde04b08f6c5b6022136bb669b64c63d4173af54864510fbb4ee23281801841a3ce
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild@npm:^0.25.12":
|
||||
version: 0.25.12
|
||||
resolution: "esbuild@npm:0.25.12"
|
||||
@@ -475,6 +501,33 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"js-tokens@npm:^3.0.0 || ^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "js-tokens@npm:4.0.0"
|
||||
checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"loose-envify@npm:^1.1.0":
|
||||
version: 1.4.0
|
||||
resolution: "loose-envify@npm:1.4.0"
|
||||
dependencies:
|
||||
js-tokens: "npm:^3.0.0 || ^4.0.0"
|
||||
bin:
|
||||
loose-envify: cli.js
|
||||
checksum: 10c0/655d110220983c1a4b9c0c679a2e8016d4b67f6e9c7b5435ff5979ecdb20d0813f4dec0a08674fcbdd4846a3f07edbb50a36811fd37930b94aaa0d9daceb017e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react@npm:^18.3.1":
|
||||
version: 18.3.1
|
||||
resolution: "react@npm:18.3.1"
|
||||
dependencies:
|
||||
loose-envify: "npm:^1.1.0"
|
||||
checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"typescript@npm:^7.0.2":
|
||||
version: 7.0.2
|
||||
resolution: "typescript@npm:7.0.2"
|
||||
|
||||
Reference in New Issue
Block a user