Skip to content

Commit

Permalink
Merge pull request #52 from Respo/and-mark
Browse files Browse the repository at this point in the history
allow and mark for css rule mark
  • Loading branch information
NoEgAm committed Jun 5, 2023
2 parents 40436ae + 243018a commit 8a6dc88
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 45 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: yarn

- uses: supplypike/setup-bin@v3
with:
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.7.0-a2/cr'
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.7.0-a7/cr'
name: 'cr'
version: '0.7.0-a2'
version: '0.7.0-a7'

- uses: supplypike/setup-bin@v3
with:
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.7.0-a2/caps'
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.7.0-a7/caps'
name: 'caps'
version: '0.7.0-a2'
version: '0.7.0-a7'

- name: "load deps"
run: caps --ci && yarn
Expand Down
70 changes: 44 additions & 26 deletions calcit.cirru

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions compact.cirru
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

{} (:package |respo)
:configs $ {} (:init-fn |respo.main/main!) (:reload-fn |respo.main/reload!) (:version |0.14.45)
:configs $ {} (:init-fn |respo.main/main!) (:reload-fn |respo.main/reload!) (:version |0.14.47)
:modules $ [] |memof/compact.cirru |lilac/compact.cirru |calcit-test/compact.cirru
:entries $ {}
:files $ {}
Expand Down Expand Up @@ -39,7 +39,7 @@
state $ either (:data states) |
[] (effect-log task)
div
{} $ :style style-task
{} $ :class-name css-task
comp-inspect |Task task $ {} (:left 200)
button $ {} (:class-name style-done)
:style $ {}
Expand Down Expand Up @@ -67,6 +67,9 @@
<> |Remove
=< 8 nil
div ({}) (<> state)
|css-task $ quote
defstyle css-task $ {}
"\"&" $ {} (:display :flex) (:padding "|4px 0px")
|effect-log $ quote
defeffect effect-log (task) (action parent at-place?) (; js/console.log "\"Task effect" action at-place?)
case-default action nil
Expand All @@ -79,8 +82,6 @@
|style-done $ quote
defstyle style-done $ {}
"\"$0" $ {} (:width 32) (:height 32) (:outline :none) (:border :none) (:vertical-align :middle)
|style-task $ quote
def style-task $ {} (:display :flex) (:padding "|4px 0px")
:ns $ quote
ns respo.app.comp.task $ :require
respo.core :refer $ defcomp div input span button <> defeffect
Expand Down Expand Up @@ -781,7 +782,8 @@
assert "\"expected rule name in string" $ string? k
assert "\"expected rule styles in map" $ map? v
let
rule-name $ .!replace k "\"$0" (str "\"." style-name)
class-rule $ str "\"." style-name
rule-name $ -> k (.!replace "\"$0" class-rule) (.!replace "\"&" class-rule)
css-line $ style->string (.to-list v)
str rule-name "\" {" &newline css-line &newline "\"}"
.to-list
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.14.46",
"version": "0.14.47",
"dependencies": {
"@calcit/procs": "^0.7.0-a2"
"@calcit/procs": "^0.7.0-a7"
},
"scripts": {
"test": "cr --once --emit-js --init-fn=respo.test.main/main! && node test.mjs"
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8a6dc88

Please sign in to comment.