Commit Graph
25 Commits
Author SHA1 Message Date
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
Bogdan Chadkin 7f44d78279 Improve text editor styling and enable auto focus (#504)
Ref https://github.com/webstudio-is/webstudio-designer/issues/107

- fixed bold italic styling
- populate default style for instances created from text editor
- added unmount support to css engine
- auto focus text editor when start editing
2022-11-24 00:07:45 +03:00
Bogdan Chadkin ad04473f26 Migrate packages to native ESM (#493)
Our designer bundle heavily bloated with not analyzable commonjs
generated by typescript.

The biggest problem comes from bundled icons library which esbuild
cannot tree shake because of cjs.

Another issue is broken code splitting. Packages in one piece are appear
in chunks and always loaded even with dynamic import and React.lazy.

To solve this I migrated each package to native node es modules.
Storybook and jest work almost without changes. Though it's not possible
to run remix in esm project (while still esm packages can be bundled for
ssr). And as a result designer jest failed because of cjs tests requires
from esm packages. As a solution I generated additional commonjs
artifacts in lib/cjs.

du -ck public/build
2336
1736
2022-11-23 10:12:58 +03:00
Bogdan Chadkin 50010c7f0d Check all .ts and .tsx in packages src folder (#476)
Here "include" often have list of extensions and forgotten .tsx so such
modules are left unchecked. Replaced with just "src" which consider all
typescript extensions.

Ideally stop using tsc to build artifacts, switch to esbuild and remove
complex configuration from all tsconfig.json.
2022-11-19 21:21:38 +03:00
Oleg Isonen 3cba420fc3 add fonts dep 2022-11-18 14:13:25 +01:00
Oleg Isonen 061df0bc52 css-engine doesn't depend on react-sdk now 2022-11-18 14:02:42 +01:00
Oleg Isonen bda114b4e3 move tree utils again back to project
someone merged them back into app after they were moved to project
2022-11-18 14:01:19 +01:00
Oleg Isonen 7d74fb51ef emove stitches from sdk 2022-11-17 03:39:37 +01:00
Oleg Isonen 80a30a2b20 render fonts using css engine 2022-11-17 03:13:03 +01:00
Oleg Isonen 628081d0fa remove usage of stitches for helper css on canvas 2022-11-16 22:31:01 +01:00
Oleg Isonen 005baac2ed move react hooks from css engine to shared styles, it's too tight with app 2022-11-16 17:38:01 +01:00
Oleg Isonen 42fb00dfbe fix the media rule formatter 2022-11-16 17:04:31 +01:00
Oleg Isonen ab8ecd37de use default media query 2022-11-16 15:41:53 +01:00
Oleg Isonen 1c4dedea94 always require a breakpoint when populating instances 2022-11-15 16:18:36 +01:00
Oleg Isonen 2a0e920725 working version 2022-11-13 20:05:06 +01:00
Oleg Isonen c427316291 css-engine wip 2022-11-13 15:30:27 +01:00
Oleg Isonen e1986382e6 working version of the engine 2022-11-12 17:24:05 +01:00
Oleg Isonen 6269ad2422 wip 2022-11-11 10:24:40 +01:00
Oleg Isonen 27ade6adc7 remodeling 2022-11-11 00:49:31 +01:00
Oleg Isonen f3108b0f57 add one rule 2022-11-10 22:04:00 +01:00
Oleg Isonen 89d9c9aaf6 breakpoints 2022-11-10 21:39:45 +01:00
Oleg Isonen 9a8a3021bf initial css engine 2022-11-10 19:55:38 +01:00