@webstudio-is/react-sdk 0.47.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,13 @@
1
1
  import { Image } from "./image";
2
2
  import { Link } from "./link";
3
+ import { LinkBlock } from "./link-block";
3
4
  import { RichTextLink } from "./rich-text-link";
4
5
  import { imageProps } from "@webstudio-is/image";
5
6
  const customComponents = {
6
7
  Image,
7
8
  Link,
8
- RichTextLink
9
+ RichTextLink,
10
+ LinkBlock
9
11
  };
10
12
  const customComponentPropsMetas = {
11
13
  Image: { props: imageProps }
@@ -0,0 +1,6 @@
1
+ import { LinkBlock as BaseLink } from "../../components/link-block";
2
+ import { wrapLinkComponent } from "./shared/remix-link";
3
+ const LinkBlock = wrapLinkComponent(BaseLink);
4
+ export {
5
+ LinkBlock
6
+ };
@@ -25,12 +25,14 @@ __export(custom_components_exports, {
25
25
  module.exports = __toCommonJS(custom_components_exports);
26
26
  var import_image = require("./image");
27
27
  var import_link = require("./link");
28
+ var import_link_block = require("./link-block");
28
29
  var import_rich_text_link = require("./rich-text-link");
29
30
  var import_image2 = require("@webstudio-is/image");
30
31
  const customComponents = {
31
32
  Image: import_image.Image,
32
33
  Link: import_link.Link,
33
- RichTextLink: import_rich_text_link.RichTextLink
34
+ RichTextLink: import_rich_text_link.RichTextLink,
35
+ LinkBlock: import_link_block.LinkBlock
34
36
  };
35
37
  const customComponentPropsMetas = {
36
38
  Image: { props: import_image2.imageProps }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var link_block_exports = {};
20
+ __export(link_block_exports, {
21
+ LinkBlock: () => LinkBlock
22
+ });
23
+ module.exports = __toCommonJS(link_block_exports);
24
+ var import_link_block = require("../../components/link-block");
25
+ var import_remix_link = require("./shared/remix-link");
26
+ const LinkBlock = (0, import_remix_link.wrapLinkComponent)(import_link_block.LinkBlock);
@@ -127,8 +127,7 @@ const backgrounds = [
127
127
  "backgroundColor",
128
128
  "backgroundImage",
129
129
  "backgroundOrigin",
130
- "backgroundPositionX",
131
- "backgroundPositionY",
130
+ "backgroundPosition",
132
131
  "backgroundRepeat",
133
132
  "backgroundSize",
134
133
  "backgroundBlendMode"
@@ -103,8 +103,7 @@ const backgrounds = [
103
103
  "backgroundColor",
104
104
  "backgroundImage",
105
105
  "backgroundOrigin",
106
- "backgroundPositionX",
107
- "backgroundPositionY",
106
+ "backgroundPosition",
108
107
  "backgroundRepeat",
109
108
  "backgroundSize",
110
109
  "backgroundBlendMode"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/react-sdk",
3
- "version": "0.47.0",
3
+ "version": "0.48.0",
4
4
  "description": "Webstudio JavaScript / TypeScript API",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -12,11 +12,10 @@
12
12
  "@remix-run/node": "1.12.0",
13
13
  "@remix-run/react": "1.12.0",
14
14
  "@remix-run/server-runtime": "1.12.0",
15
- "@storybook/react": "^6.5.14",
15
+ "@storybook/react": "^6.5.16",
16
16
  "@types/node": "^18.11.18",
17
17
  "@types/react": "^17.0.24",
18
18
  "@types/react-dom": "^17.0.9",
19
- "babel-loader": "^9.1.2",
20
19
  "esbuild": "^0.14.25",
21
20
  "esbuild-node-externals": "^1.4.1",
22
21
  "jest": "^29.3.1",
@@ -45,17 +44,18 @@
45
44
  "mitt": "^3.0.0",
46
45
  "nanostores": "^0.7.1",
47
46
  "warn-once": "^0.1.1",
48
- "@webstudio-is/asset-uploader": "^0.47.0",
49
- "@webstudio-is/css-data": "^0.47.0",
50
- "@webstudio-is/css-vars": "^0.47.0",
51
- "@webstudio-is/generate-arg-types": "^0.47.0",
52
- "@webstudio-is/icons": "^0.47.0",
53
- "@webstudio-is/image": "^0.47.0",
54
- "@webstudio-is/prisma-client": "^0.47.0",
55
- "@webstudio-is/project-build": "^0.47.0"
47
+ "@webstudio-is/asset-uploader": "^0.48.0",
48
+ "@webstudio-is/css-data": "^0.48.0",
49
+ "@webstudio-is/css-vars": "^0.48.0",
50
+ "@webstudio-is/generate-arg-types": "^0.48.0",
51
+ "@webstudio-is/icons": "^0.48.0",
52
+ "@webstudio-is/image": "^0.48.0",
53
+ "@webstudio-is/prisma-client": "^0.48.0",
54
+ "@webstudio-is/project-build": "^0.48.0"
56
55
  },
57
56
  "exports": {
58
57
  ".": {
58
+ "source": "./src/index.ts",
59
59
  "import": "./lib/index.js",
60
60
  "require": "./lib/cjs/index.cjs"
61
61
  }
@@ -1,5 +1,6 @@
1
1
  import { Image } from "./image";
2
2
  import { Link } from "./link";
3
+ import { LinkBlock } from "./link-block";
3
4
  import { RichTextLink } from "./rich-text-link";
4
5
  import { imageProps } from "@webstudio-is/image";
5
6
  import type { WsComponentPropsMeta } from "../../components/component-type";
@@ -8,6 +9,7 @@ export const customComponents = {
8
9
  Image,
9
10
  Link,
10
11
  RichTextLink,
12
+ LinkBlock,
11
13
  };
12
14
 
13
15
  export const customComponentPropsMetas: Record<string, WsComponentPropsMeta> = {
@@ -0,0 +1,4 @@
1
+ import { LinkBlock as BaseLink } from "../../components/link-block";
2
+ import { wrapLinkComponent } from "./shared/remix-link";
3
+
4
+ export const LinkBlock = wrapLinkComponent(BaseLink);
@@ -120,8 +120,7 @@ const backgrounds = [
120
120
  "backgroundColor",
121
121
  "backgroundImage",
122
122
  "backgroundOrigin",
123
- "backgroundPositionX",
124
- "backgroundPositionY",
123
+ "backgroundPosition",
125
124
  "backgroundRepeat",
126
125
  "backgroundSize",
127
126
  "backgroundBlendMode",