Skip to content

Commit

Permalink
prep for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
OrionReed committed Jul 9, 2024
1 parent 772a42c commit b37c09b
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 7 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
- pages-demo
permissions:
contents: write

jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Enable Corepack 📦
run: |
corepack enable
corepack prepare [email protected] --activate
- name: Build 🔧
run: |
yarn install
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function YjsExample() {
MainMenu: CustomMainMenu,
}}
onMount={onMount}
persistenceKey='funcArrows'
persistenceKey='scoped-propagators'
/>
</div>
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Geo.ts → src/propagators/Geo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpatialIndex } from "@/SpatialIndex"
import { SpatialIndex } from "@/propagators/SpatialIndex"
import { Editor, TLShape, TLShapeId, VecLike, polygonsIntersect } from "tldraw"

export class Geo {
Expand Down
17 changes: 13 additions & 4 deletions src/propagators/ScopedPropagators.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import { DeltaTime } from "@/DeltaTime"
import { Geo } from "@/Geo"
import { Edge, getArrowsFromShape, getEdge } from "@/tlgraph"
import { isShapeOfType, updateProps } from "@/utils"
import { DeltaTime } from "@/propagators/DeltaTime"
import { Geo } from "@/propagators/Geo"
import { Edge, getArrowsFromShape, getEdge } from "@/propagators/tlgraph"
import { isShapeOfType, updateProps } from "@/propagators/utils"
import { Editor, TLArrowShape, TLBinding, TLGroupShape, TLShape, TLShapeId } from "tldraw"

type Prefix = 'click' | 'tick' | 'geo' | ''

export function registerDefaultPropagators(editor: Editor) {
registerPropagators(editor, [
ChangePropagator,
ClickPropagator,
TickPropagator,
SpatialPropagator,
])
}

function isPropagatorOfType(arrow: TLShape, prefix: Prefix) {
if (!isShapeOfType<TLArrowShape>(arrow, 'arrow')) return false
const regex = new RegExp(`^\\s*${prefix}\\s*\\{`)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/tlgraph.ts → src/propagators/tlgraph.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isShapeOfType } from "@/utils";
import { isShapeOfType } from "@/propagators/utils";
import { Editor, TLArrowBinding, TLArrowShape, TLShape, TLShapeId } from "tldraw";

export interface Edge {
Expand Down
File renamed without changes.

0 comments on commit b37c09b

Please sign in to comment.