diff --git a/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-chromium-linux.png b/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-chromium-linux.png
index 3d23fba6..a9ebf875 100644
Binary files a/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-chromium-linux.png and b/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-chromium-linux.png differ
diff --git a/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-firefox-linux.png b/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-firefox-linux.png
index 6d41edc4..d59f0b65 100644
Binary files a/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-firefox-linux.png and b/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-firefox-linux.png differ
diff --git a/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-chromium-linux.png b/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-chromium-linux.png
index 0626f837..b3858f5f 100644
Binary files a/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-chromium-linux.png and b/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-chromium-linux.png differ
diff --git a/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-firefox-linux.png b/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-firefox-linux.png
index 2d7b9af2..2d45fc95 100644
Binary files a/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-firefox-linux.png and b/e2e/tests/ci_snaps/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-firefox-linux.png differ
diff --git a/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-chromium-linux.png b/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-chromium-linux.png
index 3d23fba6..a9ebf875 100644
Binary files a/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-chromium-linux.png and b/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-chromium-linux.png differ
diff --git a/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-firefox-linux.png b/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-firefox-linux.png
index 243f80e1..3173a68f 100644
Binary files a/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-firefox-linux.png and b/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Start-deep-in-a-sequence-1-firefox-linux.png differ
diff --git a/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-chromium-linux.png b/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-chromium-linux.png
index 0626f837..b3858f5f 100644
Binary files a/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-chromium-linux.png and b/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-chromium-linux.png differ
diff --git a/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-firefox-linux.png b/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-firefox-linux.png
index 99553d35..c7cfb652 100644
Binary files a/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-firefox-linux.png and b/e2e/tests/idiot.spec.ts-snapshots/Stress-test-Numberscope-usage-Way-too-big-a-number-1-firefox-linux.png differ
diff --git a/package.json b/package.json
index b61cc16d..c043bbb8 100644
--- a/package.json
+++ b/package.json
@@ -40,9 +40,9 @@
"help:preview:cmd": "echo Previews w/o rebuild; needed for e2e tests.",
"preview:cmd": "vite --config etc/vite.config.ts preview",
"help:test:unit": "echo Typechecks and runs unit tests.",
- "test:unit": "sh -c 'make -f etc/Makefile testunit \"cl_args=$@\"' phony",
+ "test:unit": "sh -xc 'make -f etc/Makefile testunit \"cl_args=$*\"' phony",
"help:test:e2e": "echo Runs end-to-end in-browser tests via Docker.",
- "test:e2e": "sh -c 'make -f etc/Makefile e2e/certificate \"cl_args=$@\"' phony",
+ "test:e2e": "sh -xc 'make -f etc/Makefile e2e/certificate \"cl_args=$*\"' phony",
"help:test:e2e:cmd": "run-s -s help:test:e2e:cmd-*",
"help:test:e2e:cmd-1": "echo Runs end-to-end tests directly.",
"help:test:e2e:cmd-2": "echo However, note that it does not rebuild",
@@ -52,7 +52,7 @@
"help:test:e2e:cmd-6": "echo use by other scripts.",
"test:e2e:cmd": "playwright test -c e2e/playwright.config.ts",
"help:test:e2e:report": "echo Runs e2e and opens report in browser",
- "test:e2e:report": "sh -c 'make -f etc/Makefile playreport \"cl_args=$@\"' phony",
+ "test:e2e:report": "sh -xc 'make -f etc/Makefile playreport \"cl_args=$*\"' phony",
"help:test:e2e:ui": "echo Runs interactive end-to-end tests directly.",
"test:e2e:ui": "npm run build && npm run test:e2e:cmd -- --ui",
"help:typecheck": "run-s -s help:typecheck:*",
diff --git a/src/components/ParamEditor.vue b/src/components/ParamEditor.vue
index 74763839..b16dee12 100644
--- a/src/components/ParamEditor.vue
+++ b/src/components/ParamEditor.vue
@@ -222,15 +222,23 @@
}
.stacked-param {
- margin-top: 24px;
+ margin-top: 16px;
margin-bottom: 0px;
}
+ .stacked-param + .stacked-param {
+ margin-top: 24px;
+ }
+
.inline-param {
- margin-top: 16px;
+ margin-top: 8px;
margin-bottom: 0px;
}
+ .stacked-param + .inline-param {
+ margin-top: 16px;
+ }
+
.sub-stacked-param {
border-left: 1px solid var(--ns-color-black);
margin-left: 8px;
diff --git a/src/components/ParamField.vue b/src/components/ParamField.vue
index c5d0cdbb..ab115087 100644
--- a/src/components/ParamField.vue
+++ b/src/components/ParamField.vue
@@ -14,6 +14,7 @@
:id="paramName"
v-model:value="colorValue"
v-model:show-picker="showPicker"
+ show-alpha
:add-color="param.type === ParamType.COLOR_ARRAY"
@click="maybeTogglePicker"
@update:show-picker="reconcilePicker" />
@@ -29,6 +30,14 @@
{{ name }}
+
@@ -99,19 +108,31 @@
return map
}
- function blurField(id: string) {
- window.document.getElementById(id)?.blur()
+ function blurField(e: Event) {
+ const field = e.target
+ if (field instanceof HTMLElement) field.blur()
+ }
+ function growArea(e: Event) {
+ const area = e.target
+ if (area instanceof HTMLTextAreaElement) {
+ const curheight = area.getBoundingClientRect().height
+ area.style.height = `${curheight + 14}px`
+ }
}
function updateBoolean(e: Event) {
- blurField(props.paramName)
+ blurField(e)
const inp = e.target as HTMLInputElement
emit('updateParam', inp.checked + '')
}
function updateString(e: Event) {
const t = e.target
- if (t instanceof HTMLSelectElement || t instanceof HTMLInputElement) {
+ if (
+ t instanceof HTMLSelectElement
+ || t instanceof HTMLInputElement
+ || t instanceof HTMLTextAreaElement
+ ) {
emit('updateParam', t.value)
}
}
@@ -253,6 +274,18 @@
}
}
+ textarea {
+ display: block;
+ border: none;
+ border-bottom: 1.5px solid var(--ns-color-black);
+ padding-bottom: 0px;
+ margin: 0px;
+ width: 100%;
+ height: 30px;
+ font-size: 14px;
+ resize: vertical;
+ }
+
.param-description {
font-size: 12px;
color: var(--ns-color-grey);
diff --git a/src/shared/ParamType.ts b/src/shared/ParamType.ts
index 10539beb..19e87306 100644
--- a/src/shared/ParamType.ts
+++ b/src/shared/ParamType.ts
@@ -232,7 +232,7 @@ export const typeFunctions: {
status.forbid(
freeVars.size,
`free variables limited to ${inputSymbols}; `
- + `please remove '${freeVars}'`
+ + `please remove '${Array.from(freeVars).join(', ')}'`
)
status.forbid(
fmla.freefuncs.size,
diff --git a/src/shared/defineFeatured.ts b/src/shared/defineFeatured.ts
index 667f4329..b24e79d3 100644
--- a/src/shared/defineFeatured.ts
+++ b/src/shared/defineFeatured.ts
@@ -86,10 +86,11 @@ const featuredSIMs = [
'Wait For It',
'Turtle',
'Formula',
- 'domain=-1+1&angles=30+120&steps=30+30&widths=2&strokeColor=%237a9f6f'
- + '&bgColor=363071&speed=3&ruleMode=1&angleFormula=%7B%22-1%22%3A'
- + '+30%2C+%221%22%3A+120%7D%5Bstring%28a%29%5D&stepFormula=%7B%22'
- + '-1%22%3A+30%2C+%221%22%3A+30%7D%5Bstring%28a%29%5D&widthFormula'
+ 'domain=-1+1&angles=30+120&steps=30+30&widths=2'
+ + '&strokeColor=%237a106080+%237a9f6f50&bgColor=363071&speed=3'
+ + '&angleFormula=%7B%22-1%22%3A+30%2C+%221%22%3A+120%7D'
+ + '%5Bstring%28a%29%5D&stepFormula=%7B%22-1%22%3A+30%2C'
+ + '+%221%22%3A+30%7D%5Bstring%28a%29%5D&widthFormula'
+ '=%7B%22-1%22%3A+2%2C+%221%22%3A+2%7D%5Bstring%28a%29%5D'
+ '&colorFormula=%7B%22-1%22%3A+%237a106080%2C+%221%22%3A'
+ '+%237a9f6f50%7D%5Bstring%28a%29%5D',