Andras Bacsai
e12b3c0753
fix: type CanvasData
2022-11-23 14:50:38 +01:00
Andras Bacsai
b48d551e64
Merge pull request #491 from webstudio-is/feat/pages-updates
...
Pages update for Edge version
2022-11-23 13:49:44 +01:00
Ivan Starkov
e08aa99c43
[designer] Assets picker ( #444 )
...
ref #196
- Image reverted to ordinary Image
- Added supports of "ordinary" Image `src` selection with the Asset
manager. (The Idea that we save asset + prop value simultaneously, so
"ordinary" controls will work without issues, i.e. in case of the image
we save `prop="src" value="/imagpath" asset={...tonof info here...}`)
- Image optimizations removed (will be created in standalone package in
next PR)
- Now UserProps has type
https://github.com/webstudio-is/webstudio-designer/blob/c36519540c9d3493acfe0dcdd1c118ac4b6196be/packages/react-sdk/src/user-props/schema.ts#L33-L39
- Db type is:
https://github.com/webstudio-is/webstudio-designer/blob/6d5cc571cb4e3bf00ec95f166a0daf9420ef50ac/packages/react-sdk/src/user-props/schema.ts#L4-L10
Next PRs:
1. Restore the Image component with optimizations at standalone package
2. Pass the Image component to SDK and use it instead of the original in
case of optimizations are needed.
2022-11-23 16:15:22 +04:00
Andras Bacsai
b2363b7e2d
move cssengine dependency to package
2022-11-23 09:31:02 +01: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
Andras Bacsai
c7c31b14f6
fixes
2022-11-22 15:53:06 +01:00
Andras Bacsai
af41705e61
fix issues
2022-11-22 14:35:28 +01:00
Andras Bacsai
cefd76d9b7
fix issues
2022-11-22 14:25:09 +01:00
Andras Bacsai
d7db67e461
fix: BuildParams type
2022-11-22 12:08:51 +01:00
Andras Bacsai
81ee438a81
fix projects endpoint
2022-11-22 10:39:23 +01:00
Andras Bacsai
6cf7c35439
simplify http-client & single rest endpoint for publishing
2022-11-22 10:12:43 +01:00
Andras Bacsai
90019fdd63
Merge branch 'main' into feat/pages-updates
2022-11-22 08:50:44 +01:00
Oleg Isonen
42b4ceea77
Stop flicker when hovering instances ( #477 )
...
## Before
https://user-images.githubusercontent.com/52824/202865326-2d8f1c4c-8843-40c9-837d-fd678dbacdaa.mp4
## After
https://user-images.githubusercontent.com/52824/202865322-3ff488c8-eb36-4d4a-9c6f-591a84332ebc.mp4
## 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-11-22 00:40:47 +01:00
Andras Bacsai
1b72e93d3a
Merge branch 'main' into feat/pages-updates
2022-11-21 21:42:10 +01:00
Andras Bacsai
82b8ceafe1
fix: remove unused import
2022-11-21 21:36:01 +01:00
istarkov
c75f3e4f16
Reuse sanitize
2022-11-21 20:31:55 +04:00
istarkov
279e2ec093
Add sanitize
2022-11-21 20:31:55 +04:00
Bogdan Chadkin
47a7bd6e4b
Bump to jest 29 ( #484 )
...
The new version got more readable snapshots, no longer depends jsdom and
has much better esm support (will be enabled in next PR).
Had to switch to babel to support typescript, react and esm for now.
2022-11-21 19:10:18 +03:00
Oleg Isonen
f9ed58fdec
plain text css rule won't add units automatically
2022-11-21 16:34:01 +01:00
Andras Bacsai
07e81efeef
fix: export type BuildParams
2022-11-21 14:07:11 +01:00
Andras Bacsai
76a89f58bd
feat: add rest api for /s/css
2022-11-21 14:05:57 +01:00
Andras Bacsai
2e39bbfd27
feat: move css engine loader to shared folder
2022-11-21 14:05:08 +01:00
Andras Bacsai
43a5889481
merge main
2022-11-21 11:42:38 +01:00
Roman Pominov
559318bd22
Fix a security issue with eval() ( #485 )
...
In the current main if you enter `1+1,alert("hello")` as a value into a
CSS input, you'll see an alert. This PR fixes it.
2022-11-21 13:37:15 +03:00
Andras Bacsai
03583078cb
feat: redesigner loadProject + add new rest api for CSS
2022-11-21 11:00:03 +01:00
Bogdan Chadkin
6719c51f2d
Remove components meta data unused in app ( #481 )
...
Generated .props.json in react-sdk added huge amount of unused data to
app bundle.
Here I loaded only what's used, validated generated data and covered
meta with strict types.
As you can see this heavily reduced app size
du -ck public/build
2800
2336
2022-11-20 19:07:54 +03:00
Oleg Isonen
a2822bcc94
fix uploading indicator position
2022-11-19 20:42:45 +01:00
Bogdan Chadkin
f6e92f2f1b
Find unused variables with typescript ( #474 )
...
Eslint always had issues finding unused variables. And it's usually
required two more plugins beside builtin functionality to handle this
case.
Typescript has this builtin and handles all cases out of the box. Also
it works faster and more responsive in ide than eslint.
2022-11-19 18:45:49 +03:00
Ivan Starkov
0b37ccdefe
[release-fix] Change align-items onto align-self ( #470 )
...
Fixes label align-items onto align-self
Probably in the future this should be used.
`sectionStyle.alignSelf?.styleConfig.label`
2022-11-19 13:52:05 +01:00
Oleg Isonen
669416b732
Merge pull request #471 from webstudio-is/fix_align_content_vis
...
[release-fix] Show align-content only if wrap enabled
2022-11-19 13:51:48 +01:00
Oleg Isonen
fa9129f4aa
Merge pull request #472 from webstudio-is/fix_gray
...
[release-fix] Flex gap icon is not button
2022-11-19 13:51:33 +01:00
Bogdan Chadkin
f4f2a08eb1
Fix styles when enter editor mode ( #469 )
...
Styles were lost when refactored with new css engine. Here used the same
way as with className before but instead set data-ws-id attribute. Did
not add data-ws-component to avoid selecting.
Fixed text toolbar background for dark mode.
2022-11-19 15:22:31 +03:00
istarkov
489b752d38
Flex gap icon is not button
2022-11-19 10:41:19 +00:00
istarkov
c57bebfae8
Show align-content only if wrap enabled
2022-11-19 10:25:02 +00:00
Bogdan Chadkin
b163fdfa76
Use floating-ui to position text toolbar ( #467 )
...
Ref https://github.com/webstudio-is/webstudio-designer/issues/107
Text toolbar is badly positioned when flipped up. Keeping it too close
to cursor makes text selection harder.
Here I replaced custom logic with computed rect from toolbar parent and
state from canvas. A few middlewares polished offsets. Flip no longer
overlap text.
Also fixed toolbar background.
Hide toolbar while selecting text with mouse.
2022-11-19 10:51:31 +03:00
Oleg Isonen
f327c46526
Merge pull request #461 from webstudio-is/move-css-data
...
Move css-data to a package
2022-11-18 16:06:17 +01:00
Oleg Isonen
2d849e3093
refix without additional text node
2022-11-18 15:31:32 +01:00
Oleg Isonen
8434b39d79
lint
2022-11-18 15:18:32 +01:00
Oleg Isonen
74876bd9ad
fix unit font
2022-11-18 15:05:28 +01:00
Oleg Isonen
c018c57487
Merge branch 'main' into move-css-data
2022-11-18 14:01:31 +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
Roman Pominov
6542a20e47
Restrict some prefixes for page paths ( #462 )
...
Fixes #449
2022-11-18 14:53:28 +03:00
Oleg Isonen
06d5658b01
Merge branch 'main' into move-css-data
2022-11-17 22:25:08 +01:00
Oleg Isonen
33160e6632
move css-data to a package
2022-11-17 21:12:39 +01:00
Oleg Isonen
1c51ea0da0
Merge pull request #460 from webstudio-is/remove-width-constant
...
Remove PANEL_WIDTH constant, use token
2022-11-17 16:47:42 +01:00
Oleg Isonen
05a70c95a8
remove PANEL_WIDTH constant, use token
2022-11-17 15:40:22 +01:00
Oleg Isonen
df334caeb6
use loContrast for color
2022-11-17 15:22:20 +01:00
Oleg Isonen
87f8687776
tweak page settings animation
2022-11-17 15:19:20 +01:00
Roman Pominov
a0363cb899
create -> create page (as in figma)
2022-11-17 16:44:43 +04:00
Roman Pominov
53dccae7ec
minor
2022-11-17 16:27:43 +04:00