diff --git a/.gitattributes b/.gitattributes index f865be5..5f75ec4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,2 @@ -calcit.cirru -diff linguist-generated yarn.lock -diff linguist-generated diff --git a/.github/workflows/upload.yaml b/.github/workflows/upload.yaml index ac9aa86..ebe9228 100644 --- a/.github/workflows/upload.yaml +++ b/.github/workflows/upload.yaml @@ -17,7 +17,7 @@ jobs: node-version: 22 - uses: calcit-lang/setup-calcit@v1.5.1 with: - version: "0.43.0" + version: "0.44.0" tools: calcit,caps - name: Install dependencies run: | @@ -35,6 +35,7 @@ jobs: - name: Build run: yarn build - name: Deploy to server + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') id: deploy uses: Pendect/action-rsyncer@v1.1.0 env: @@ -46,4 +47,5 @@ jobs: src: 'dist/*' dest: 'rsync-user@tiye.me:/web-assets/repo/${{ github.repository }}' - name: Display status from deploy + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') run: echo "${{ steps.deploy.outputs.status }}" diff --git a/calcit.cirru b/calcit.cirru index 0628ba9..d7039eb 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -21,17 +21,15 @@ {} $ :background-color |#f0f0f0 list-> {} $ :style $ {} (:width |100%) (:height |100%) - map-indexed notes $ fn (idx raw) - let - note $ decode-map-as raw Note - [] (:id note) (comp-note note) + map-indexed notes $ fn (idx note) + [] (:id note) (comp-note note) button $ {} (:inner-text "|+ Note") (:style ui/button) :style $ {} (:position :absolute) (:left 16) (:bottom 16) :on-click $ fn (e d!) d! $ schema/Action :add-note 40 $ + 40 * 24 $ count notes :examples $ [] - :schema $ quote $ Fn (List Dynamic) (-> respo.schema/Component) + :schema $ quote $ Fn (List Note) (-> respo.schema/Component) 'comp-note $ %{} 'CodeEntry (:doc |) :code $ quote $ defcomp comp-note (note) div @@ -58,21 +56,19 @@ '*notes $ %{} 'CodeEntry (:doc |) :code $ quote $ defref *notes ([]) :examples $ [] - :schema $ quote $ Ref (List Dynamic) + :schema $ quote $ Ref (List Note) 'dispatch! $ %{} 'CodeEntry (:doc |) :code $ quote $ defn dispatch! (action) match action (:add-note x y) - reset! *notes $ conj @*notes $ {} - :id $ str |note- $ count @*notes - :x x - :y y - :text | + reset! *notes $ conj @*notes $ Note :id + str |note- $ count @*notes + , :x x :y y :text | (:update-note id text) reset! *notes $ map-indexed @*notes $ fn (idx raw) if - = id $ .unwrap-or (get raw :id) | - assoc raw :text text + = id $ :id raw + &struct:assoc raw :text text , raw , &unit :examples $ [] @@ -108,7 +104,7 @@ :require respo.core :refer $ render-with! respo.ffi.browser :refer $ query-selector - app.comp.container :refer $ comp-container + app.comp.container :refer $ comp-container Note app.schema :as schema |./calcit.build-errors :default build-errors 'app.schema $ %{} 'FileEntry diff --git a/deps.cirru b/deps.cirru index e61f985..839a63b 100644 --- a/deps.cirru +++ b/deps.cirru @@ -1,4 +1,4 @@ -{} (:calcit-version |0.43.0) +{} (:calcit-version |0.44.0) :version |0.0.1 - :dependencies $ {} (|Respo/respo.calcit |0.19.10) - |Respo/respo-ui.calcit |0.15.4 + :dependencies $ {} (|Respo/respo.calcit |0.19.12) + |Respo/respo-ui.calcit |0.15.6 diff --git a/package.json b/package.json index c855b90..0b07d06 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "vite": "^7.0.0" }, "dependencies": { - "@calcit/procs": "0.43.0", + "@calcit/procs": "0.44.0", "feather-icons": "^4.9.0", "shortid": "^2.2.14" }, diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..af223cd --- /dev/null +++ b/vite.config.js @@ -0,0 +1,5 @@ +import { defineConfig } from 'vite' + +export default defineConfig({ + define: { process: 'globalThis.process' }, +}) diff --git a/yarn.lock b/yarn.lock index dcc052d..b7b8f7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,15 +12,15 @@ __metadata: languageName: node linkType: hard -"@calcit/procs@npm:0.43.0": - version: 0.43.0 - resolution: "@calcit/procs@npm:0.43.0" +"@calcit/procs@npm:0.44.0": + version: 0.44.0 + resolution: "@calcit/procs@npm:0.44.0" dependencies: "@calcit/finger-vec": "npm:0.1.1" "@calcit/ternary-tree": "npm:0.0.26" "@cirru/parser.ts": "npm:0.0.10" "@cirru/writer.ts": "npm:^0.1.9" - checksum: 10c0/6e2c11214e93e04d8a6679f34aa6a31f26bbb445f70b77299590d16d38563bee9fe700a77c919a843e0fa279b14ddb704c1ad5a17e17fa3e289f966dee17c7c5 + checksum: 10c0/28f2dc888de84f14974a1499973503d5f98144502f99e4ec0cf53f4e0e6c4426d7d9a9a0013fd7fd4b5b0ab0b29af4e218377a388e5949520ab3ae4823b0c885 languageName: node linkType: hard @@ -452,7 +452,7 @@ __metadata: version: 0.0.0-use.local resolution: "calcit-workflow@workspace:." dependencies: - "@calcit/procs": "npm:0.43.0" + "@calcit/procs": "npm:0.44.0" bottom-tip: "npm:^0.1.2" feather-icons: "npm:^4.9.0" shortid: "npm:^2.2.14"