@dressed/react 1.4.0 → 1.5.0-rc.1.1

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,9 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ import type { APILabelComponent } from "discord-api-types/v10";
3
+ import { type ComponentNode } from "../react/renderer.ts";
4
+ type LabelProps = Omit<APILabelComponent, "component" | "type"> & {
5
+ children: ReactNode;
6
+ };
7
+ export declare function Label({ label, description, children, ...rest }: LabelProps): ReactElement<APILabelComponent>;
8
+ export declare function parseActionRow<T extends APILabelComponent>(props: T, children: ComponentNode[]): Promise<T>;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Label as DressedComponent } from "dressed";
2
+ import { createElement } from "react";
3
+ import { renderNode } from "../react/renderer.js";
4
+ export function Label({ label, description, children, ...rest }) {
5
+ const props = DressedComponent(label, null, description, rest);
6
+ return createElement("dressed-node", props, children);
7
+ }
8
+ export async function parseActionRow(props, children) {
9
+ return { ...props, component: await Promise.all(children.map(renderNode)) };
10
+ }
11
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.js","sourceRoot":"","sources":["../../src/components/label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,aAAa,EAAqC,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAsB,MAAM,sBAAsB,CAAC;AAMtE,MAAM,UAAU,KAAK,CAAC,EACpB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,GAAG,IAAI,EACI;IACX,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,IAAa,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;IACxE,OAAO,aAAa,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAQ,EACR,QAAyB;IAEzB,OAAO,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;AAC9E,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { ActionRow } from "./components/action-row.ts";
2
2
  export { Button } from "./components/button.ts";
3
3
  export { Container } from "./components/container.ts";
4
4
  export { File } from "./components/file.ts";
5
+ export { Label } from "./components/label.ts";
5
6
  export { MediaGallery, MediaGalleryItem } from "./components/media-gallery.ts";
6
7
  export { Section } from "./components/section.ts";
7
8
  export { SelectMenu, SelectMenuOption } from "./components/select-menu.ts";
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ export { ActionRow } from "./components/action-row.js";
3
3
  export { Button } from "./components/button.js";
4
4
  export { Container } from "./components/container.js";
5
5
  export { File } from "./components/file.js";
6
+ export { Label } from "./components/label.js";
6
7
  export { MediaGallery, MediaGalleryItem } from "./components/media-gallery.js";
7
8
  export { Section } from "./components/section.js";
8
9
  export { SelectMenu, SelectMenuOption } from "./components/select-menu.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,YAAY;AACZ,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,YAAY;AACZ,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@dressed/react",
3
- "version": "1.4.0",
3
+ "version": "1.5.0-rc.1.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Inbestigator/dressed.git",
7
7
  "directory": "packages/dressed-react"
8
8
  },
9
9
  "peerDependencies": {
10
- "dressed": "^1.8.0",
11
- "react": "^19.1.0"
10
+ "dressed": "^1.10.0",
11
+ "react": "^19.1.1"
12
12
  },
13
13
  "exports": "./dist/index.js",
14
14
  "description": "Render Dressed's components using React",
@@ -31,11 +31,11 @@
31
31
  "type": "module",
32
32
  "types": "./dist/index.d.ts",
33
33
  "dependencies": {
34
- "discord-api-types": "^0.38.11",
34
+ "discord-api-types": "^0.38.22",
35
35
  "react-reconciler": "github:inbestigator/dressed-rr"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/react": "^19.1.8",
38
+ "@types/react": "^19.1.12",
39
39
  "@types/react-reconciler": "^0.32.0"
40
40
  }
41
41
  }