71 Commits
Author SHA1 Message Date
Ivan Starkov d396142f2a Update npm packages (#1073)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-02-18 12:34:33 +03:00
Oleg Isonen 29f3839456 Make css helper tool for collapsing prevention on canvas really smart (#1059)
Closes https://github.com/webstudio-is/webstudio-builder/issues/604

## Description

-  User can now override helper definitions on canvas
- only boxes that would collapse without helper -  receive helper
- helper is removed when any CSS property is changed on that instance
that would prevent collapsing, so that helper can be removed
- Helper doesn't show on the preview or publish
- Helper goes away if an instance inserted as a child
- There is no need to set padding-right or padding-bottom if you just
need a small div with a defined or layout-based size, as soon as div is
not collapsing, helper is not applied

More: padding will be only added on the side that would collapse
otherwise.
For example when I add a div, it is a block element, it grows
automatically full width but has 0 height, in this case spacing heloper
with padidng-top: 50px will apply, so that it doesn't collapse.
If user sets height: 100px or does anything that would give it a height
- we remove the helper padding right away, so user can actually see the
height they set

In other words we prevent elements from collapsing when they have 0
height or width by making them non-zero on canvas, but then we remove
those padding universally without shortlists as soon as element doesn't
collapse.

## Steps for reproduction

1. add a box
2. set padding-top
3. see it applies on canvas

1. add a box
2. set width
3. see the exact width on canvas, no helper padding


1. add a box
2. set height
3. see the exact height on canvas, no helper padding

## Code Review

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

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-02-17 20:46:12 +01:00
Ivan Starkov 7f624d189e Update npm versions (#1053)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-02-16 18:52:15 +03:00
Ivan Starkov 0bcee28c59 Add lib to files section of package.json of generate-arg-types (#1049)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-02-16 16:24:07 +03:00
Ivan Starkov 09e1f3c46e Move generate-arg-types as dependency link of sdk (#1047)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-02-16 16:52:14 +04:00
Ivan Starkov 76c3c68054 Make @webstudio-is/generate-arg-types public, update versions (#1046)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-02-16 15:20:57 +03:00
Ivan Starkov 89a95c468b Update NPM versions (#1045)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-02-16 14:57:27 +03:00
Andras Bacsai ac413cdd5f rename designer to builder 2023-02-14 11:15:24 +01:00
Ivan Starkov 2f1ba03544 Update typescript (#1025)
## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-13 23:19:11 +03:00
Ivan Starkov 4848f43a07 Update NPM packages (#1022)
## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-13 17:06:16 +03:00
Ivan Starkov 034156e628 Update npm versions (#1018)
## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-13 15:45:08 +03:00
Ivan Starkov 7a44059fbb Enable using css functions in CssValueInput (#1014)
## Description

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

Enable using css functions in CssValueInput 
closes #990 

## Steps for reproduction

Add 
`blur(2px)` or 
`drop-shadow(16px 16px 20px blue)` or 
`blur(2px) drop-shadow(16px 16px 20px blue)` to the filter field

It should work.


## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-13 14:41:32 +04:00
Oleg Isonen 525e6e384d Support for variable fonts (#1007)
Closes https://github.com/webstudio-is/webstudio-designer/issues/994

## Description

Variable fonts were treated like normal fonts, so we were only showing
one default font weight as available.
Now we not only detect variable fonts, but we also save all the meta
data we get from them, so we can add a variable font settings UI in the
future, which is a huge deal for designers, because variable fonts offer
very interesting styling options and animations

## Steps for reproduction

1. select instance
2. font family, upload variable versions fonts like Monrope, Inter or
Roboto Flex
3. see you can choose any font weight
4. use any styles on the font e.g. italic etc 

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

- [ ] 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-12 21:34:38 +01:00
Ivan Starkov 13afe43cc5 Update ussets and project (#985)
## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-10 13:39:35 +03:00
Ivan Starkov 2012428327 Update ver 0.26.0 (#984)
## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-10 14:12:21 +04:00
Ivan Starkov 58ae2f49b2 Update npm packages (#982)
## Description

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

Update npm packages

## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-10 12:21:59 +03:00
Ivan Starkov cc447fbc63 Update packages (#934)
## Description

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

I want to update saas based on #928

## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-03 11:41:41 +03:00
Ivan Starkov b05a36defe Update versions (#920)
## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-02 13:02:49 +04:00
Bogdan Chadkin 6ca1f7088a Bump packages (#814)
Let's release
2023-01-19 13:08:32 +03:00
Bogdan Chadkin 6f5a0bcfbc Bump packages (#805)
Let's release
2023-01-18 14:06:44 +03:00
Bogdan Chadkin 7d90c3f56c Bump packages (#753)
Gonna be big release.
2023-01-06 17:31:39 +03:00
Oleg Isonen 9dfef774e3 Add a stylesheet name for easier debugging (#731)
## Description

Multiple style elements are easier to differentiate when they have some
hint on the purpose

## Steps for reproduction

1. select style element on canvas, see data-webstudio attribute with a
name

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)

## Before requesting a review

- [x] made a self-review
- [x] 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)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [x] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-03 21:39:25 +01:00
Ivan Starkov 6150dc0599 Background image DB support (#701)
## Description

ref  #534

Next PR #705

Db support for ImageValue style.
Having that ImageValue can contain assets we need to transform assets to
`assetId` and back during save/load.

`zod + dataloader` is used for transform for simplicity, allows avoiding
tree traversal, and highly simplifies code.

_I want to merge it to not make one huge PR, it has no breaking changes,
just a new feature save/load support_

## Steps for reproduction

## Code Review

- [x] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
- [x] hi @TrySound, I need 
 - detailed review (read every line)

## Before requesting a review

- [x] made a self-review
- [x] 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)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-27 13:17:22 +03:00
Ivan Starkov 3ef9b92126 Bump versions (#693)
## 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-24 20:20:07 +03:00
Bogdan Chadkin 845d53981c Improve packages publish (#676)
- all workspace dependencies are use with `workspace:^` protocol which
on publish is replaced with `^VERSION`. This will let us to upgrade
transitive packages in saas without shaman dancing around package.json
and lockfile.
- publish-to-npm script is replaced with `pnpm -r publish` which
recursively publishes all packages if version does not exist in npm
- dropped yarn lockfile
2022-12-22 17:06:27 +03:00
Bogdan Chadkin b3c87af7c1 Migrate to pnpm for package management (#641)
- setup corepack for pnpm and forbid yarn usage with "engines" field
- converted yarn lockfile into pnpm lockfile with `pnpm import` command
- replaced yarn with pnpm in scripts and github actions, had to use
custom cache to support corepack

This PR is only migration. Will use new pnpm features in other PRs.

```diff
du -ckd1 node_modules (yarn)
- 1125032

du -ckd1 node_modules/.pnpm
+ 857456
```

Install time (including cache downloads) in github actions reduced from
42s to 23s


## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [x] conceptual
  - [X] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-22 12:16:13 +03:00
Bogdan Chadkin 7019d50b30 Bump packages versions (#672)
Let's release
2022-12-21 17:43:33 +03:00
Mateusz Burzyński 86292353bc Unify Storybook config (#585)
This PR moves most of the Storybook configs into a single, private,
package that can be imported/required by your packages. It aims to keep
the config the same for all of them as much as possible - so, for
example, all of the packages are now using Webpack 5 in their
Storybooks.
2022-12-17 21:50:59 +01:00
Bogdan Chadkin ff7c1c923e Install missing deps with types (#647)
In https://github.com/webstudio-is/webstudio-designer/pull/646 I checked
with build. Now found more issues with typescript.

Also forgot to migrate to jest/globals "project" package.
2022-12-17 11:41:34 +03:00
Bogdan Chadkin 752768abbc Use explicit imports from @jest/globals (#645)
pnpm prevents access to jest and @types/jest from packages so we need to
explicitly install it. Though @types/jest is not officially maintained
and often late for months with new major which bloats node_modules with
two versions of jest transitives.

Here is alternative way to use official types. The only downside is
complains these types has less descriptions.
2022-12-16 16:35:22 +03:00
Bogdan Chadkin d05b1bc21f Resolve tsconfig package (#643)
While migrating to pnpm I got an issue with our extends relying on
node_modules. pnpm have only symlinks and do not have hoisted
node_modules in the root.

Here I switched extends to package name as all tools can resolve it and
tweaked remix tsconfig to extend from packages folder instead of
node_modules.
2022-12-16 13:09:33 +03:00
Ivan Starkov af90b31945 Bump versions (#616)
## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [ ] conceptual
  - [ ] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-12 23:56:10 +03:00
Bogdan Chadkin aba5506e13 Add proprety reset button in popover (#583)
Ref https://github.com/webstudio-is/webstudio-designer/issues/29

<img width="281" alt="Screenshot 2022-12-10 at 12 03 54"
src="https://user-images.githubusercontent.com/5635476/206842519-5812b7d5-2c60-4941-93a7-8a980f6abae0.png">
2022-12-12 15:11:24 +03:00
Ivan Starkov 12a3da3140 Bump versions 2022-12-12 14:17:23 +03:00
Ivan Starkov 6cc2847cf6 Bump versions (#582)
For easier version change next time, now all has same version.
2022-12-09 21:52:10 +04:00
Ivan Starkov 2be8511780 Add new RGB Style, then fix typescript errors (#578)
The reason of use opaque types, as otherwise props like `value` reused
everywhere.



Implemented same as CssValueInputLogic - during input editing nothing
changed.
Error is shown on Enter click. Value resetted on blur.
2022-12-09 20:31:20 +03:00
Oleg Isonen 6c9839d4f8 apparently Infinity - Infinity is NaN 2022-12-09 11:26:14 +00:00
Oleg Isonen c625298605 Merge branch 'main' into fix-media-query-specificity 2022-12-09 11:01:53 +00:00
Oleg Isonen df72608b2d fix the sort order when minWidth is undefined 2022-12-09 10:45:06 +00:00
Andras Bacsai a995647084 fix:eslint, bump versions 2022-12-09 09:26:52 +01:00
Oleg Isonen 8c02d46bb1 fix media query specificity 2022-12-09 01:05:59 +00:00
Andras Bacsai 27469787a0 fix eslint 2022-12-08 13:21:37 +01:00
Ivan Starkov cb7f22f7a4 Bump packages versions (#566)
## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [ ] conceptual
  - [ ] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-07 22:31:38 +04:00
Ivan Starkov ffae4bd403 Make CSSValueInput controllable, (#551)
CSSValueInput used useEffect and executed onChange etc events on its
own. What in case of any small changes caused loops and strange
behavior. Now should execute everything only as a result of user input.

`parseCssValue` - now stupid parse CSS value and someday will be used
only inside text-control.
setProperty - now accepts StyleValue, the string param is deprecated,
warning set.

CSSValueInput now not update styles during editing.

unit menu now not hiding during formulas etc

fixed bug with updating style on newly created items

fixed scrub bugs with unsubscribing

css-tree Adds 52101 gzip bytes. 
A lot of size is coming from here 

https://github.com/csstree/csstree/blob/97d7f3b95a3efd8f431af39986acc149dceefa59/lib/data.js
more than 1/3 of `esm` size (20+kb gz), and most huge are properties
json we need and use.

Doesn't look tree-shakeable, anyway can be loaded lazily as until
editing we don't need to validate CSS vars.

Investigating: 
- [x] - Changing any style Combobox with mouse cause multiple value
updates to previous and current value (was a blur event issue)
2022-12-07 14:32:34 +04:00
Bogdan Chadkin 6b761bb000 Replace tsc with esbuild to build packages (#543)
Build of whole monorepo without cache takes 1min or more on my laptop.
tsc is very slow tool for this. Also having rootDir in tsconfig prevents
checking outside of src folder.

Here I added "scripts" package with "build-package" bin. It does both
esm and cjs builds. --watch flag support completely replaces tsup for
us.

Now full rebuild of monorepo without cache takes only 10s including
prisma-client, http-client and designer builds.
2022-11-29 10:04:25 +03:00
Bogdan Chadkin 3e96357a2c Use sources as type deifnitions (#539)
Right now our build and CI take a lot of time. 1:40min - 2min on CI and
1min locally. We spend time on vercel, on main CI, on publish and
locally.

At the moment in packages anything outside of src folder is not checked
because of rootDir.

We have to generate "references" field on precommit.

All these issues can be avoided if remove .d.ts generation completely
and specify sources in "types" field. This way we get zero build time
for types and can switch to other build tool (like esbuild) for .js
generation and get almost instant build on vercel, on main CI and on
publish.

Downsides

- it can be slower (actually not really caz we delete .tsbuildinfo cache
anyway and we can still generate it with incremental flag)
- it contraditcs recommended practices for published packages (we can
generate .d.ts in publish script only and use "types" as source
internally)
2022-11-28 22:27:56 +03:00
Bogdan Chadkin a8f1f407b7 Bump saas packages (#527)
Added publish script to image package and bumped everything changed
since latest bump by checking `git log -1 -- .`
2022-11-27 13:48:26 +03:00
Oleg Isonenandistarkov 4c8989784b Primitive tokens (#507)
https://github.com/webstudio-is/webstudio-designer/issues/494

This PR Renders this UI and, when adding tokens - renders CSS variables
on the canvas: It's behind a feature flag.

<img width="411" alt="Screenshot 2022-11-25 at 15 51 00"
src="https://user-images.githubusercontent.com/52824/204009859-81ed72c4-e758-4973-be49-c8c65e6b4661.png">


## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [ ] conceptual
  - [ ] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory

Co-authored-by: istarkov <istarkov@gmail.com>
2022-11-25 19:51:54 +01:00
Bogdan Chadkin 18d28b50cb Bump sass deps
We need to bump all sass deps to get esm support
and treeshake bundled code.
2022-11-24 20:59:41 +03:00
Bogdan Chadkin 16984b8bf7 Improve packages auto publish (#508)
Current solution often fails with

> You cannot publish over the previously published versions

Here I added small script which compares committed version and version
on npm and publish if do not match.

All scripts are run by turbo. So publishing new package is just changing
package script now.
2022-11-24 16:00:24 +03:00