332 Commits
Author SHA1 Message Date
Oleg Isonen e9a3a1ac00 feat: Support any media query condition as a breakpoint (#5547)
## Description

- [x] add a list of conditions
- [x] allow other units for min/max

## 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
2026-01-04 18:48:45 +01:00
Bogdan ChadkinandOleg Isonen 21bce61052 feat: support modern color spaces in color inputs (#5465)
Ref https://github.com/webstudio-is/webstudio/issues/3574

Here improved css value parser to parse and store any color space.
oklch(), hsl(), color() and others can be used in any color input. Color
picker converts to rgb on the fly and do not support any other color
space at the moment.

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-12-01 02:34:46 +03:00
Bogdan Chadkin 8d14d1b5e3 refactor: generate modern color syntax (#5456)
Ref
https://github.com/webstudio-is/webstudio/issues/3574#issuecomment-3529164146

Here added ColorValue to styles schema.
toValue now generates modern syntax like rgb(0 0 0 / 0.5) for both color
and rgb values.
2025-11-23 23:26:37 +03:00
Oleg Isonen d5aabf8920 chore: Cleanup storybook structure (#5457)
## 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-11-23 20:25:10 +01:00
Bogdan Chadkin 4abb7cf3e2 feat: support svg properties in style panel (#5332)
Ref https://github.com/webstudio-is/webstudio/issues/5258

Newer mdn-data contains all stylable svg properties (they finally got
through some documentation and implementation process).

Tweaked all experimental stuff and ditched obsolete properties.

<img width="286" height="538" alt="image"
src="https://github.com/user-attachments/assets/1e579be0-0a12-4013-ab04-09d5e008aeed"
/>
2025-07-18 18:04:26 +02:00
Bogdan Chadkin 3506fe881f feat: add element component (#5231)
Ref https://github.com/webstudio-is/webstudio/issues/3632

Here unflagged element component in components panel and html paste.

Additionally

- migrate link template to html element
- added :local-link state to links which is replaced with
[aria-current=page] when css is generated, sadly not yet supported in
any browser
- migrated many templates from legacy components to html elements
- put tailwind paste behind flag
2025-05-25 14:26:40 +03:00
Bogdan Chadkin 452c50a41a refactor: upgrade vite for vitest and storybook (#5165)
Tough cookie. There is a problem with resolving react-remove-scroll,
figured it by reducing allowed amount of server conditions.
2025-04-29 14:17:42 +04:00
Bogdan Chadkin 11bb528ed6 feat: support css variables in shadow properties (#5032)
Closes https://github.com/webstudio-is/webstudio/issues/4939

Added css variables support with autocomplete in text-shadow and
box-shadow properties.

Extended our ast with new "shadow" value to properly represent variables
in shadow properties. Though parser still cannot extract variables from
value with variables and falls back to "unparsed" value.

<img width="542" alt="Screenshot 2025-03-23 at 00 45 03"
src="https://github.com/user-attachments/assets/2493d925-3199-4257-b9e8-dc69daa27324"
/>
2025-03-25 23:10:03 +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 b14676bfd6 refactor: simplify css value input sizes (#4997)
- removed non-unit values from browser styles
- merged browser styles and unit sizes into single store; both objects
used in cize conversion
- use typed cssom to parse units instead of custom parser (sorry
firefox)
2025-03-14 20:59:57 +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
Ivan Starkov ca4b0f89bc experimental: Animation publishing (#4976)
## 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-03-11 11:19:01 +05:00
Bogdan Chadkin 3c8ac56c39 refactor: migrate properties data to hyphen case (#4970)
properties data are now more type safe and can accept any CssProperty
name though in case of custom properties (--string) will return
undefined.

This also removes a lot of `keyof typeof properties` castings.
2025-03-08 20:26:40 +07:00
Oleg Isonen 5ba9dc38a8 experimental: Reusable css editor (#4945)
## Description

For using in animations UI we need a reusable css editor.

## Steps for reproduction

This PR should not have changed how advanced section works at all. This
is pure refactoring.

## 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-03-05 16:52:21 +01:00
Bogdan Chadkin 0889342c33 refactor: switch to hyphenated preset styles (#4930)
Replaced camel case with kebab in all presets
2025-03-04 17:26:32 +07:00
Oleg Isonen 7b01153f67 experimental: Shorthands autocomplete (#4898)
ref https://github.com/webstudio-is/webstudio/issues/4816

## Description

Shows shorthands in autocomplete when adding properties.

## 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-26 16:45:20 +01: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 78a0fa98c1 refactor: output hyphenated properties from css parser (#4900)
We are going to switch to hyphenated properties in styles. Here
refactored css parser to output hyphenated property instead of camel
case and added camelCaseProperty utility which does the opposite of
hyphenateProperty.
2025-02-22 18:11:57 +07:00
Oleg Isonen 7d74ea075c chore: Unreleased bugs with advanced section (#4882)
## Description

- [x] Can't click a property on main in advanced

https://github.com/user-attachments/assets/a2446685-e7dc-4c01-bf03-4ee64b8f5e16
- [x] looks like property name validation is broken. I add "dispaaayyy"
and it accepeted


## 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-18 13:20:37 +01: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 1899e6bace refactor: drop error-utils (#4822)
Unnecessary package we build, publish and maintain. What it really does
is check for never which can be done with simple `satisfies` operator.
2025-02-03 15:29:16 +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 c8c1268002 build: drop legacy publish action (#4525)
One less action on every commit in master.
Made version placeholder more abstract "0.0.0-webstudio-version"
2024-12-06 19:51:08 +07:00
Bogdan Chadkin 1d9157bb34 build: publish CLI 0.191.0 to npm (#4522) 2024-12-06 17:27:53 +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 6123a8ca74 build: upgrade devtools (#4455)
- storybook
- vitest
- eslint
- typefest
- types/node
- vike
- tsx
- pnpm
2024-11-21 21:06:22 +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 50ca393e73 build: publish CLI 0.189.0 (#4395) 2024-11-09 18:43:55 +04:00
Bogdan Chadkin d61945402c build: upgrade to typescript 5.6 (#4345)
Only some apis added to types.
2024-10-28 12:17:43 +03:00
Bogdan Chadkin 0c25e5028b feat: preview variable values in autocomplete (#4336)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here added 2 things to improve accessibility of variables for users

1. Added color and unit values preview in autocomplete list
2. Color inputs no longer autocomplete unit values and unit inputs no
longer autocomplete color values.

![Screenshot 2024-10-24 at 00 40
15](https://github.com/user-attachments/assets/2406460c-ad68-4657-97ea-0abc4080ce2f)
![Screenshot 2024-10-24 at 00 35
49](https://github.com/user-attachments/assets/36c68bb7-9365-4914-bf3d-4324be7fae96)
2024-10-24 12:26:27 +03:00
Bogdan Chadkin 8d7cf574fc fix: generate text-wrap-style: auto (#4321)
Fixes https://github.com/webstudio-is/webstudio/issues/4218

Turned out text-wrap-style got removed but supported alternative
text-wrap: wrap was not generated instead.
Now all should work.

Also removed invalid text-wrap-mode: auto
2024-10-20 11:50:41 +03:00
Bogdan Chadkin d29065b7fe build: publish 0.185.0 (#4286) 2024-10-14 22:13:18 +03:00
Bogdan Chadkin af931ac3c0 experimental: improve repeated styles with css variables (#4275)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here added a few improvements to repeated style to handle variables
properly. For now all changes affects only backgrounds section.

- single layer can use css variable with multiple gradients
- with multiple layers each can have css variable with single gradient
- when single variable inside multiple layers has multiple gradients all
thumbnails become transparent, it should be and indicator of invalid
gradients
- fixed toggling hidden considering variables
- fixed deleting layers considering variables
- now when single layer has variable with multiple gradients only first
gradient can be deleted or toggled
2024-10-13 22:19:47 +03:00
Bogdan Chadkin 666b7e3efb refactor: support css vars in repeated values (#4255)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here added support for computing css variables inside layers and tuples
to support cases like

```css
transition-timing-function: var(--ease), var(--ease-in);
```
2024-10-09 16:19:55 +03:00
Bogdan Chadkin 26d7e041c3 experimental: preview css variables on highlight in combobox (#4224)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here relaxed converting to css variables for fast preview in canvas. Now
variables can be used as fallbacks for preview variables.

![Screenshot 2024-10-05 at 23 59
53](https://github.com/user-attachments/assets/e6ef71b5-c71e-4e75-9696-eb9faf616a8b)
2024-10-06 12:46:00 +03:00
Bogdan Chadkin bbf37d3e61 refactor: simplify var value fallbacks (#4201)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Initially css variable fallback was defined in schema as array though
it's actually a single value by spec and may contain commas. We don't
have css variables in data yet so should be safe to change schema before
too late.
2024-10-02 18:05:05 +03:00
Bogdan Chadkin c05ccdd851 experimental: generate root styles for published sites (#4177)
Ref https://github.com/webstudio-is/webstudio/issues/3399

- render layout hack (display: grid; min-height: 100%) as root preset
styles
- generate root user styles on published sites
- moved typography preset from body to the root
- bumped a couple of deps

<img width="240" alt="Screenshot 2024-09-28 at 23 25 08"
src="https://github.com/user-attachments/assets/eaf7476e-f488-4f1f-89db-6d464c05b35f">
2024-10-01 13:54:10 +03:00
Ivan Starkov 334caf4ec6 build: CLI release 0.182.0 (#4172)
## 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:
5de6)
- [ ] 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-09-27 20:52:28 +03:00
Oleg Isonen 0ff51ebfad fix: allow user to define a custom font stack (#4153)
## Description

Previously defining a custom stack - comma separated list of fonts, was
broken, we only used the first font

## Steps for reproduction

1. comma separated fonts, more than one
2. see that its rendered in dev tools and that we don't add a default
fallback to it

## 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:
5de6)
- [ ] 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-09-24 18:23:18 +02:00
Bogdan Chadkin 632a9ee2e3 build: publish 0.181.0 (#4147)
Here fixed node version in publish dialog and published cli packages.
2024-09-23 13:15:42 +02:00
Oleg Isonen 654c1345b1 fix: fix unknown font family support (#4136)
## Description

Last pr introduced a regression when font family is used that isn't in
the stakcs

## Steps for reproduction

1. type a random font family
2. expect it to land in the dom

## 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:
5de6)
- [ ] 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-09-18 22:43:04 +02:00
Oleg Isonen 30981bd019 feat: add modern system font stacks (#4123)
Closes https://github.com/webstudio-is/webstudio/issues/4121

## Description

We discovered this repository of awesome system fonts with fallbacks,
well organized.

https://github.com/system-fonts/modern-font-stacks

Assumption here is that most people don't actually need a very specific
font rendered, but rather need a type of a font and they are perfectly
fine with fallbacks, but without this awesome, tested fallbacks list,
how can you know which fallback to use.

With this we will encourage more people to use system fonts.

<img width="482" alt="image"
src="https://github.com/user-attachments/assets/2253c198-284b-4e3e-bbc2-44fa9af3c14b">


## 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:
5de6)
- [ ] 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-09-18 21:51:08 +02:00
Ivan Starkov 1e615a18fc build: CLI release (#4079)
## 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:
5de6)
- [ ] 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-09-07 23:39:43 +03:00
Bogdan Chadkin ae1e72051c build: publish 0.175.0 (#4054) 2024-09-02 22:55:05 +02:00
Jaya Krishna Namburu e5ec6a1475 feat: add offset-position and offset-anchor properties under advanced section (#3970)
fixes #3963 

## Description
Adds `offset-position` property to be available under the advanced
section. Of all the `offset-*` properties. Looks like only `position` is
marked as experimental in `mdn-data`. But, according to can-i-use. It
seems it has a fair amount of support among browsers.
https://caniuse.com/mdn-css_properties_offset-position
![Screenshot 2024-08-20 at 11 44
59 AM](https://github.com/user-attachments/assets/ab080a22-4e94-453a-8587-38be95cc83dc)


## Steps for reproduction
- Add `offset-position` property under the advanced tab.
- check for description of the property.
- Ability to reset the property from the advanced tab.

## Code Review

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

## Before requesting a review

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

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
2024-08-21 13:05:10 +02:00
Jaya Krishna Namburu 679b98d4ef experimental: return empty values for hidden keyword properties (#3879)
## Description

This PR helps in returning empty strings for keyword values which are
hidden from the UI. This support is needed in #3802 backface-visibility
in transforms

## 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

- [x] made a self-review
- [x] added inline comments where things may be not obvious (the "why",
not "what")
2024-08-05 13:48:03 +02:00
Oleg Isonen 918ca2fa6f feat: Custom font family (#3845)
Closes https://github.com/webstudio-is/webstudio/issues/3817

## Description

This allows to enter any font family as well as adds safe default
chinese fonts.

Todo
- [x] use combobox
- [x] allow preview on hover
- [x] allow user to type fallback via comma, don't add a fallback to a
custom font
- [x] validate input?
- [x] add fonts
- [x] add global values

## 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:
5de6)
- [ ] 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-08-01 18:12:13 +02:00
Bogdan Chadkin 60159b894f build: publish 0.174.0 (#3829) 2024-07-30 16:01:35 +02:00