Commit Graph
340 Commits
Author SHA1 Message Date
Bogdan Chadkin ccba8d9581 feat: substitute variables in calc and box-shadow (#5049)
Ref https://github.com/webstudio-is/webstudio/issues/4939

Here improved style engine logic to substitute variables in unparsed
values which is essential in cases like box-shadow or calc with
variables.

<img width="334" alt="Screenshot 2025-03-26 at 02 03 03"
src="https://github.com/user-attachments/assets/7b002061-1e83-48d9-abad-70547d1cdfc0"
/>
<img width="554" alt="Screenshot 2025-03-26 at 01 59 40"
src="https://github.com/user-attachments/assets/85597b72-cc74-4be9-9c32-ddc1b6510131"
/>
2025-03-26 18:11:55 +07:00
Bogdan Chadkin 5b3144d656 refactor: bump zod (#5035)
All three have minor feature updates

- zod
- zod-validation-error
- zod-to-json-schema
2025-03-25 00:17:05 +07:00
Bogdan Chadkin dd08852d43 build: upgrade typescript (#4991)
Upgraded to 5.8 and bumped all type definitions.
Enabled erasable syntax only flag and got rid from one case in
expression editor.
2025-03-13 11:21:00 +07:00
Bogdan Chadkin 935983b543 build: upgrade checks (#4982)
- vitest
- testing-library (got much lighter)
- eslint and plugins (@types/eslint__js no longer necessary)
- storybook
- esbuild
2025-03-11 15:22:57 +07:00
Bogdan Chadkin 16258bb9b5 refactor: bump remix (#4972)
Upgraded legacy remix. The new version got vite 6 support so we could
upgrade it later.
2025-03-10 16:41:01 +07:00
Bogdan Chadkin dc9eb34289 refactor: bump react-router (#4961)
Upgrade react-router to 7.3

Removed unused dependencies in this version
https://github.com/remix-run/react-router/pull/13134
2025-03-07 16:47:59 +07:00
Ivan Starkov 62a6d939d8 experimental: Animate UI (#4851)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2025-02-24 14:27:50 +05:00
Bogdan Chadkin 23034dad25 feat: add global system variable in builder (#4896)
Closes https://github.com/webstudio-is/webstudio/issues/4166

Now system is global variable and can be accessed in slots.

Legacy one can be deleted

<img width="264" alt="image"
src="https://github.com/user-attachments/assets/1c1d60f5-6be2-4871-9970-3593e3e7c08a"
/>
2025-02-23 01:46:21 +07:00
Bogdan Chadkin 13a4660391 fix: rebind variables after delete (#4865)
Ref https://github.com/webstudio-is/webstudio/issues/4768

Forgot to handle the case with rebinding with parent variables after
variable on child is deleted.

Also fixed the case with rebinding variables outside of slot scope.
2025-02-13 18:00:54 +08:00
Bogdan Chadkin 9e710f4156 refactor: replace ultraflag with @bomb.sh/args (#4857)
The project migrated to the new name.
No changes.
2025-02-11 23:50:18 +08:00
Bogdan Chadkin a03697e208 refactor: bump radix components (#4848)
Ref
https://www.radix-ui.com/primitives/docs/overview/releases#february-5-2025

Two small changes

- add react 19 to peer dependencies (remember that wall of errors?)
- prevent passing props when slot child is fragment
2025-02-11 23:37:35 +08:00
Ivan StarkovandOleg Isonen 3c42f8ca4b experimental: View Animations support (#4817)
## Description

ref  #2645

- [x] - Add view-timeline-name and scroll-timeline-name support, and
prefixer (use custom property for unsupported browsers)
- [x] - Add initial story

## Steps for reproduction


https://6382151c8b47d4399fb9fc69-uljkhwtbmc.chromatic.com/iframe.html?args=&globals=&id=sdk-components-animation-view-animations--in-out&viewMode=story

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-02-04 06:02:55 +03:00
Bogdan Chadkin 65e9e80025 refactor: split docker template (#4809)
We want to migrate more templates to react-router
so here I split docker template into react-router and
react-router-docker. Image processing, dockerfile and node environment
are left as docker specifics.
2025-01-31 17:55:59 +07:00
Bogdan Chadkin b72a74c825 refactor: bump ui libraries (#4802)
All maintenance or unrelated bulk bumps.

-
https://www.radix-ui.com/primitives/docs/overview/releases#january-22-2025
-
https://github.com/floating-ui/floating-ui/releases/tag/%40floating-ui%2Futils%400.2.9
- https://react-spectrum.adobe.com/releases/2025-01-15.html
2025-01-30 19:58:10 +07:00
Bogdan Chadkin c0b73ba145 feat: save variable/resource even with validation errors (#4798)
Closes https://github.com/webstudio-is/webstudio/issues/4753

Variable validation especially resources shouldn't be too destructive.
User may configure complex resource and get it all wiped out because url
is invalid or header has empty value.

Here I tweaked the logic to require only not duplicated "name" and
everything else is saved even when invalid.

This will not break anything in generation process and will still show
user an error.

<img width="649" alt="Screenshot 2025-01-28 at 14 18 11"
src="https://github.com/user-attachments/assets/0916d250-a864-4362-bf1f-67b6c15024ef"
/>
2025-01-28 21:24:43 +07:00
Bogdan Chadkin bc618d42fe experimental: add missing pieces to docker template (#4783)
- Got rid of peer dependencies warnings
- Added missing files in template
- reduced install time of dependencies
- added docker to init options
2025-01-25 17:56:20 +07:00
Bogdan Chadkin 73767437b6 feat: forbid data variables with the same name on instance (#4771)
Ref https://github.com/webstudio-is/webstudio/issues/4768

We don't want to allow data variables on one instance with the same
name. Though we will allow child variables to mask parent ones in
another PR.


To test:
- create variable var1 on box
- try to create another variable with var1
- create variable var2
- try to rename it to var1
- create variable on body with var1
2025-01-22 19:24:05 +07:00
Bogdan Chadkin 5acb458a68 build: upgrade dev dependencies (#4764)
Nothing critical, all not related to production

storybook 8.5
eslint 9.18
vitest 3
typescript 5.7.3
@types/node 22.10.7
type-fest 4.32
2025-01-21 00:14:56 +07:00
Bogdan Chadkin 3830b40d2c fix: support more curl flags (#4750)
Fixes https://github.com/webstudio-is/webstudio/issues/4661

- support -G to enforce get method and treat data as search params
- post data has application/x-www-form-urlencoded content type by
default
- -u flag allows basic http authentication
- support more data flags like --data-ascii, --data-raw,
--data-urlencode
2025-01-17 12:34:34 +07:00
Bogdan Chadkin ca85eddd2d refactor: add animation package (#4745)
Just an empty one
2025-01-16 13:29:21 +07:00
Bogdan Chadkin db95b55552 refactor: replace date-fns with use-relative-time (#4738)
See https://github.com/nkzw-tech/use-relative-time

We use only single function from date-fns while the package is like
22MB. Here's small alternative for react based on intl.

Added jsx support to ours toasts inside of builder and RelativeTime
component to use it inside of callbacks.
2025-01-11 20:26:16 +07:00
Bogdan Chadkin 4f026a0acf refactor: bump CLI dependencies (#4728)
All minor

- https://github.com/bombshell-dev/clack/releases - configurable key
bindings
- https://github.com/sindresorhus/p-limit/releases/tag/v5.0.0 - node
bump
- https://github.com/sindresorhus/p-limit/releases/tag/v6.0.0 - better
scheduling
- https://github.com/inikulin/parse5/releases/tag/v7.2.0 - search
element support
- https://github.com/ai/nanoid/releases/tag/5.0.9 - security fix
- https://github.com/alexeyraspopov/picocolors/releases/tag/v1.1.1 -
bundlers support
2025-01-07 16:32:42 +07:00
Bogdan Chadkin 2fe69ce31e refactor: upgrade ui libraries (#4693)
All has minor changes

- floating-ui
- react-error-boundary
(https://github.com/bvaughn/react-error-boundary/releases/tag/5.0.0)
- urlpattern polyfill (https://github.com/whatwg/urlpattern/issues/179)
- use-debounce
(https://github.com/xnimorz/use-debounce/releases/tag/10.0.0)
- react-aria
- react-hot-toast
(https://github.com/timolins/react-hot-toast/releases/tag/v2.5.0)
2025-01-03 02:30:58 +07:00
Bogdan Chadkin aa52e9fa35 feat: support tables in content and markdown embed (#4679)
Markdown embed now can convert tables like this into html

```
| Month    | Savings |
| -------- | ------- |
| January  | $250    |
| February | $80     |
| March    | $420    |
```

Both markdown embed and content embed have descendants to style tables.
Added table, row, header and cell.
2025-01-01 01:49:05 +07:00
Bogdan Chadkin 8e4ef3eb37 feat: support folding text fragments in code editor (#4676)
Closes https://github.com/webstudio-is/webstudio/issues/3636

Enabled folding for dialog editors only to avoid bloating space in
settings panel.

<img width="905" alt="Screenshot 2024-12-30 at 19 42 03"
src="https://github.com/user-attachments/assets/39a500f1-7d4f-407d-a7df-a1f47e15f69c"
/>
<img width="918" alt="Screenshot 2024-12-30 at 19 42 55"
src="https://github.com/user-attachments/assets/fe3b4c65-ec95-40c5-a114-e5fef2e02584"
/>
2024-12-30 22:24:32 +07:00
Bogdan Chadkin 2f8123b39b refactor: upgrade remix (#4669)
Just a minor version with one good feature. Future flags can disable
annoying warnings now. In builder and self hosted sites.
2024-12-29 22:57:35 +07:00
Bogdan Chadkin f76e030cb2 refactor: upgrade radix packages (#4663)
Ref
https://www.radix-ui.com/primitives/docs/overview/releases#october-1-2024
2024-12-28 17:04:39 +07:00
Bogdan Chadkin 425788f545 build: upgrade dev dependencies (#4658)
- storybook
- eslint
- types/node
- type-fest
- esbuild
2024-12-27 02:11:48 +07:00
Bogdan Chadkin e877b1f93a refactor: migrate curl parse to args-tokenizer (#4628)
Created new package https://github.com/TrySound/args-tokenizer for curl
parser. Might be useful in combination with tinyexec.
2024-12-21 21:23:15 +07:00
Ivan Starkov ea88935731 feat: RichText edit / command menu (#4621)
## Description

ref #4595

Search is working

<img width="246" alt="image"
src="https://github.com/user-attachments/assets/5dc850e4-6a36-4996-9aaa-f051ac7e977f"
/>

Arrow keys, enter, mouse click is working.



https://p-15889dd9-ed47-46db-9411-fa18c1efb2fe-dot-edit.development.webstudio.is/

- [x] - Enter and click
- [ ] - Repeat > N then close menu (later)
- [x] - In case of select item clear cmd `/blabla`
- [x] - Put cursor inside 1st editable block of the new instance
- [x] - Should work only inside editable content

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-12-20 16:21:56 +03:00
Bogdan Chadkin 1fd71f550a refactor: treat remix as runtime overrides for CLI (#4598)
Here removed remix sdk from builder and moved all extra props and meta
to react sdk. This completely decouples components from remix
implementation so we can map other frameworks to these props.
2024-12-18 17:07:03 +07:00
Bogdan Chadkin 7f7a8fd9de refactor: split jsx testing utils into template package (#4604)
We can start using testing utilities for components meta. It will
drastically simplify maintenance of components, already works pretty
well for tests.

Here just replaced @webstudio-is/sdk/testing with
@webstudio-is/template.
2024-12-17 16:54:13 +07:00
Bogdan Chadkin e703bf8926 refactor: drop detect-font (#4581)
Looks like we don't use it for a long time.
Browser style is used only to convert keywords into unit values.
2024-12-13 23:33:52 +07:00
Bogdan Chadkin 4c04c36bcd experimental: support navigator dnd in content mode (#4542)
Ref https://github.com/webstudio-is/webstudio/issues/3994

- upgraded pragmatic-drag-and-drop
- fixed extra level in collections and slots
- render placeholder properly in content mode
2024-12-10 14:07:40 +07:00
Bogdan Chadkin 82d1bd255b build: bump dev deps (#4503)
- prettier
- vike
- vitest
- storybook
- eslint
2024-12-04 16:48:00 +07:00
Bogdan Chadkin 260c903045 build: bump typescript (#4471)
Upgraded typescript to 5.7, removed it from packages to reuse from root
instead and fixed a couple of changes.
2024-11-26 11:59:07 +07:00
Bogdan Chadkin 7b7efd53a2 refactor: bump remix to 2.15 (#4462)
Last release before migrating to react router
2024-11-23 22:27:33 +07:00
Bogdan Chadkin 6123a8ca74 build: upgrade devtools (#4455)
- storybook
- vitest
- eslint
- typefest
- types/node
- vike
- tsx
- pnpm
2024-11-21 21:06:22 +07:00
Bogdan Chadkin 524f83203e refactor: support nanostores as sync objects (#4454)
Here added support for syncing nanostores atoms
as sync objects. Had to add some tracking of update source though it
seems like a more solid solution than previous variant.

Need to test performance caz stores updates are now synchronous and not
debounced anymore.
2024-11-21 18:17:28 +07:00
Bogdan Chadkin bf574fbc47 refactor: add new way to synchronize immerhin stores (#4451)
Here added SyncClient class which will be base for our new sync engine.
For now it can synchronize one immerhin store.

Event emitter is shared with canvas directly to avoid indirection of
iframe postMessage api.

This also partially fixes the issue with messages pollution and conflict
with react devtools.
2024-11-20 21:15:00 +07:00
Bogdan Chadkin 1ac74854e8 refactor: bump to remix 2.14 (#4433)
Ref https://github.com/remix-run/remix/blob/main/CHANGELOG.md#v2140
2024-11-19 15:40:47 +07:00
Bogdan Chadkin d1a8fddb02 build: bring back nanoid to prisma (#4426)
Nanoid was used in very old migrations. Forgot we need to run them all
when setup new db.

Also bumped nanoid version to the latest.
2024-11-15 23:11:54 +07:00
Bogdan Chadkin bb8e41ab57 refactor: migrate builder tests to vitest (#4415)
Really, this was too easy
2024-11-13 14:39:17 +04:00
Bogdan Chadkin cb255932bf refactor: migrate CLI tests to vitest (#4409)
Jest is barely maintained and vitest is blazinly faster.
2024-11-13 01:38:19 +04:00
Bogdan Chadkin b2a844ae01 refactor: bump cookie (#4397)
cookie package now has builtin types
2024-11-10 21:33:14 +04:00
Bogdan Chadkin c54fbe45c4 experimental: fuzzy search tokens (#4396)
Ref https://github.com/webstudio-is/webstudio/issues/1696

Switch to match sorter for more control over results. Now it will try to
match best token in the list of each option.
2024-11-10 02:12:45 +04:00
Bogdan Chadkin a71190a0a8 refactor: drop legacy style engine (#4377)
The only left usage of legacy style engine was collapsed instance logic.
Here inlined necessary code and got rid of the rest.
2024-11-06 14:52:15 +04:00
Bogdan Chadkin 11603f4694 build: bump storybook (#4369)
Storybook is getting smaller.
2024-11-05 17:26:04 +04:00
Bogdan Chadkin 5fbda47b41 refactor: migrate css preview to new style engine (#4353)
Preview now managed by new style engine.

![Screenshot 2024-10-29 at 12 05
25](https://github.com/user-attachments/assets/3017247e-2fc6-4572-bb19-8309067a570d)
2024-11-04 10:36:53 +04:00
Bogdan Chadkin 57fc3b9e73 feat: allow drag and drop in pages (#4358)
Closes https://github.com/webstudio-is/webstudio/issues/403

Now pages and folders can be maintained with drag and drop.



https://github.com/user-attachments/assets/108230ea-95fa-40ac-bbcb-5d0785c5554f
2024-11-04 10:02:29 +04:00