@webstudio-is/sdk-components-react 0.173.0 → 0.175.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.
@@ -0,0 +1,2 @@
1
+ import type { PropMeta } from "@webstudio-is/react-sdk";
2
+ export declare const props: Record<string, PropMeta>;
@@ -1,6 +1,7 @@
1
1
  export { Slot } from "./slot";
2
2
  export { Fragment } from "./fragment";
3
3
  export { HtmlEmbed } from "./html-embed";
4
+ export { MarkdownEmbed } from "./markdown-embed";
4
5
  export { Body } from "./body";
5
6
  export { Box } from "./box";
6
7
  export { Text } from "./text";
@@ -16,6 +17,7 @@ export { Subscript } from "./subscript";
16
17
  export { Button } from "./button";
17
18
  export { Input } from "./input";
18
19
  export { Form } from "./form";
20
+ export { Form as RemixForm } from "./form";
19
21
  export { Image } from "./image";
20
22
  export { Blockquote } from "./blockquote";
21
23
  export { List } from "./list";
@@ -1,7 +1,7 @@
1
- import { type ComponentProps } from "react";
2
1
  export declare const defaultTag = "a";
3
- type Props = Omit<ComponentProps<"a">, "target"> & {
2
+ export declare const Link: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "target" | "download"> & {
4
3
  target?: "_self" | "_blank" | "_parent" | "_top";
5
- };
6
- export declare const Link: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
7
- export {};
4
+ download?: boolean;
5
+ } & {
6
+ $webstudio$canvasOnly$assetId?: string | undefined;
7
+ }, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,7 @@
1
+ type MarkdownEmbedProps = {
2
+ code: string;
3
+ className?: string;
4
+ children?: never;
5
+ };
6
+ export declare const MarkdownEmbed: import("react").ForwardRefExoticComponent<MarkdownEmbedProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
2
+ export declare const meta: WsComponentMeta;
3
+ export declare const propsMeta: WsComponentPropsMeta;
@@ -1,6 +1,7 @@
1
1
  export { meta as Slot } from "./slot.ws";
2
2
  export { meta as Fragment } from "./fragment.ws";
3
3
  export { meta as HtmlEmbed } from "./html-embed.ws";
4
+ export { meta as MarkdownEmbed } from "./markdown-embed.ws";
4
5
  export { meta as ContentEmbed } from "./content-embed.ws";
5
6
  export { meta as Body } from "./body.ws";
6
7
  export { meta as Box } from "./box.ws";
@@ -17,6 +18,7 @@ export { meta as Subscript } from "./subscript.ws";
17
18
  export { meta as Button } from "./button.ws";
18
19
  export { meta as Input } from "./input.ws";
19
20
  export { meta as Form } from "./form.ws";
21
+ export { meta as RemixForm } from "./form.ws";
20
22
  export { meta as Image } from "./image.ws";
21
23
  export { meta as Blockquote } from "./blockquote.ws";
22
24
  export { meta as List } from "./list.ws";
@@ -1,6 +1,7 @@
1
1
  export { propsMeta as Slot } from "./slot.ws";
2
2
  export { propsMeta as Fragment } from "./fragment.ws";
3
3
  export { propsMeta as HtmlEmbed } from "./html-embed.ws";
4
+ export { propsMeta as MarkdownEmbed } from "./markdown-embed.ws";
4
5
  export { propsMeta as Body } from "./body.ws";
5
6
  export { propsMeta as Box } from "./box.ws";
6
7
  export { propsMeta as Text } from "./text.ws";
@@ -16,6 +17,7 @@ export { propsMeta as Subscript } from "./subscript.ws";
16
17
  export { propsMeta as Button } from "./button.ws";
17
18
  export { propsMeta as Input } from "./input.ws";
18
19
  export { propsMeta as Form } from "./form.ws";
20
+ export { propsMeta as RemixForm } from "./form.ws";
19
21
  export { propsMeta as Image } from "./image.ws";
20
22
  export { propsMeta as Blockquote } from "./blockquote.ws";
21
23
  export { propsMeta as List } from "./list.ws";
@@ -1,4 +1,4 @@
1
- import { type Hook } from "@webstudio-is/react-sdk";
1
+ import { type Hook } from "@webstudio-is/react-sdk/runtime";
2
2
  export declare const defaultTag = "select";
3
3
  export declare const Select: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
4
4
  export declare const hooksSelect: Hook;
@@ -1,16 +1,18 @@
1
- import * as React from "react";
2
1
  declare const languages: readonly ["af", "am", "ar", "az", "be", "bg", "bn", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et", "eu", "fa", "fi", "fr", "ga", "gl", "gu", "he", "hi", "hr", "hu", "hy", "id", "is", "it", "ja", "ka", "kk", "km", "kn", "ko", "ky", "lb", "lt", "lv", "mk", "ml", "mn", "mr", "ms", "mt", "nb", "nl", "nn", "pl", "pt", "ro", "ru", "si", "sk", "sl", "sq", "sr", "sv", "sw", "ta", "te", "th", "tr", "uk", "ur", "uz", "vi", "zh"];
3
2
  declare const countries: readonly ["AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BR", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CO", "KM", "CG", "CD", "CR", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "SZ", "ET", "FJ", "FI", "FR", "GA", "GM", "GE", "DE", "GH", "GR", "GD", "GT", "GN", "GW", "GY", "HT", "HN", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MR", "MU", "MX", "FM", "MD", "MC", "MN", "ME", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NZ", "NI", "NE", "NG", "NO", "OM", "PK", "PW", "PA", "PG", "PY", "PE", "PH", "PL", "PT", "QA", "RO", "RU", "RW", "KN", "LC", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SK", "SI", "SB", "SO", "ZA", "SS", "ES", "LK", "SD", "SR", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TO", "TT", "TN", "TR", "TM", "TV", "UG", "UA", "AE", "GB", "US", "UY", "UZ", "VU", "VA", "VE", "VN", "YE", "ZM", "ZW"];
4
3
  type Language = (typeof languages)[number];
5
4
  type Country = (typeof countries)[number];
6
5
  type DateStyle = Intl.DateTimeFormatOptions["dateStyle"] | "none";
7
6
  type TimeStyle = Intl.DateTimeFormatOptions["timeStyle"] | "none";
8
- export type TimeProps = {
7
+ type TimeProps = {
9
8
  datetime?: string;
10
9
  language?: Language;
11
10
  country?: Country;
12
11
  dateStyle?: DateStyle;
13
12
  timeStyle?: TimeStyle;
14
13
  };
15
- export declare const Time: React.ForwardRefExoticComponent<TimeProps & React.RefAttributes<HTMLTimeElement>>;
14
+ export declare const Time: import("react").ForwardRefExoticComponent<TimeProps & import("react").RefAttributes<HTMLTimeElement>>;
15
+ export declare const __testing__: {
16
+ parseDate: (datetimeString: string) => Date | undefined;
17
+ };
16
18
  export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,12 +1,9 @@
1
- import { idAttribute, componentAttribute } from "@webstudio-is/react-sdk";
2
1
  import { type ReactNode } from "react";
3
2
  export declare const defaultTag = "div";
4
3
  type Props = {
5
4
  tag: string;
6
5
  xmlns?: string;
7
6
  children: ReactNode;
8
- [idAttribute]?: string;
9
- [componentAttribute]?: string;
10
7
  };
11
8
  export declare const XmlNode: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
12
9
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-react",
3
- "version": "0.173.0",
3
+ "version": "0.175.0",
4
4
  "description": "Webstudio default library for react",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -41,9 +41,11 @@
41
41
  "dependencies": {
42
42
  "@react-aria/utils": "^3.21.0",
43
43
  "colord": "^2.9.3",
44
- "@webstudio-is/icons": "0.173.0",
45
- "@webstudio-is/react-sdk": "0.173.0",
46
- "@webstudio-is/image": "0.173.0"
44
+ "micromark": "^4.0.0",
45
+ "@webstudio-is/icons": "0.175.0",
46
+ "@webstudio-is/image": "0.175.0",
47
+ "@webstudio-is/react-sdk": "0.175.0",
48
+ "@webstudio-is/sdk": "0.175.0"
47
49
  },
48
50
  "devDependencies": {
49
51
  "@jest/globals": "^29.7.0",
@@ -55,8 +57,8 @@
55
57
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
56
58
  "typescript": "5.5.2",
57
59
  "@webstudio-is/generate-arg-types": "0.0.0",
58
- "@webstudio-is/jest-config": "1.0.7",
59
- "@webstudio-is/tsconfig": "1.0.7"
60
+ "@webstudio-is/tsconfig": "1.0.7",
61
+ "@webstudio-is/jest-config": "1.0.7"
60
62
  },
61
63
  "scripts": {
62
64
  "build": "rm -rf lib && esbuild src/components.ts src/metas.ts src/props.ts --outdir=lib --bundle --format=esm --packages=external",