Compare commits

..
6 changed files with 186 additions and 146 deletions
+2
View File
@@ -0,0 +1,2 @@
# Authoring journals, resolver checkouts, and provisional reports are not source.
/.quixos/
+4
View File
@@ -0,0 +1,4 @@
{
"monorepoCommit": "4c88728f144add3457b4273d4b9a04ee53c53be3",
"sourcePath": "quixos-instance/workspaces/todo"
}
+28 -30
View File
@@ -1,72 +1,70 @@
quixos-lock fragment version 1 { quixos-lock fragment version 1 {
interface Named source { interface Named source {
repository "https://repos.quixos.org/quixos-templates/interface-named.git"; repository "https://repos.quixos.org/quixos-templates/interface-named.git";
commit "14be607ed250f8c3ce1633558573fc1449f6f2a1"; commit "fbd8d695bcb49c7a2bd3394002bc828a75cdc11b";
} }
interface TaskData source { interface TaskData source {
repository "https://repos.quixos.org/quixos-templates/interface-task-data.git"; repository "https://repos.quixos.org/quixos-templates/interface-task-data.git";
commit "bf49686e03e02a5f047512191a97927a94624ac4"; commit "73d0b65861ab7d4194e431a6a38e28a288687fe9";
} }
interface ProjectTasks source { interface ProjectTasks source {
repository "https://repos.quixos.org/quixos-templates/interface-project-tasks.git"; repository "https://repos.quixos.org/quixos-templates/interface-project-tasks.git";
commit "2590966c1f95da08126f1cb830be7dcc6dc715d9"; commit "7cb6436aa1c2a455e4dc649ac3fe9d15de136360";
} }
interface ProjectActions source { interface ProjectActions source {
repository "https://repos.quixos.org/quixos-templates/interface-project-actions.git"; repository "https://repos.quixos.org/quixos-templates/interface-project-actions.git";
commit "bcd34a9d2e94b767e531a1138a590cca07d4c3fa"; commit "a332fdb4014d3ef5df11886ed33588cd1f4b52af";
} }
interface TaskActions source { interface TaskActions source {
repository "https://repos.quixos.org/quixos-templates/interface-task-actions.git"; repository "https://repos.quixos.org/quixos-templates/interface-task-actions.git";
commit "1f6123fe8aa2efa30b536c0822c3fe01eed37bc5"; commit "75c1f0cc6d201d34adf5d75695f7bab687157500";
} }
interface DisplayLabel source { interface DisplayLabel source {
repository "https://repos.quixos.org/quixos-templates/interface-display-label.git"; repository "https://repos.quixos.org/quixos-templates/interface-display-label.git";
commit "e7afc5c4ddd2515ae6e005bf0943f5c764362cbb"; commit "f1515760036cd6229baddcb3ef28e10738a5ab88";
} }
interface TaskCount source { interface TaskCount source {
repository "https://repos.quixos.org/quixos-templates/interface-task-count.git"; repository "https://repos.quixos.org/quixos-templates/interface-task-count.git";
commit "5c034fdcb805fa2d892b65f689fab9ee2a431f68"; commit "8259df1b2243f88dbeed42935e0848afb9d9a7d7";
} }
interface WebStudioFactory source {
interface WebStudioCreateable source { repository "https://repos.quixos.org/quixos-templates/interface-factory.git";
repository "https://repos.quixos.org/quixos-templates/interface-createable.git"; commit "ce335fd5a6837209778171dc202daf403ac3901f";
commit "03fdebf600aaa85abba98033d3831291c44421b4";
} }
interface WebStudioReactComponent source { interface WebStudioReactComponent source {
repository "https://repos.quixos.org/quixos-templates/interface-react-component.git"; repository "https://repos.quixos.org/quixos-templates/interface-react-component.git";
commit "54c26db6c722e91523a300d94038c5c39d6df662"; commit "7ba0b146d8c3f899119c86bc24630ab2a6f59699";
}
interface WebStudioReactSource source {
repository "https://repos.quixos.org/quixos-templates/interface-react-source.git";
commit "c328b98b89d1b0b92cfac2506cdee7508d32f2d6";
} }
interface WebStudioHasReactComponent source { interface WebStudioHasReactComponent source {
repository "https://repos.quixos.org/quixos-templates/interface-has-react-component.git"; repository "https://repos.quixos.org/quixos-templates/interface-has-react-component.git";
commit "fb01eaac27a13efd78c1d6de5414fc5d790c3fcc"; commit "25802f0b658dfecd170981e19de65c7a5d8925e3";
} }
interface WebStudioCanvas source { interface WebStudioCanvas source {
repository "https://repos.quixos.org/quixos-templates/interface-canvas.git"; repository "https://repos.quixos.org/quixos-templates/interface-canvas.git";
commit "e9ce13befad5704aaff70e44c4eefd4f9d877d96"; commit "e70a95d8e7e10d4d6e5e4a6cb2bc45b294dcd41f";
} }
interface WebStudioCanvasPlacement source { interface WebStudioCanvasPlacement source {
repository "https://repos.quixos.org/quixos-templates/interface-canvas-placement.git"; repository "https://repos.quixos.org/quixos-templates/interface-canvas-placement.git";
commit "b00128cca4cbf4a6883dd998bb1b44af7eb2a245"; commit "5785ced8b4f6220b50d6c1a5ccfc4f7a14bcb911";
} }
interface WebStudioPlaceable source { interface WebStudioPlaceable source {
repository "https://repos.quixos.org/quixos-templates/interface-placeable.git"; repository "https://repos.quixos.org/quixos-templates/interface-placeable.git";
commit "8b4c62724e16084e6601f5d0ab4b730294d0fb89"; commit "551c83ab999837e444f14242d0650256039c1ea1";
} }
interface WebStudioSearchable source { interface WebStudioSearchable source {
repository "https://repos.quixos.org/quixos-templates/interface-searchable.git"; repository "https://repos.quixos.org/quixos-templates/interface-searchable.git";
commit "f0d9fa3d3f5c979b738688d4bcff423e5ca7f4cd"; commit "db5f031956096e6319c917a2168f9f93dc2d71b0";
}
interface TagData source {
repository "https://repos.quixos.org/quixos-templates/interface-tag-data.git";
commit "944d1186ff82c2b00fe0db4fd839bbbfc66b0a72";
}
interface CompletionData source {
repository "https://repos.quixos.org/quixos-templates/interface-completion-data.git";
commit "6af9cc41f203378dce92f14b716708ba053d30fc";
} }
} }
+5 -10
View File
@@ -1,27 +1,22 @@
quixos-lock fragment version 1 { quixos-lock fragment version 1 {
package TodoRuntime source { package TodoRuntime source {
repository "https://repos.quixos.org/quixos-templates/package-todo-runtime.git"; repository "https://repos.quixos.org/quixos-templates/package-todo-runtime.git";
commit "667c87e4b0494f26968f224c0b01c52f9979101b"; commit "9dbbac4101567836839a89406e84cab4f1c874a8";
} }
package ProjectRuntime source { package ProjectRuntime source {
repository "https://repos.quixos.org/quixos-templates/package-project-runtime.git"; repository "https://repos.quixos.org/quixos-templates/package-project-runtime.git";
commit "f902eb5ac5c1a73a0df4449c6d243d10e2a36da9"; commit "3247eb36dee76b2b8e4c44ece0ff519970222151";
} }
package ProjectReactRuntime source { package ProjectReactRuntime source {
repository "https://repos.quixos.org/quixos-templates/package-project-react-runtime.git"; repository "https://repos.quixos.org/quixos-templates/package-project-react-runtime.git";
commit "6b1708614a641da1625468c6fb8725cbfbea1fd6"; commit "9e21f765db15c3e2dfaf2575c20d586f09a2a1e2";
} }
package TodoReactRuntime source { package TodoReactRuntime source {
repository "https://repos.quixos.org/quixos-templates/package-todo-react-runtime.git"; repository "https://repos.quixos.org/quixos-templates/package-todo-react-runtime.git";
commit "0aa51aa502aca102d6f65d3f2d5b82e7ca858e97"; commit "ccf6151667242a8e8f529dca763103bdc5d34bae";
} }
package WebStudioCanvasRuntime source { package WebStudioCanvasRuntime source {
repository "https://repos.quixos.org/quixos-templates/package-canvas-runtime.git"; repository "https://repos.quixos.org/quixos-templates/package-canvas-runtime.git";
commit "f751c64c07ad96991ce2537a3dea3190bc6dca79"; commit "7bd803637d874e3b65c092b60a84fb5b91914d99";
} }
} }
+1 -2
View File
@@ -1,9 +1,8 @@
quixos-lock version 1 { quixos-lock version 1 {
quixos source { quixos source {
repository "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos.git"; repository "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos.git";
commit "9c3ab572ecfbc83785038c3d9f174516df15d63f"; commit "4c88728f144add3457b4273d4b9a04ee53c53be3";
} }
import "locks/interfaces.lock"; import "locks/interfaces.lock";
import "locks/packages.lock"; import "locks/packages.lock";
} }
+146 -104
View File
@@ -1,5 +1,7 @@
workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" commit "0000000000000000000000000000000000000001" { workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" commit "0000000000000000000000000000000000000001" {
atom Project id "atom:project" doc "A named collection of tasks."; atom Project id "atom:project" doc "A named collection of tasks.";
atom Tag id "atom:tag" doc "A shared task label with a name and color.";
atom Completion id "atom:completion" doc "One recorded completion of a task.";
atom Task id "atom:task" doc "A unit of work."; atom Task id "atom:task" doc "A unit of work.";
atom ProjectReactComponent id "atom:project-react-component" doc "A persisted Web Studio presentation of a Project."; atom ProjectReactComponent id "atom:project-react-component" doc "A persisted Web Studio presentation of a Project.";
atom TaskReactComponent id "atom:task-react-component" doc "A persisted Web Studio presentation of a Task."; atom TaskReactComponent id "atom:task-react-component" doc "A persisted Web Studio presentation of a Task.";
@@ -8,12 +10,15 @@ workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" com
import interface Named; import interface Named;
import interface TaskData; import interface TaskData;
import interface TagData;
import interface CompletionData;
import interface ProjectTasks; import interface ProjectTasks;
import interface ProjectActions; import interface ProjectActions;
import interface TaskActions; import interface TaskActions;
import interface DisplayLabel; import interface DisplayLabel;
import interface TaskCount; import interface TaskCount;
import interface WebStudioCreateable; import interface WebStudioFactory;
import interface WebStudioReactSource;
import interface WebStudioReactComponent; import interface WebStudioReactComponent;
import interface WebStudioHasReactComponent; import interface WebStudioHasReactComponent;
import interface WebStudioCanvas; import interface WebStudioCanvas;
@@ -27,44 +32,27 @@ workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" com
import package TodoReactRuntime; import package TodoReactRuntime;
import package WebStudioCanvasRuntime; import package WebStudioCanvasRuntime;
shared state ProjectName id "slot:project:name" on Project : string policy optimistic-register default "Untitled project";
shared state TaskTitle id "slot:task:title" on Task : string policy optimistic-register default "Untitled task";
shared state TaskStatus id "slot:task:status" on Task : string policy optimistic-register default "OPEN";
shared state TaskPriority id "slot:task:priority" on Task : string policy optimistic-register default "NORMAL";
shared state TaskNotes id "slot:task:notes" on Task : string policy crdt(string) default "";
shared state TaskDueDate id "slot:task:due-date" on Task : string policy optimistic-register default "";
shared state TaskEnergy id "slot:task:energy" on Task : string policy optimistic-register default "MEDIUM";
shared state WebStudioCanvasName id "slot:org.quixos.web-studio.canvas:name" on WebStudioCanvas : string policy optimistic-register default "Hearth";
shared state WebStudioPlacementPosition id "slot:org.quixos.web-studio.canvas-placement:position" on WebStudioCanvasPlacement : message "org.quixos.web-studio.CanvasPosition" policy optimistic-register default {"x":0,"y":0};
shared state WebStudioPlacementSize id "slot:org.quixos.web-studio.canvas-placement:size" on WebStudioCanvasPlacement : message "org.quixos.web-studio.CanvasSize" policy optimistic-register default {"width":420,"height":320};
shared state WebStudioPlacementZ id "slot:org.quixos.web-studio.canvas-placement:z" on WebStudioCanvasPlacement : int32 policy optimistic-register default 0;
shared edge ProjectTaskEdge id "edge:project:tasks" {
atom Project projection tasks id "projection:project:tasks" many-unique ordered;
atom Task projection project id "projection:task:project" optional-one;
}
shared edge ProjectComponentEdge id "edge:project:web-studio-component" {
atom ProjectReactComponent projection subject id "projection:project-component:subject" exactly-one;
atom Project projection component id "projection:project:component" optional-one;
}
shared edge TaskComponentEdge id "edge:task:web-studio-component" {
atom TaskReactComponent projection subject id "projection:task-component:subject" exactly-one;
atom Task projection component id "projection:task:component" optional-one;
}
shared edge WebStudioCanvasPlacementEdge id "edge:org.quixos.web-studio:canvas-placements" {
atom WebStudioCanvasPlacement projection canvas id "projection:org.quixos.web-studio.canvas-placement:canvas" exactly-one;
interface WebStudioCanvas projection placements id "projection:org.quixos.web-studio.canvas:placements" many-unique ordered;
}
shared edge WebStudioPlacementSubjectEdge id "edge:org.quixos.web-studio:placement-subject" {
atom WebStudioCanvasPlacement projection subject id "projection:org.quixos.web-studio.canvas-placement:subject" exactly-one;
interface WebStudioPlaceable projection placements id "projection:org.quixos.web-studio.placeable:placements" many-unique ordered;
}
conform WebStudioCanvas as WebStudioCanvas { conform WebStudioCanvas as WebStudioCanvas id "conformance:todo:WebStudioCanvas:WebStudioCanvas" {
private state WebStudioCanvasName id "slot:org.quixos.web-studio.canvas:name" on WebStudioCanvas : string policy optimistic-register default "Hearth";
bind name.get to state WebStudioCanvasName.read; bind name.get to state WebStudioCanvasName.read;
bind name.set to state WebStudioCanvasName.write; bind name.set to state WebStudioCanvasName.write;
bind placements.resolve to edge WebStudioCanvasPlacementEdge.placements.resolve; bind placements.resolve to edge WebStudioCanvasPlacementEdge.placements.resolve;
} }
conform WebStudioCanvasPlacement as WebStudioCanvasPlacement { conform WebStudioCanvasPlacement as WebStudioCanvasPlacement id "conformance:todo:WebStudioCanvasPlacement:WebStudioCanvasPlacement" {
private state WebStudioPlacementPosition id "slot:org.quixos.web-studio.canvas-placement:position" on WebStudioCanvasPlacement : message "org.quixos.web-studio.CanvasPosition" policy optimistic-register default {"x":0,"y":0};
private state WebStudioPlacementSize id "slot:org.quixos.web-studio.canvas-placement:size" on WebStudioCanvasPlacement : message "org.quixos.web-studio.CanvasSize" policy optimistic-register default {"width":420,"height":320};
private state WebStudioPlacementZ id "slot:org.quixos.web-studio.canvas-placement:z" on WebStudioCanvasPlacement : int32 policy optimistic-register default 0;
private edge WebStudioCanvasPlacementEdge id "edge:org.quixos.web-studio:canvas-placements" {
atom WebStudioCanvasPlacement projection canvas id "projection:org.quixos.web-studio.canvas-placement:canvas" exactly-one;
interface WebStudioCanvas projection placements id "projection:org.quixos.web-studio.canvas:placements" many-unique ordered public-traversal;
}
private edge WebStudioPlacementSubjectEdge id "edge:org.quixos.web-studio:placement-subject" {
atom WebStudioCanvasPlacement projection subject id "projection:org.quixos.web-studio.canvas-placement:subject" exactly-one;
interface WebStudioPlaceable projection placements id "projection:org.quixos.web-studio.placeable:placements" many-unique ordered public-traversal;
}
bind position.get to state WebStudioPlacementPosition.read; bind position.get to state WebStudioPlacementPosition.read;
bind position.set to state WebStudioPlacementPosition.write; bind position.set to state WebStudioPlacementPosition.write;
bind size.get to state WebStudioPlacementSize.read; bind size.get to state WebStudioPlacementSize.read;
@@ -79,11 +67,15 @@ workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" com
bind canvas.disconnect to edge WebStudioCanvasPlacementEdge.canvas.disconnect; bind canvas.disconnect to edge WebStudioCanvasPlacementEdge.canvas.disconnect;
} }
conform Project as WebStudioCreateable {} conform Project as WebStudioFactory<atom Project> id "conformance:todo:Project:WebStudioFactory" {
conform Project as WebStudioPlaceable { bind create.call to package ProjectRuntime.newProject with { project to constructor Project; };
}
conform Project as WebStudioPlaceable id "conformance:todo:Project:WebStudioPlaceable" {
bind placements.resolve to edge WebStudioPlacementSubjectEdge.placements.resolve; bind placements.resolve to edge WebStudioPlacementSubjectEdge.placements.resolve;
} }
conform Project as WebStudioSearchable { conform Project as WebStudioSearchable id "conformance:todo:Project:WebStudioSearchable" {
bind document.get to package ProjectRuntime.searchDocumentGet with { bind document.get to package ProjectRuntime.searchDocumentGet with {
named to interface Named; named to interface Named;
tasks to interface ProjectTasks; tasks to interface ProjectTasks;
@@ -94,36 +86,63 @@ workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" com
}; };
bind document.watch-stop to package ProjectRuntime.searchDocumentWatchStop; bind document.watch-stop to package ProjectRuntime.searchDocumentWatchStop;
} }
conform Project as WebStudioHasReactComponent { conform Project as WebStudioHasReactComponent id "conformance:todo:Project:WebStudioHasReactComponent" {
private edge ProjectComponentEdge id "edge:project:web-studio-component" {
atom ProjectReactComponent projection subject id "projection:project-component:subject" exactly-one public-traversal;
atom Project projection component id "projection:project:component" optional-one;
}
bind component.resolve to edge ProjectComponentEdge.component.resolve; bind component.resolve to edge ProjectComponentEdge.component.resolve;
materialize component if absent using constructor ProjectReactComponent via edge ProjectComponentEdge.subject; materialize component if absent using constructor ProjectReactComponent via edge ProjectComponentEdge.subject;
} }
conform Project as Named { conform Project as Named id "conformance:todo:Project:Named" {
bind name.get to state ProjectName.read; private state ProjectName id "slot:project:name" on Project : string policy optimistic-register default "Untitled project";
bind name.set to state ProjectName.write;
bind name to state ProjectName;
} }
conform Project as ProjectTasks { conform Project as ProjectTasks id "conformance:todo:Project:ProjectTasks" {
private edge ProjectTags id "edge:project:tags" {
atom Project projection tags id "projection:project:tags" many-unique;
atom Tag projection catalogs id "projection:tag:catalogs" many-unique;
}
bind tags.resolve to edge ProjectTags.tags.resolve;
bind tags.connect to edge ProjectTags.tags.connect;
bind tags.disconnect to edge ProjectTags.tags.disconnect;
bind tags.watch-start to edge ProjectTags.tags.watch-start;
bind tags.watch-stop to edge ProjectTags.tags.watch-stop;
private edge ProjectTaskEdge id "edge:project:tasks" {
atom Project projection tasks id "projection:project:tasks" many-unique ordered;
atom Task projection project id "projection:task:project" optional-one;
}
bind tasks.resolve to edge ProjectTaskEdge.tasks.resolve; bind tasks.resolve to edge ProjectTaskEdge.tasks.resolve;
bind tasks.connect to edge ProjectTaskEdge.tasks.connect; bind tasks.connect to edge ProjectTaskEdge.tasks.connect;
bind tasks.disconnect to edge ProjectTaskEdge.tasks.disconnect; bind tasks.disconnect to edge ProjectTaskEdge.tasks.disconnect;
bind tasks.watch-start to edge ProjectTaskEdge.tasks.watch-start;
bind tasks.watch-stop to edge ProjectTaskEdge.tasks.watch-stop;
} }
conform Project as ProjectActions { conform Project as ProjectActions id "conformance:todo:Project:ProjectActions" {
bind addTag.call to package ProjectRuntime.addTag with { catalog to interface ProjectTasks; tag to constructor Tag; };
bind addTask.call to package ProjectRuntime.addTask with { bind addTask.call to package ProjectRuntime.addTask with {
tasks to edge ProjectTaskEdge.tasks; tasks to interface ProjectTasks;
task to constructor Task; task to constructor Task;
}; };
} }
conform Project as TaskCount { conform Project as TaskCount id "conformance:todo:Project:TaskCount" {
bind count.get to package ProjectRuntime.taskCountGet with { bind count.get to package ProjectRuntime.taskCountGet with {
tasks to edge ProjectTaskEdge.tasks; tasks to interface ProjectTasks;
}; };
bind count.watch-start to package ProjectRuntime.taskCountWatch with { bind count.watch-start to package ProjectRuntime.taskCountWatch with {
tasks to edge ProjectTaskEdge.tasks; tasks to interface ProjectTasks;
}; };
bind count.watch-stop to package ProjectRuntime.taskCountWatchStop; bind count.watch-stop to package ProjectRuntime.taskCountWatchStop;
} }
conform ProjectReactComponent as WebStudioReactComponent { conform ProjectReactComponent as WebStudioReactSource id "conformance:todo:ProjectReactComponent:WebStudioReactSource" {
bind source.get to package ProjectReactRuntime.sourceGet; bind source.get to package ProjectReactRuntime.sourceGet;
}
conform ProjectReactComponent as WebStudioReactComponent<record {named: interface-ref<Named>; tasks: interface-ref<ProjectTasks>;}> id "conformance:todo:ProjectReactComponent:WebStudioReactComponent" {
bind props.get to package ProjectReactRuntime.propsGet with { bind props.get to package ProjectReactRuntime.propsGet with {
named to interface Named via edge ProjectComponentEdge.subject; named to interface Named via edge ProjectComponentEdge.subject;
tasks to interface ProjectTasks via edge ProjectComponentEdge.subject; tasks to interface ProjectTasks via edge ProjectComponentEdge.subject;
@@ -135,101 +154,124 @@ workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" com
bind props.watch-stop to package ProjectReactRuntime.propsWatchStop; bind props.watch-stop to package ProjectReactRuntime.propsWatchStop;
} }
conform Task as WebStudioHasReactComponent { conform Task as WebStudioHasReactComponent id "conformance:todo:Task:WebStudioHasReactComponent" {
private edge TaskComponentEdge id "edge:task:web-studio-component" {
atom TaskReactComponent projection subject id "projection:task-component:subject" exactly-one public-traversal;
atom Task projection component id "projection:task:component" optional-one;
}
bind component.resolve to edge TaskComponentEdge.component.resolve; bind component.resolve to edge TaskComponentEdge.component.resolve;
materialize component if absent using constructor TaskReactComponent via edge TaskComponentEdge.subject; materialize component if absent using constructor TaskReactComponent via edge TaskComponentEdge.subject;
} }
conform Task as WebStudioPlaceable { conform Task as WebStudioPlaceable id "conformance:todo:Task:WebStudioPlaceable" {
bind placements.resolve to edge WebStudioPlacementSubjectEdge.placements.resolve; bind placements.resolve to edge WebStudioPlacementSubjectEdge.placements.resolve;
} }
conform Task as WebStudioSearchable { conform Task as WebStudioSearchable id "conformance:todo:Task:WebStudioSearchable" {
bind document.get to package TodoRuntime.searchDocumentGet with { bind document.get to package TodoRuntime.searchDocumentGet with {
title to state TaskTitle; data to interface TaskData;
status to state TaskStatus;
priority to state TaskPriority;
dueDate to state TaskDueDate;
}; };
bind document.watch-start to package TodoRuntime.searchDocumentWatch with { bind document.watch-start to package TodoRuntime.searchDocumentWatch with {
title to state TaskTitle; data to interface TaskData;
status to state TaskStatus;
priority to state TaskPriority;
dueDate to state TaskDueDate;
}; };
bind document.watch-stop to package TodoRuntime.searchDocumentWatchStop; bind document.watch-stop to package TodoRuntime.searchDocumentWatchStop;
} }
conform Task as TaskData { conform Task as TaskData id "conformance:todo:Task:TaskData" {
bind title.get to state TaskTitle.read; private state EstimatedHours id "slot:task:estimated-hours" on Task : double policy optimistic-register default 0;
bind title.set to state TaskTitle.write; private state RepeatDays id "slot:task:repeat-days" on Task : int32 policy optimistic-register default 0;
bind status.get to state TaskStatus.read; private edge TaskTags id "edge:task:tags" {
bind status.set to state TaskStatus.write; atom Task projection tags id "projection:task:tags" many-unique;
bind priority.get to state TaskPriority.read; atom Tag projection tasks id "projection:tag:tasks" many-unique;
bind priority.set to state TaskPriority.write; }
bind notes.get to state TaskNotes.read; private edge TaskCompletions id "edge:task:completions" {
bind notes.set to state TaskNotes.write; atom Task projection completions id "projection:task:completions" many-unique;
bind dueDate.get to state TaskDueDate.read; atom Completion projection task id "projection:completion:task" optional-one;
bind dueDate.set to state TaskDueDate.write; }
bind energy.get to state TaskEnergy.read; bind estimatedHours to state EstimatedHours;
bind energy.set to state TaskEnergy.write; bind repeatDays to state RepeatDays;
bind tags.resolve to edge TaskTags.tags.resolve;
bind tags.connect to edge TaskTags.tags.connect;
bind tags.disconnect to edge TaskTags.tags.disconnect;
bind tags.watch-start to edge TaskTags.tags.watch-start;
bind tags.watch-stop to edge TaskTags.tags.watch-stop;
bind completions.resolve to edge TaskCompletions.completions.resolve;
bind completions.connect to edge TaskCompletions.completions.connect;
bind completions.disconnect to edge TaskCompletions.completions.disconnect;
bind completions.watch-start to edge TaskCompletions.completions.watch-start;
bind completions.watch-stop to edge TaskCompletions.completions.watch-stop;
private state TaskTitle id "slot:task:title" on Task : string policy optimistic-register default "Untitled task";
private state TaskStatus id "slot:task:status" on Task : string policy optimistic-register default "OPEN";
private state TaskPriority id "slot:task:priority" on Task : string policy optimistic-register default "NORMAL";
private state TaskNotes id "slot:task:notes" on Task : string policy crdt(string) default "";
private state TaskDueDate id "slot:task:due-date" on Task : string policy optimistic-register default "";
private state TaskEnergy id "slot:task:energy" on Task : string policy optimistic-register default "MEDIUM";
bind title to state TaskTitle;
bind status to state TaskStatus;
bind priority to state TaskPriority;
bind notes to state TaskNotes;
bind dueDate to state TaskDueDate;
bind energy to state TaskEnergy;
} }
conform Task as TaskActions { conform Task as TaskActions id "conformance:todo:Task:TaskActions" {
bind complete.call to package TodoRuntime.complete with { bind complete.call to package TodoRuntime.complete with {
status to state TaskStatus; completion to constructor Completion;
data to interface TaskData;
}; };
bind reopen.call to package TodoRuntime.reopen with { bind reopen.call to package TodoRuntime.reopen with {
status to state TaskStatus; data to interface TaskData;
}; };
bind archive.call to package TodoRuntime.archive with { bind archive.call to package TodoRuntime.archive with {
status to state TaskStatus; data to interface TaskData;
}; };
} }
conform Task as DisplayLabel { conform Task as DisplayLabel id "conformance:todo:Task:DisplayLabel" {
bind label.get to package TodoRuntime.displayLabelGet with { bind label.get to package TodoRuntime.displayLabelGet with {
title to state TaskTitle; data to interface TaskData;
status to state TaskStatus;
priority to state TaskPriority;
}; };
bind label.watch-start to package TodoRuntime.displayLabelWatch with { bind label.watch-start to package TodoRuntime.displayLabelWatch with {
title to state TaskTitle; data to interface TaskData;
status to state TaskStatus;
priority to state TaskPriority;
}; };
bind label.watch-stop to package TodoRuntime.displayLabelWatchStop; bind label.watch-stop to package TodoRuntime.displayLabelWatchStop;
} }
conform TaskReactComponent as WebStudioReactComponent { conform TaskReactComponent as WebStudioReactSource id "conformance:todo:TaskReactComponent:WebStudioReactSource" {
bind source.get to package TodoReactRuntime.sourceGet; bind source.get to package TodoReactRuntime.sourceGet;
}
conform TaskReactComponent as WebStudioReactComponent<record {data: interface-ref<TaskData>;}> id "conformance:todo:TaskReactComponent:WebStudioReactComponent" {
bind props.get to package TodoReactRuntime.propsGet with { bind props.get to package TodoReactRuntime.propsGet with {
subject to edge TaskComponentEdge.subject; data to interface TaskData via edge TaskComponentEdge.subject;
title to state TaskTitle via edge TaskComponentEdge.subject;
status to state TaskStatus via edge TaskComponentEdge.subject;
priority to state TaskPriority via edge TaskComponentEdge.subject;
notes to state TaskNotes via edge TaskComponentEdge.subject;
dueDate to state TaskDueDate via edge TaskComponentEdge.subject;
energy to state TaskEnergy via edge TaskComponentEdge.subject;
}; };
bind props.watch-start to package TodoReactRuntime.propsWatch with { bind props.watch-start to package TodoReactRuntime.propsWatch with {
subject to edge TaskComponentEdge.subject; data to interface TaskData via edge TaskComponentEdge.subject;
title to state TaskTitle via edge TaskComponentEdge.subject;
status to state TaskStatus via edge TaskComponentEdge.subject;
priority to state TaskPriority via edge TaskComponentEdge.subject;
notes to state TaskNotes via edge TaskComponentEdge.subject;
dueDate to state TaskDueDate via edge TaskComponentEdge.subject;
energy to state TaskEnergy via edge TaskComponentEdge.subject;
}; };
bind props.watch-stop to package TodoReactRuntime.propsWatchStop; bind props.watch-stop to package TodoReactRuntime.propsWatchStop;
} }
conform Tag as TagData id "conformance:tag:data" {
private state Tagname id "slot:tag:name" on Tag : string policy optimistic-register default "New tag";
bind name to state Tagname;
private state Tagcolor id "slot:tag:color" on Tag : string policy optimistic-register default "#557a68";
bind color to state Tagcolor;
}
conform Completion as CompletionData id "conformance:completion:data" {
private state CompletioncompletedAt id "slot:completion:completedAt" on Completion : double policy optimistic-register default 0;
bind completedAt to state CompletioncompletedAt;
private state CompletionscheduledDate id "slot:completion:scheduledDate" on Completion : string policy optimistic-register default "";
bind scheduledDate to state CompletionscheduledDate;
}
constructor Tag to ProjectRuntime.createTag with { data to interface TagData; };
constructor Completion to TodoRuntime.createCompletion with { data to interface CompletionData; };
constructor Project to ProjectRuntime.createProject; constructor Project to ProjectRuntime.createProject;
constructor Task to TodoRuntime.createTask with { constructor Task to TodoRuntime.createTask with {
title to state TaskTitle; data to interface TaskData;
}; };
constructor ProjectReactComponent to ProjectReactRuntime.createComponent; constructor ProjectReactComponent to ProjectReactRuntime.createComponent;
constructor TaskReactComponent to TodoReactRuntime.createComponent; constructor TaskReactComponent to TodoReactRuntime.createComponent;
constructor WebStudioCanvas to WebStudioCanvasRuntime.createCanvas; constructor WebStudioCanvas to WebStudioCanvasRuntime.createCanvas;
constructor WebStudioCanvasPlacement to WebStudioCanvasRuntime.createPlacement with { constructor WebStudioCanvasPlacement to WebStudioCanvasRuntime.createPlacement with {
position to state WebStudioPlacementPosition; placement to interface WebStudioCanvasPlacement;
size to state WebStudioPlacementSize;
z to state WebStudioPlacementZ;
canvas to edge WebStudioCanvasPlacementEdge.canvas;
subject to edge WebStudioPlacementSubjectEdge.subject;
}; };
} }