Commit Graph
3073 Commits
Author SHA1 Message Date
Bogdan Chadkin c2ac8ed354 Allow to reset drop target (#1541)
Here I allows to return undefined in swapDropTarget. This enables us to
reset drop target when move cursor out of droppable elements.

For example before Body was always selected as drop target. Though this
behavior prevent us from restricting parents for cases like Tabs>Tab and
List>ListItem.

Also got rid from emulatePointerAlwaysInRootBounds which was used to
workaround that fallback to Body. So now no longer necessary too.

https://user-images.githubusercontent.com/5635476/235142653-48b95ebe-9714-44c4-90d9-b69b930f2379.mov
2023-04-29 13:22:18 +07:00
Oleg Isonen 35b01e5e68 Implement breakpoints popover design (#1534)
Part of https://github.com/webstudio-is/webstudio-builder/issues/1407

## Description

Implements design changes from
https://www.figma.com/file/xCBegXEWxROLqA1Y31z2Xo/%F0%9F%93%96-Webstudio-Design-Docs?node-id=3719-47947&t=IyN7o4sC7xAxaPNG-4

- new List and ListItem primitive components just for keyboard
accessibility
- deprecated List and ListItem we had before because they are only
useful in asset manager and we already learned how we want to treat
keyboard differently

## Code Review

- [ ] hi @rpominov, 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-04-28 20:36:02 +02:00
Roman Pominov 3ebf8fe9c3 Update Flex-child icons (#1540)
## Description

Updated icons in the Flex-child section:
https://github.com/webstudio-is/webstudio-builder/issues/1411#issuecomment-1527085455

Closes #1411
2023-04-28 15:52:18 +03:00
Ivan Starkov 70746774bf Release 0.61.0 (#1539)
## Description

Release 0.61.0
Npm packages update

## 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-04-28 09:36:56 +04:00
Bogdan Chadkin 5595742f75 Insert styles from embed template (#1538)
Now embed templates can define simplified version of our styles which is
useful for radix components and as AI output.

```
styles: [
  {
    property: 'backgroundColor',
    value: { type: 'keyword', value: 'red' }
  }
]
```
2023-04-28 12:07:10 +07:00
Roman Pominov ee17f1416a Fix: can't delete a form element from canvas (#1537)
## Description

Fixes bug:

- select an Input instance by clicking on it on canvas
- press backspace to delete it
- nothing happens
2023-04-27 15:58:03 +03:00
Bogdan Chadkin c60ee0af07 Show initial and html style in style panel (#1533)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1067

We need to move away from getComputedStyle for not local styles in style
panel.

Here added default html style from browser sources. Now we can render it
and properties initial styles instead of computed styles.

Also fixed in properties data generation currentcolor -> currentColor
and removed same from border presets.
2023-04-27 17:06:38 +07:00
Ivan StarkovandOleg Isonen 5ba6c25565 Units menu in css value input (#1524)
## Description

closes #1464


- [ ] rename "UnitMenu" to just "Menu" because we are going to bring in
some keywords _I think it's still mostly unit menu, and having that for
keywords only values we have keywordButtonElement I would prefer to keep
current name_
- [x] 1. put in the menu the most popular units/keywords to keep it
short and usable in this order:
    "-",
    "px",
    "%",
    "em",
    "rem",
    "dvw",
    "dvh",
    "auto",
    "normal",
    "none"
- [x] 2. add "auto" , "normal" , "none" to properties that support these
keywords into the menu
- [x] 3. use "-" when value is unit-less (detect unitless value from
mdn-data)
- [x] 4. use "-" when keyword value is selected
- [x] 5. allow any unit to be typed even if its not in a menu, when its
typed and user hits enter - we show it as a unit, just not part of the
menu
- [x] adjust margin for keywords menu to 2px from the bottom edge of the
input

## Steps for reproduction

Open width style. Set value 0, see menu
<img width="166" alt="image"
src="https://user-images.githubusercontent.com/5077042/234040113-1780a843-b773-44c3-9e90-56c77b9ecc7f.png">

Set value 10px, see menu 
<img width="141" alt="image"
src="https://user-images.githubusercontent.com/5077042/234040280-c7690bf0-00d5-44a4-b8a9-a07bf31f5625.png">


Set value `10vw`
see menu
<img width="150" alt="image"
src="https://user-images.githubusercontent.com/5077042/234040386-a7ed6f40-a0c7-433f-a500-df5c5ac1938f.png">


Set value `Auto` see menu

<img width="140" alt="image"
src="https://user-images.githubusercontent.com/5077042/234051716-a76a3cce-e56e-4842-bad9-ca7905ce2382.png">

When menu is closed see

<img width="120" alt="image"
src="https://user-images.githubusercontent.com/5077042/234052911-23306652-0cf1-4a54-9c2b-2b33c4d20f15.png">

Set "Inherit"

see menu

<img width="165" alt="image"
src="https://user-images.githubusercontent.com/5077042/234052792-304b1de6-8d5c-4e23-92aa-42a34da47631.png">

see Position its still a keyword

<img width="232" alt="image"
src="https://user-images.githubusercontent.com/5077042/234053175-68c892f2-332a-4938-a4b5-928d7a30fe32.png">








## Code Review

- [x] 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")

## Before merging

- [x] 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
- [x] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-04-27 14:00:29 +04:00
Bogdan Chadkin 2017153253 Migrate preset styles to array of declarations (#1531)
Before preset styles used `{ tag: { property: value } }` format. Now we
are switching to `{ tag: [{ state,property,value }] }` to support
specifying states in preset styles.

Same format will be used for embed template styles.

Here switched only format. States in preset styles not supported in
builder yet.
2023-04-26 18:59:31 +07:00
Roman Pominov 776ed3bedb Flex section fixes (#1506)
## Description

Ref. #1411 (Not everything is fixed yet, only what is checked. Will fix
the rest in a separate PR.)

1. Updated Icons
2. Fixed geometry of the grid control
3. (!) Removed ability to set certain values as specified in the issue
and in Figma:
   - `display: inline-flex`
   - `flex-direction: normal, *-reverse`
   - `justify-content: normal`
   - `align-items: normal`
   - `align-content: normal`
   - `flex-wrap: normal, wrap-reverse`
4. Replaced dropdown with a toggle button for `direction` and `wrap`
5. Used toggle button for the gap link control
6. Fixed layout of controls

## Steps for reproduction

1. Choose `display: flex` on the Layout section in style panel
3. See the changes from the list above
2023-04-24 20:13:59 +03:00
Bogdan Chadkin 0f615afd01 Add props support in embed template instances (#1519)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1516

This will allow further customization of react components through meta
2023-04-23 00:47:44 +07:00
Bogdan Chadkin 30be97deef Allow to specify tree template in component meta (#1517)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1516

Here added new utility "tree template" to describe children in component
meta and generate instances from it while inserting.

Added simple template to form component as example.
2023-04-22 23:20:39 +07:00
Bogdan Chadkin e1fa2075a5 Enforce server constraints for packages (#1507)
Ref
https://remix.run/docs/en/1.15.0/guides/constraints#server-code-pruning

Remix use NAME.server.ts extension to enforce omitting module from
client bundles. Though we heavily used `/server` in packages which had
no affect and blocked us in using a few node apis which were not
polifilled with empty modules while bundling for client.

Here I replaced `/server` with `/index.server` and removed all legacy
server entry points which are not longer necessary with new typescript
resolution.
2023-04-22 09:14:14 +07:00
Ivan StarkovandBogdan Chadkin 99e0648dd4 npm release 0.60.0 (#1513)
## Description

Npm update 0.60.0

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

Co-authored-by: Bogdan Chadkin <opensource@trysound.io>
2023-04-21 22:26:30 +04:00
Bogdan Chadkin ceefbe8f34 Remove unnecessary prop 2 2023-04-22 01:17:55 +07:00
Bogdan Chadkin ad3271a3d0 Remove unnecessary prop 2023-04-22 01:06:29 +07:00
Ivan Starkov 05ba5fe877 Fix style source input (#1511)
## Description
remove white spaces to check diff
<img width="276" alt="image"
src="https://user-images.githubusercontent.com/5077042/233678799-1e57e74b-5aa9-4c9a-9a9c-bf210c5ba27a.png">

## Steps for reproduction

Select link component, add style source, select current page. 
Should be Current Page and not the "Aria Current Page"

## 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-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-04-21 21:23:10 +04:00
Ivan Starkov 2f8b0fe150 Fix new element outline issue (#1512)
## Description

Outline calculated incorrectly for new elements in case if new element
has size and added into collapsed item

<img width="361" alt="image"
src="https://user-images.githubusercontent.com/5077042/233684755-27be5da9-9c6a-4fbf-b81a-481ec2abab60.png">

## Steps for reproduction

Create Box
Add Image inside
See outline now is on Image


## 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-04-21 21:22:23 +04:00
Roman Pominov a74dbe06d3 Fix bugs with creating component by DnD to canvas (#1510)
## Description

https://discord.com/channels/955905230107738152/1098959267396059228

There were two bugs:

1. Same as in
https://github.com/webstudio-is/webstudio-builder/pull/1483 setState
didn't work correctly after React update
2. Scrub used to call `onStatusChange("idle")` at unmount (now fixed).
We use scrub for canvas resize, and restore pointer events when status
changes to "idle". But we also unmount scrub on DnD start. So on DnD
start we ended up with pointer events turned on.

## Steps for reproduction

1. DnD of components to canvas should work well now
2023-04-21 18:03:58 +03:00
Ivan Starkov 885fa38885 Fix data not synchronized if you reopen the projects from the dashboard (#1508)
Fix data not synchronized if you reopen the projects from the dashboard
2023-04-21 21:29:02 +07:00
Oleg Isonen 119d8410c3 Fix switching to base breakpoint on a small screen (#1504)
when base breakpoint selected, always use a width between max and min
breakpoints at the lowest value

## Code Review

- [ ] hi @istarkov , 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-04-21 14:12:21 +02:00
Bogdan Chadkin 6c787558fc Fix body preset styles (#1500)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1243

Changed body styles to black on transparent defaults.
Added white background to iframe to make canvas visible on workspace.
2023-04-21 11:58:49 +07:00
Roman Pominov cacdbddb14 Paddings to make space for scroll bar (#1502)
## Description

Closes #1458

1. Fixed paddings
2. Fixed color of scrollbar
3. Fixed color of the options button of the selected page item
2023-04-20 16:54:44 +03:00
Bogdan Chadkin 723d9e2f20 Remove handleRequest from react-sdk (#1499)
We should not have any server specific functions in react-sdk. Any small
change can break client environment.

And moving to /server entry point still problematic because this entry
point is node specific while we want to support as many environments as
possible.

Recently remix added defaults for different environments so user do not
need to add any entry.client.tsx or entry.server.ts at all.

Defaults do not work for us in builder though doing great in size test
setup.
2023-04-20 18:10:53 +07:00
Bogdan Chadkin b67ec9aa9d Compute remote style source (#1497)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1338
https://github.com/webstudio-is/webstudio-builder/issues/807

Used remote color for previous style sources and added messages to
property name popup.

<img width="313" alt="Screenshot 2023-04-20 at 11 54 01"
src="https://user-images.githubusercontent.com/5635476/233264852-739a3f7f-8542-482f-b41c-9c81d8a3d142.png">
<img width="298" alt="Screenshot 2023-04-20 at 11 54 50"
src="https://user-images.githubusercontent.com/5635476/233264866-c1f8f00a-e428-46ca-b890-53aa27ce20f7.png">
<img width="254" alt="Screenshot 2023-04-20 at 11 58 04"
src="https://user-images.githubusercontent.com/5635476/233264871-4228b48f-902f-44e4-beae-9cc8ab22045b.png">
<img width="283" alt="Screenshot 2023-04-20 at 11 58 15"
src="https://user-images.githubusercontent.com/5635476/233264876-af1ebeb7-920b-4085-a6ef-86184d40d020.png">
2023-04-20 17:57:30 +07:00
Bogdan Chadkin 197a03ede3 Add handshaken store (#1498)
Here replaced canvasReady and canvasReadyAck events with handshaken
store which reuses the logic from stores synchronization.
2023-04-20 17:40:43 +07:00
Bogdan Chadkin 972bbf174d Prevent cyclic slot reparent (#1496)
Here consider this scenario when reparenting

- Create a slot
- Put a Box in it
- Copy the Slot
- Drag copy of the slot inside Box in the original slot
2023-04-20 15:40:34 +07:00
Bogdan Chadkin 3b16db748a Update css-engine transformValue on every update (#1495)
We have a bug that asset cannot be applied in background style section.
This is because image transformer was set only once on rule creation. We
need to reset it with actual assets on every styles updates.
2023-04-20 11:34:15 +07:00
Bogdan Chadkin 6c57597b6c Reset selected instance on page manipulation (#1494)
Forced reset when page is created, deleted or navigated. Selected
instance should be reset to avoid manipulation from another page.
2023-04-20 10:54:02 +07:00
Roman Pominov 012765fd4a Fix unstable lostpixel (#1493)
## Description

<img width="152" alt="Screenshot 2023-04-19 at 16 53 54"
src="https://user-images.githubusercontent.com/825702/233097071-8c2ca542-eb75-48fa-ba11-a1a74f83377a.png">

This should hopefully fix the unstable popover arrow ^. 

The theory is:
- when arrow position is calculated, fonts may or may not be loaded yet;
 - arrow position does not update after the fonts load.
2023-04-19 19:35:29 +03:00
Ivan Starkov a18d88eaa7 Release 0.59.0 (#1492)
## Description

Npm Release 0.59.0

## 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-04-19 17:10:27 +04:00
Oleg Isonen 8d1bd2322e Remove effects and other sections (#1491)
they will be reintroduced with new design


## Code Review

- [ ] hi @istarkov , 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-04-19 14:55:38 +02:00
Bogdan Chadkin ba9f1a6e5b Define component states in meta (#1481)
Ref https://github.com/webstudio-is/webstudio-builder/issues/807

Here added ability to extend states in style source menu list with a
list defined in component meta.

As an example added `[aria-current=page]` support to links. For now can
be statically set with props panel.

Note: review with hidden whitespaces
2023-04-19 15:07:21 +07:00
Ivan Starkov a25f0da9b9 Release 0.58 (#1488)
## Description

Merge after #1487 

## 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-04-19 10:29:07 +04:00
Roman Pominov 8d94459625 Ability to link by #ID; Fixed a bug with links in RTE (#1454)
## Description

1. Made `href` always present (# is used when not set, similar to
Webflow). Fixes #1380
2. Added "Section" option in URL Control. Closes #993 
3. Added "ID" prop that is visible in all components. Closes #991 
4. Closes #1475

## Steps for reproduction

1. Add ID prop to an instance
2. Add a link that references that instance by ID
2023-04-19 08:53:16 +03:00
Ivan Starkov 8d68ba8b11 Release 0.57.0 (#1486)
## Description

NPM update

## 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-04-18 21:05:43 +04:00
Roman Pominov 60a69cc73c Fix navigator dnd (#1483)
## Description

DnD in navigator stopped working after React update. This PR fixes it.

https://discord.com/channels/955905230107738152/1097637506649960519

## Steps for reproduction

1. Try to use drag and drop in navigator tree
2023-04-18 19:28:46 +03:00
Oleg Isonen 759c54e37b Breakpoints stage 7 (#1477)
## Description

1. resize handles on canvas using css only (visibly faster)
2. initial breakpoint on first load when base breakpoint exists needs to
be selected in a way that the base breakpoint is activated, currently we
were landing on a smaller breakpoint when there was not enough space to
land on base
3. fix overflow for when instance on canvas is bigger than iframe size,
outline is rendered outside of iframe and may run outside of it unless
we hide the overflowing parts


## Code Review

- [ ] hi @istarkov , 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-04-18 15:29:06 +02:00
Ivan Starkov 5ad198f39e Concurency mode for React 18 (#1474)
## Description

Made handshake between canvas and builder.
Now publish actions are delayed in local array until handshake message
from destination is received

Switched on hydrateRoot to enable concurrent mode

unstable_batchedUpdates are removed

## Steps for reproduction



## 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-04-17 21:11:40 +04:00
Mateusz Burzyński 4424add480 Make the base tsconfig.json to assume declaration emit (#1470)
## Description

This PR "swaps" the guiding principle behind what options are in the
base `tsconfig.json`.

Previously TS was configured to *not* emit declarations and we were
forcing for them to be emitted with CLI flags. This had an unfortunate
result - errors about "not portable type definitions" were not displayed
in the IDE because to its best knowledge the type definitions were never
supposed to be emitted. So it wasn't worthwhile to surface this error.

With the adjusted options those errors will be raised in the IDE which
should improve the feedback loop for those errors.

## Code Review

- [ ] hi @TrySound, @istarkov, @kof - you need to recheck if you have
any doubts about this approach, if you see anything wrong with it in the
context of this project

## Before merging

- [ ] test IDE setup
- [ ] test build script
- [ ] test typechecking and dts emit
2023-04-17 15:30:11 +02:00
Oleg Isonen 705d7c00fb Refactor canvas resize to use scrub (#1469)
## Description

Now user can keep resizing outside of the window boundary

Also:
- fixes https://github.com/webstudio-is/webstudio-builder/issues/1465

## Steps for reproduction

1. start resizing, keep going outside of window


## Code Review

- [ ] hi @istarkov , 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-04-17 11:57:53 +02:00
Bogdan Chadkin a148507e48 Render style states (#1420)
Ref https://github.com/webstudio-is/webstudio-builder/issues/807

Refactored styles rendering in canvas to consider states and added style
states support to css text renderer.
2023-04-17 15:50:14 +07:00
Ivan Starkov 1b5ddd2cb0 Fix backgound image thumbnail (#1455)
## Description

If image is not loaded for some reason this PR fixes this

![image](https://user-images.githubusercontent.com/5077042/232046193-67dfa2b3-44a1-4ecc-a01d-a66c1e6209b2.png)
on this
<img width="269" alt="image"
src="https://user-images.githubusercontent.com/5077042/232046291-aca1827b-de6e-41b3-9924-407ac78587ea.png">



## Steps for reproduction

Upload image, prevent its loading through dev tools

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

- [ ] 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-04-17 12:08:50 +04:00
Oleg Isonen 3ee1e35667 Fixes borders, migrates deprecated components (#1471)
## Description

- fixes https://github.com/webstudio-is/webstudio-builder/issues/1459
- fixes https://github.com/webstudio-is/webstudio-builder/issues/1466
- border of style sources is not fixed here, I added a todo to the style
sources issue


## Code Review

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

## 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-04-17 09:34:35 +02:00
Ivan Starkov 9dd06b37a2 Fix cross domain livereload in dev mode (#1456)
## Description

This fixed crossdomain development mode used in SaaS 

## 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-04-17 11:25:22 +04:00
Oleg Isonen dc681c3068 Add border radius and other fixes to cascade indicator (#1472)
## Description

Closes https://github.com/webstudio-is/webstudio-builder/issues/1460

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @istarkov , 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-04-16 19:24:58 +02:00
Bogdan Chadkin 496c9197ad Upgrade to react 18 (#1452)
Ref https://react.dev/blog/2022/03/29/react-v18
https://react.dev/blog/2022/03/08/react-18-upgrade-guide

- bumped all deps to use react 18
- storybook still somehow enforces react 17 (but not react-dom) so
forces with overrides until bump of storybook
- both storybook and remix still use legacy api so concurrent features
are not yet enabled. Will do in separate PRs
- fixed weird react-hot-toast error which expose function as renderable
type
- fixed a few untyped useCallback which failed with new react types
- sdk size became a little bigger
2023-04-16 15:33:03 +07:00
Bogdan Chadkin e66b15d8c8 Setup @vercel/remix instead of @remix-run/vercel (#1468)
Ref
https://vercel.com/blog/vercel-remix-integration-with-edge-functions-support
And
https://github.com/webstudio-is/webstudio-builder/pull/1463#issuecomment-1509945284

Turns out remix docs points to outdated solution and vercel prepared
better alternative.

```diff
du -ckd1 node_modules
- 858148
+ 685432
```
2023-04-16 14:13:49 +07:00
Roman Pominov b14f2cf71d File and URL:Attachment controls (#1421)
## Description

1. Added an option to enter raw URL in the File control, and made sure
it looks like in Figma. Closes #1011
2. Added "Attachment" option in the URL control. Ref. #993 

## Steps for reproduction

1. Try to set a Link's href to an asset
4. Try to set a Image's source to a raw URL
2023-04-14 11:23:12 +03:00
Bogdan Chadkin 4375cd9ea0 Pass asset base url for fonts and style images (#1451)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

publicPath and cdnUrl are separate environment variables for different
deployments. Though they do exactly same thing we can unify them as
asset base url.
2023-04-14 14:49:58 +07:00