236 lines
12 KiB
Plaintext
236 lines
12 KiB
Plaintext
workspace Todo id "workspace:todo" revision "workspace:todo@capabilities-v1" commit "0000000000000000000000000000000000000001" {
|
|
atom Project id "atom:project" doc "A named collection of tasks.";
|
|
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 TaskReactComponent id "atom:task-react-component" doc "A persisted Web Studio presentation of a Task.";
|
|
atom WebStudioCanvas id "atom:org.quixos.web-studio:canvas" doc "A spatial Web Studio surface.";
|
|
atom WebStudioCanvasPlacement id "atom:org.quixos.web-studio:canvas-placement" doc "One presentation of an object on a Web Studio canvas.";
|
|
|
|
import interface Named;
|
|
import interface TaskData;
|
|
import interface ProjectTasks;
|
|
import interface ProjectActions;
|
|
import interface TaskActions;
|
|
import interface DisplayLabel;
|
|
import interface TaskCount;
|
|
import interface WebStudioCreateable;
|
|
import interface WebStudioReactComponent;
|
|
import interface WebStudioHasReactComponent;
|
|
import interface WebStudioCanvas;
|
|
import interface WebStudioCanvasPlacement;
|
|
import interface WebStudioPlaceable;
|
|
import interface WebStudioSearchable;
|
|
|
|
import package TodoRuntime;
|
|
import package ProjectRuntime;
|
|
import package ProjectReactRuntime;
|
|
import package TodoReactRuntime;
|
|
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 {
|
|
bind name.get to state WebStudioCanvasName.read;
|
|
bind name.set to state WebStudioCanvasName.write;
|
|
bind placements.resolve to edge WebStudioCanvasPlacementEdge.placements.resolve;
|
|
}
|
|
conform WebStudioCanvasPlacement as WebStudioCanvasPlacement {
|
|
bind position.get to state WebStudioPlacementPosition.read;
|
|
bind position.set to state WebStudioPlacementPosition.write;
|
|
bind size.get to state WebStudioPlacementSize.read;
|
|
bind size.set to state WebStudioPlacementSize.write;
|
|
bind z.get to state WebStudioPlacementZ.read;
|
|
bind z.set to state WebStudioPlacementZ.write;
|
|
bind subject.resolve to edge WebStudioPlacementSubjectEdge.subject.resolve;
|
|
bind subject.connect to edge WebStudioPlacementSubjectEdge.subject.connect;
|
|
bind subject.disconnect to edge WebStudioPlacementSubjectEdge.subject.disconnect;
|
|
bind canvas.resolve to edge WebStudioCanvasPlacementEdge.canvas.resolve;
|
|
bind canvas.connect to edge WebStudioCanvasPlacementEdge.canvas.connect;
|
|
bind canvas.disconnect to edge WebStudioCanvasPlacementEdge.canvas.disconnect;
|
|
}
|
|
|
|
conform Project as WebStudioCreateable {}
|
|
conform Project as WebStudioPlaceable {
|
|
bind placements.resolve to edge WebStudioPlacementSubjectEdge.placements.resolve;
|
|
}
|
|
conform Project as WebStudioSearchable {
|
|
bind document.get to package ProjectRuntime.searchDocumentGet with {
|
|
named to interface Named;
|
|
tasks to interface ProjectTasks;
|
|
};
|
|
bind document.watch-start to package ProjectRuntime.searchDocumentWatch with {
|
|
named to interface Named;
|
|
tasks to interface ProjectTasks;
|
|
};
|
|
bind document.watch-stop to package ProjectRuntime.searchDocumentWatchStop;
|
|
}
|
|
conform Project as WebStudioHasReactComponent {
|
|
bind component.resolve to edge ProjectComponentEdge.component.resolve;
|
|
materialize component if absent using constructor ProjectReactComponent via edge ProjectComponentEdge.subject;
|
|
}
|
|
conform Project as Named {
|
|
bind name.get to state ProjectName.read;
|
|
bind name.set to state ProjectName.write;
|
|
}
|
|
conform Project as ProjectTasks {
|
|
bind tasks.resolve to edge ProjectTaskEdge.tasks.resolve;
|
|
bind tasks.connect to edge ProjectTaskEdge.tasks.connect;
|
|
bind tasks.disconnect to edge ProjectTaskEdge.tasks.disconnect;
|
|
}
|
|
conform Project as ProjectActions {
|
|
bind addTask.call to package ProjectRuntime.addTask with {
|
|
tasks to edge ProjectTaskEdge.tasks;
|
|
task to constructor Task;
|
|
};
|
|
}
|
|
conform Project as TaskCount {
|
|
bind count.get to package ProjectRuntime.taskCountGet with {
|
|
tasks to edge ProjectTaskEdge.tasks;
|
|
};
|
|
bind count.watch-start to package ProjectRuntime.taskCountWatch with {
|
|
tasks to edge ProjectTaskEdge.tasks;
|
|
};
|
|
bind count.watch-stop to package ProjectRuntime.taskCountWatchStop;
|
|
}
|
|
conform ProjectReactComponent as WebStudioReactComponent {
|
|
bind source.get to package ProjectReactRuntime.sourceGet;
|
|
bind props.get to package ProjectReactRuntime.propsGet with {
|
|
named to interface Named via edge ProjectComponentEdge.subject;
|
|
tasks to interface ProjectTasks via edge ProjectComponentEdge.subject;
|
|
};
|
|
bind props.watch-start to package ProjectReactRuntime.propsWatch with {
|
|
named to interface Named via edge ProjectComponentEdge.subject;
|
|
tasks to interface ProjectTasks via edge ProjectComponentEdge.subject;
|
|
};
|
|
bind props.watch-stop to package ProjectReactRuntime.propsWatchStop;
|
|
}
|
|
|
|
conform Task as WebStudioHasReactComponent {
|
|
bind component.resolve to edge TaskComponentEdge.component.resolve;
|
|
materialize component if absent using constructor TaskReactComponent via edge TaskComponentEdge.subject;
|
|
}
|
|
conform Task as WebStudioPlaceable {
|
|
bind placements.resolve to edge WebStudioPlacementSubjectEdge.placements.resolve;
|
|
}
|
|
conform Task as WebStudioSearchable {
|
|
bind document.get to package TodoRuntime.searchDocumentGet with {
|
|
title to state TaskTitle;
|
|
status to state TaskStatus;
|
|
priority to state TaskPriority;
|
|
dueDate to state TaskDueDate;
|
|
};
|
|
bind document.watch-start to package TodoRuntime.searchDocumentWatch with {
|
|
title to state TaskTitle;
|
|
status to state TaskStatus;
|
|
priority to state TaskPriority;
|
|
dueDate to state TaskDueDate;
|
|
};
|
|
bind document.watch-stop to package TodoRuntime.searchDocumentWatchStop;
|
|
}
|
|
conform Task as TaskData {
|
|
bind title.get to state TaskTitle.read;
|
|
bind title.set to state TaskTitle.write;
|
|
bind status.get to state TaskStatus.read;
|
|
bind status.set to state TaskStatus.write;
|
|
bind priority.get to state TaskPriority.read;
|
|
bind priority.set to state TaskPriority.write;
|
|
bind notes.get to state TaskNotes.read;
|
|
bind notes.set to state TaskNotes.write;
|
|
bind dueDate.get to state TaskDueDate.read;
|
|
bind dueDate.set to state TaskDueDate.write;
|
|
bind energy.get to state TaskEnergy.read;
|
|
bind energy.set to state TaskEnergy.write;
|
|
}
|
|
conform Task as TaskActions {
|
|
bind complete.call to package TodoRuntime.complete with {
|
|
status to state TaskStatus;
|
|
};
|
|
bind reopen.call to package TodoRuntime.reopen with {
|
|
status to state TaskStatus;
|
|
};
|
|
bind archive.call to package TodoRuntime.archive with {
|
|
status to state TaskStatus;
|
|
};
|
|
}
|
|
conform Task as DisplayLabel {
|
|
bind label.get to package TodoRuntime.displayLabelGet with {
|
|
title to state TaskTitle;
|
|
status to state TaskStatus;
|
|
priority to state TaskPriority;
|
|
};
|
|
bind label.watch-start to package TodoRuntime.displayLabelWatch with {
|
|
title to state TaskTitle;
|
|
status to state TaskStatus;
|
|
priority to state TaskPriority;
|
|
};
|
|
bind label.watch-stop to package TodoRuntime.displayLabelWatchStop;
|
|
}
|
|
conform TaskReactComponent as WebStudioReactComponent {
|
|
bind source.get to package TodoReactRuntime.sourceGet;
|
|
bind props.get to package TodoReactRuntime.propsGet with {
|
|
subject to 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 {
|
|
subject to 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;
|
|
}
|
|
|
|
constructor Project to ProjectRuntime.createProject;
|
|
constructor Task to TodoRuntime.createTask with {
|
|
title to state TaskTitle;
|
|
};
|
|
constructor ProjectReactComponent to ProjectReactRuntime.createComponent;
|
|
constructor TaskReactComponent to TodoReactRuntime.createComponent;
|
|
constructor WebStudioCanvas to WebStudioCanvasRuntime.createCanvas;
|
|
constructor WebStudioCanvasPlacement to WebStudioCanvasRuntime.createPlacement with {
|
|
position to state WebStudioPlacementPosition;
|
|
size to state WebStudioPlacementSize;
|
|
z to state WebStudioPlacementZ;
|
|
canvas to edge WebStudioCanvasPlacementEdge.canvas;
|
|
subject to edge WebStudioPlacementSubjectEdge.subject;
|
|
};
|
|
}
|