slackblock 2.0.0-beta.0 → 2.0.0-beta.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,28 @@
1
+ type ComponentType = string | ((...parameters: unknown[]) => unknown) | (new (...parameters: unknown[]) => unknown);
2
+ declare function jsx(type: ComponentType, props: Record<string, unknown>): {
3
+ type: ComponentType;
4
+ props: Record<string, unknown>;
5
+ children: any[];
6
+ };
7
+ declare function jsxs(type: ComponentType, props: Record<string, unknown>): {
8
+ type: ComponentType;
9
+ props: Record<string, unknown>;
10
+ children: any[];
11
+ };
12
+ declare const Fragment = "fragment";
13
+ declare namespace JSX {
14
+ type Element = {
15
+ type: ComponentType;
16
+ props: Record<string, unknown>;
17
+ children: unknown[];
18
+ };
19
+ type IntrinsicElements = Record<string, Record<string, unknown>>;
20
+ type ElementClass = {
21
+ props: Record<string, unknown>;
22
+ };
23
+ type ElementAttributesProperty = {
24
+ props: Record<string, unknown>;
25
+ };
26
+ }
27
+
28
+ export { Fragment, JSX, jsx, jsxs };
@@ -0,0 +1,28 @@
1
+ type ComponentType = string | ((...parameters: unknown[]) => unknown) | (new (...parameters: unknown[]) => unknown);
2
+ declare function jsx(type: ComponentType, props: Record<string, unknown>): {
3
+ type: ComponentType;
4
+ props: Record<string, unknown>;
5
+ children: any[];
6
+ };
7
+ declare function jsxs(type: ComponentType, props: Record<string, unknown>): {
8
+ type: ComponentType;
9
+ props: Record<string, unknown>;
10
+ children: any[];
11
+ };
12
+ declare const Fragment = "fragment";
13
+ declare namespace JSX {
14
+ type Element = {
15
+ type: ComponentType;
16
+ props: Record<string, unknown>;
17
+ children: unknown[];
18
+ };
19
+ type IntrinsicElements = Record<string, Record<string, unknown>>;
20
+ type ElementClass = {
21
+ props: Record<string, unknown>;
22
+ };
23
+ type ElementAttributesProperty = {
24
+ props: Record<string, unknown>;
25
+ };
26
+ }
27
+
28
+ export { Fragment, JSX, jsx, jsxs };
@@ -0,0 +1,19 @@
1
+ // src/jsx-runtime.ts
2
+ function jsx(type, props) {
3
+ const { children } = props;
4
+ return {
5
+ type,
6
+ props,
7
+ children: Array.isArray(children) ? children : children === void 0 ? [] : [children]
8
+ };
9
+ }
10
+ function jsxs(type, props) {
11
+ return jsx(type, props);
12
+ }
13
+ var Fragment = "fragment";
14
+ export {
15
+ Fragment,
16
+ jsx,
17
+ jsxs
18
+ };
19
+ //# sourceMappingURL=jsx-runtime.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/jsx-runtime.ts"],"sourcesContent":["type ComponentType = string | ((...parameters: unknown[]) => unknown) | (new (...parameters: unknown[]) => unknown);\n\nexport function jsx(type: ComponentType, props: Record<string, unknown>) {\n const {children} = props;\n\n return {\n type,\n props,\n children: Array.isArray(children) ? children : (children === undefined ? [] : [children]),\n };\n}\n\nexport function jsxs(type: ComponentType, props: Record<string, unknown>) {\n return jsx(type, props);\n}\n\nexport const Fragment = 'fragment';\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JSX {\n export type Element = {type: ComponentType; props: Record<string, unknown>; children: unknown[]};\n export type IntrinsicElements = Record<string, Record<string, unknown>>;\n export type ElementClass = {props: Record<string, unknown>};\n export type ElementAttributesProperty = {props: Record<string, unknown>};\n}\n"],"mappings":";AAEO,SAAS,IAAI,MAAqB,OAAgC;AACvE,QAAM,EAAC,SAAQ,IAAI;AAEnB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,UAAU,MAAM,QAAQ,QAAQ,IAAI,WAAY,aAAa,SAAY,CAAC,IAAI,CAAC,QAAQ;AAAA,EACzF;AACF;AAEO,SAAS,KAAK,MAAqB,OAAgC;AACxE,SAAO,IAAI,MAAM,KAAK;AACxB;AAEO,IAAM,WAAW;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slackblock",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "JSX-based Slack message renderer",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -14,6 +14,12 @@
14
14
  "block": [
15
15
  "dist/block.d.ts"
16
16
  ],
17
+ "jsx-runtime": [
18
+ "dist/jsx-runtime.d.ts"
19
+ ],
20
+ "jsx-dev-runtime": [
21
+ "dist/jsx-dev-runtime.d.ts"
22
+ ],
17
23
  "*": [
18
24
  "dist/index.d.ts"
19
25
  ]
@@ -31,6 +37,18 @@
31
37
  "import": "./dist/block.mjs",
32
38
  "require": "./dist/block.cjs",
33
39
  "default": "./dist/block.cjs"
40
+ },
41
+ "./jsx-runtime": {
42
+ "types": "./dist/jsx-runtime.d.ts",
43
+ "import": "./dist/jsx-runtime.mjs",
44
+ "require": "./dist/jsx-runtime.cjs",
45
+ "default": "./dist/jsx-runtime.cjs"
46
+ },
47
+ "./jsx-dev-runtime": {
48
+ "types": "./dist/jsx-dev-runtime.d.ts",
49
+ "import": "./dist/jsx-dev-runtime.mjs",
50
+ "require": "./dist/jsx-dev-runtime.cjs",
51
+ "default": "./dist/jsx-dev-runtime.cjs"
34
52
  }
35
53
  },
36
54
  "sideEffects": false,