@asheeui/puck 2.3.0 → 2.3.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.
- package/dist/native/blocks/content.d.ts +1 -1
- package/dist/native/blocks/content.d.ts.map +1 -1
- package/dist/native/blocks/content.js +3 -4
- package/dist/native/blocks/content.js.map +1 -1
- package/dist/native/root.d.ts.map +1 -1
- package/dist/native/root.js +3 -3
- package/dist/native/root.js.map +1 -1
- package/dist/web/blocks/layout.d.ts.map +1 -1
- package/dist/web/blocks/layout.js +1 -1
- package/dist/web/blocks/layout.js.map +1 -1
- package/package.json +19 -18
- package/src/native/blocks/content.tsx +11 -5
- package/src/native/root.tsx +3 -7
- package/src/web/blocks/layout.tsx +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Each block is the framework component plus the shared spec: the label, the fields and
|
|
5
5
|
* the defaults come from `src/shared`, and only the drawing is written here. What the
|
|
6
6
|
* platform draws differently is stated in the block: a paragraph's alignment is a
|
|
7
|
-
* property of its `
|
|
7
|
+
* property of its `Typography` rather than a class on a paragraph element, so the shared
|
|
8
8
|
* alignment vocabulary is what reaches the component.
|
|
9
9
|
*/
|
|
10
10
|
import type { AsheeBlock, HeadingBlockProps, TextBlockProps } from "../../shared";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/native/blocks/content.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/native/blocks/content.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACf,MAAM,cAAc,CAAC;AAGtB;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,CAetD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,cAAc,CAahD,CAAC"}
|
|
@@ -5,11 +5,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* Each block is the framework component plus the shared spec: the label, the fields and
|
|
6
6
|
* the defaults come from `src/shared`, and only the drawing is written here. What the
|
|
7
7
|
* platform draws differently is stated in the block: a paragraph's alignment is a
|
|
8
|
-
* property of its `
|
|
8
|
+
* property of its `Typography` rather than a class on a paragraph element, so the shared
|
|
9
9
|
* alignment vocabulary is what reaches the component.
|
|
10
10
|
*/
|
|
11
|
-
import { SECTION_BLOCK_TEXT_ALIGN } from "@asheeui/
|
|
12
|
-
import { Container, Section, Text } from "@asheeui/native";
|
|
11
|
+
import { Container, SECTION_BLOCK_TEXT_ALIGN, Section, Typography, } from "@asheeui/native";
|
|
13
12
|
import { SectionHeading } from "@asheeui/native/section-kit";
|
|
14
13
|
import { HEADING_SPEC, TEXT_SPEC } from "../../shared";
|
|
15
14
|
/**
|
|
@@ -24,6 +23,6 @@ export const headingBlock = {
|
|
|
24
23
|
*/
|
|
25
24
|
export const textBlock = {
|
|
26
25
|
...TEXT_SPEC,
|
|
27
|
-
render: ({ text, align }) => (_jsx(Section, { spacing: "sm", children: _jsx(Container, { children: _jsx(
|
|
26
|
+
render: ({ text, align }) => (_jsx(Section, { spacing: "sm", children: _jsx(Container, { children: _jsx(Typography, { role: "body-lg", align: SECTION_BLOCK_TEXT_ALIGN[align ?? "start"], children: text }) }) })),
|
|
28
27
|
};
|
|
29
28
|
//# sourceMappingURL=content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/native/blocks/content.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/native/blocks/content.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,SAAS,EACT,wBAAwB,EACxB,OAAO,EACP,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAM7D,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,GAAG,YAAY;IACf,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAClD,KAAC,OAAO,IAAC,OAAO,EAAC,IAAI,YACnB,KAAC,SAAS,cACR,KAAC,cAAc,IACb,OAAO,EAAE,OAAO,IAAI,SAAS,EAC7B,KAAK,EAAE,KAAK,IAAI,SAAS,EACzB,WAAW,EAAE,WAAW,IAAI,SAAS,EACrC,KAAK,EAAE,KAAK,IAAI,OAAO,EACvB,IAAI,EAAC,IAAI,GACT,GACQ,GACJ,CACX;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAA+B;IACnD,GAAG,SAAS;IACZ,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC3B,KAAC,OAAO,IAAC,OAAO,EAAC,IAAI,YACnB,KAAC,SAAS,cACR,KAAC,UAAU,IACT,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,wBAAwB,CAAC,KAAK,IAAI,OAAO,CAAC,YAChD,IAAI,GACM,GACH,GACJ,CACX;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/native/root.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/native/root.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAMxD"}
|
package/dist/native/root.js
CHANGED
|
@@ -11,7 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
* `<div>`: a page fills the screen it is drawn in, and the background it paints is the
|
|
12
12
|
* framework's background role.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { AsheeConfigContext, AsheeUIProvider } from "@asheeui/native";
|
|
15
15
|
import { useContext } from "react";
|
|
16
16
|
import { View } from "react-native";
|
|
17
17
|
/**
|
|
@@ -21,8 +21,8 @@ import { View } from "react-native";
|
|
|
21
21
|
* @returns The page, inside the framework's provider when the application has none.
|
|
22
22
|
*/
|
|
23
23
|
export function PuckRoot({ children }) {
|
|
24
|
-
const existingConfig = useContext(
|
|
24
|
+
const existingConfig = useContext(AsheeConfigContext);
|
|
25
25
|
const page = _jsx(View, { className: "bg-background flex-1 w-full", children: children });
|
|
26
|
-
return existingConfig ?
|
|
26
|
+
return existingConfig ? page : _jsx(AsheeUIProvider, { children: page });
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=root.js.map
|
package/dist/native/root.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../src/native/root.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../src/native/root.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAAsB;IACvD,MAAM,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAEtD,MAAM,IAAI,GAAG,KAAC,IAAI,IAAC,SAAS,EAAC,6BAA6B,YAAE,QAAQ,GAAQ,CAAC;IAE7E,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,eAAe,cAAE,IAAI,GAAmB,CAAC;AAC3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/web/blocks/layout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/web/blocks/layout.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAGtB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IACjD,qCAAqC;IACrC,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,CAUtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IACjD,mCAAmC;IACnC,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB,oCAAoC;IACpC,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,CActD,CAAC"}
|
|
@@ -8,8 +8,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* editor drops a component into the field and the block places it. The fields and the
|
|
9
9
|
* defaults still come from `src/shared`, so the platform offers the same two zones.
|
|
10
10
|
*/
|
|
11
|
-
import { cn } from "@asheeui/core";
|
|
12
11
|
import { Section } from "@asheeui/web";
|
|
12
|
+
import { cn } from "@asheeui/web";
|
|
13
13
|
import { COLUMN_RATIO_CLASS, COLUMNS_SPEC, SECTION_SPEC } from "../../shared";
|
|
14
14
|
/**
|
|
15
15
|
* A band with its own vertical rhythm and background.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/web/blocks/layout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;GAOG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/web/blocks/layout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAMlC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAU9E;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,GAAG,YAAY;IACf,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACrD,KAAC,OAAO,IACN,OAAO,EAAE,OAAO,IAAI,IAAI,EACxB,UAAU,EAAE,UAAU,IAAI,MAAM,EAChC,SAAS,kBACR,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,CAAC,CAAC,CAAC,IAAI,GACrB,CACX;CACF,CAAC;AAaF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,GAAG,YAAY;IACf,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CACtD,KAAC,OAAO,IAAC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,SAAS,kBAC1C,eACE,SAAS,EAAE,EAAE,CACX,wBAAwB,EACxB,kBAAkB,CAAC,KAAK,IAAI,OAAO,CAAC,CACrC,aACD,cAAK,SAAS,EAAC,SAAS,YAAE,KAAK,CAAC,CAAC,CAAC,KAAC,KAAK,KAAG,CAAC,CAAC,CAAC,IAAI,GAAO,EACzD,cAAK,SAAS,EAAC,SAAS,YAAE,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC,CAAC,IAAI,GAAO,IACjD,GACE,CACX;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asheeui/puck",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "The AsheeUI Puck integration: one block registry behind one import, routed by the bundler so an editor composes a page on the web and a device renders the stored page with the native components.",
|
|
5
5
|
"author": "Ashee Softworks <asheesoftworks@gmail.com>",
|
|
6
6
|
"homepage": "https://asheeui.com",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"NOTICE"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@asheeui/
|
|
62
|
-
"@asheeui/
|
|
63
|
-
"@asheeui/
|
|
61
|
+
"@asheeui/core": "^3.0.0",
|
|
62
|
+
"@asheeui/web": "^2.8.0",
|
|
63
|
+
"@asheeui/native": "^2.8.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@puckeditor/core": "^0.23.0",
|
|
@@ -88,32 +88,33 @@
|
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@babel/core": "^
|
|
92
|
-
"@babel/runtime": "^
|
|
91
|
+
"@babel/core": "^8.0.7",
|
|
92
|
+
"@babel/runtime": "^8.0.7",
|
|
93
93
|
"@puckeditor/core": "^0.23.0",
|
|
94
|
-
"@react-native/babel-preset": "^0.
|
|
95
|
-
"@react-native/jest-preset": "^0.
|
|
94
|
+
"@react-native/babel-preset": "^0.88.0",
|
|
95
|
+
"@react-native/jest-preset": "^0.88.0",
|
|
96
96
|
"@testing-library/jest-dom": "^7.0.1",
|
|
97
97
|
"@testing-library/react": "^16.3.3",
|
|
98
|
-
"@testing-library/react-native": "^14.0
|
|
98
|
+
"@testing-library/react-native": "^14.1.0",
|
|
99
99
|
"@types/jest": "^30.0.0",
|
|
100
|
-
"@types/node": "^26.5
|
|
100
|
+
"@types/node": "^26.6.5",
|
|
101
101
|
"@types/react": "^19.3.0",
|
|
102
102
|
"@types/react-dom": "^19.3.0",
|
|
103
|
-
"@vitejs/plugin-react": "^6.1.
|
|
104
|
-
"babel-jest": "^30.2
|
|
105
|
-
"jest": "^30.2
|
|
106
|
-
"jsdom": "^30.
|
|
103
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
104
|
+
"babel-jest": "^30.5.2",
|
|
105
|
+
"jest": "^30.5.2",
|
|
106
|
+
"jsdom": "^30.1.3",
|
|
107
107
|
"nativewind": "^4.2.7",
|
|
108
|
-
"react": "^19.3.
|
|
109
|
-
"react-dom": "^19.3.
|
|
110
|
-
"react-native": "0.
|
|
108
|
+
"react": "^19.3.1",
|
|
109
|
+
"react-dom": "^19.3.1",
|
|
110
|
+
"react-native": "0.88.0",
|
|
111
111
|
"tailwindcss": "^4.3.3",
|
|
112
112
|
"typescript": "^7.0.2",
|
|
113
|
-
"vitest": "^5.0.
|
|
113
|
+
"vitest": "^5.0.5"
|
|
114
114
|
},
|
|
115
115
|
"scripts": {
|
|
116
116
|
"build": "tsc -p tsconfig.build.json",
|
|
117
|
+
"check-types": "tsc -p tsconfig.json --noEmit",
|
|
117
118
|
"test": "vitest run && jest",
|
|
118
119
|
"test:web": "vitest run",
|
|
119
120
|
"test:native": "jest",
|
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
* Each block is the framework component plus the shared spec: the label, the fields and
|
|
5
5
|
* the defaults come from `src/shared`, and only the drawing is written here. What the
|
|
6
6
|
* platform draws differently is stated in the block: a paragraph's alignment is a
|
|
7
|
-
* property of its `
|
|
7
|
+
* property of its `Typography` rather than a class on a paragraph element, so the shared
|
|
8
8
|
* alignment vocabulary is what reaches the component.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import {
|
|
12
|
+
Container,
|
|
13
|
+
SECTION_BLOCK_TEXT_ALIGN,
|
|
14
|
+
Section,
|
|
15
|
+
Typography,
|
|
16
|
+
} from "@asheeui/native";
|
|
13
17
|
import { SectionHeading } from "@asheeui/native/section-kit";
|
|
14
18
|
import type {
|
|
15
19
|
AsheeBlock,
|
|
@@ -46,9 +50,11 @@ export const textBlock: AsheeBlock<TextBlockProps> = {
|
|
|
46
50
|
render: ({ text, align }) => (
|
|
47
51
|
<Section spacing="sm">
|
|
48
52
|
<Container>
|
|
49
|
-
<
|
|
53
|
+
<Typography
|
|
54
|
+
role="body-lg"
|
|
55
|
+
align={SECTION_BLOCK_TEXT_ALIGN[align ?? "start"]}>
|
|
50
56
|
{text}
|
|
51
|
-
</
|
|
57
|
+
</Typography>
|
|
52
58
|
</Container>
|
|
53
59
|
</Section>
|
|
54
60
|
),
|
package/src/native/root.tsx
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* framework's background role.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { AsheeConfigContext, AsheeUIProvider } from "@asheeui/native";
|
|
15
15
|
import { useContext } from "react";
|
|
16
16
|
import { View } from "react-native";
|
|
17
17
|
import type { AsheePuckRootProps } from "../shared";
|
|
@@ -23,13 +23,9 @@ import type { AsheePuckRootProps } from "../shared";
|
|
|
23
23
|
* @returns The page, inside the framework's provider when the application has none.
|
|
24
24
|
*/
|
|
25
25
|
export function PuckRoot({ children }: AsheePuckRootProps) {
|
|
26
|
-
const existingConfig = useContext(
|
|
26
|
+
const existingConfig = useContext(AsheeConfigContext);
|
|
27
27
|
|
|
28
28
|
const page = <View className="bg-background flex-1 w-full">{children}</View>;
|
|
29
29
|
|
|
30
|
-
return existingConfig ?
|
|
31
|
-
page
|
|
32
|
-
) : (
|
|
33
|
-
<AsheeNativeProvider>{page}</AsheeNativeProvider>
|
|
34
|
-
);
|
|
30
|
+
return existingConfig ? page : <AsheeUIProvider>{page}</AsheeUIProvider>;
|
|
35
31
|
}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* defaults still come from `src/shared`, so the platform offers the same two zones.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { cn } from "@asheeui/core";
|
|
13
12
|
import { Section } from "@asheeui/web";
|
|
14
13
|
import type { SlotComponent } from "@puckeditor/core";
|
|
14
|
+
import { cn } from "@asheeui/web";
|
|
15
15
|
import type {
|
|
16
16
|
AsheeBlock,
|
|
17
17
|
ColumnsBandProps,
|