@arpproject/recrate 0.1.2 → 0.1.3
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/package.json +5 -4
- package/postcss.config.cjs +1 -1
- package/src/app/EmbeddedComponent.tsx +3 -3
- package/src/crate-builder/RenderEntity/ItemLink.tsx +1 -1
- package/src/crate-builder/RenderEntity/RenderControls.tsx +2 -2
- package/src/crate-builder/RenderEntity/RenderLinkedItem.tsx +1 -1
- package/src/crate-builder/RenderEntity/RenderReverseConnections.tsx +2 -2
- package/src/crate-builder/primitives/Number.tsx +1 -1
- package/src/crate-builder/primitives/Select.tsx +5 -6
- package/src/crate-builder/primitives/Text.tsx +1 -1
- package/src/crate-builder/primitives/Url.tsx +1 -1
- package/src/crate-builder/tailwind.css +1 -3
- package/vite.config.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arpproject/recrate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"main": "dist/describo-crate-builder.umd.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"react-i18next": "^12.3.1",
|
|
57
57
|
"react-to-webcomponent": "^2.0.1",
|
|
58
58
|
"react-window": "^2.1.1",
|
|
59
|
-
"tailwindcss": "^
|
|
59
|
+
"tailwindcss": "^4.1.16",
|
|
60
|
+
"@tailwindcss/postcss": "^4.1.16",
|
|
60
61
|
"uuid": "^11.1.0",
|
|
61
62
|
"validate-iri": "^1.0.1",
|
|
62
63
|
"validator": "^13.15.0",
|
|
@@ -108,7 +109,7 @@
|
|
|
108
109
|
"@storybook/react": "^8.6.12",
|
|
109
110
|
"@storybook/react-vite": "^8.6.12",
|
|
110
111
|
"@storybook/test": "^8.6.12",
|
|
111
|
-
"@tailwindcss/
|
|
112
|
+
"@tailwindcss/vite": "^4.1.16",
|
|
112
113
|
"@types/chance": "^1.1.6",
|
|
113
114
|
"@types/fs-extra": "^11.0.4",
|
|
114
115
|
"@types/terraformer__wkt": "^2.0.3",
|
|
@@ -126,7 +127,7 @@
|
|
|
126
127
|
"react-dom": "^18.2.0",
|
|
127
128
|
"storybook": "^8.6.12",
|
|
128
129
|
"typescript": "^5.4.3",
|
|
129
|
-
"vite": "^
|
|
130
|
+
"vite": "^6.0.0"
|
|
130
131
|
},
|
|
131
132
|
"peerDependencies": {
|
|
132
133
|
"react": "^18.0.0 || ^19.0.0",
|
package/postcss.config.cjs
CHANGED
|
@@ -221,13 +221,13 @@ const EmbeddedComponent: React.FC = () => {
|
|
|
221
221
|
return (
|
|
222
222
|
<div className="flex flex-row space-x-2 w-screen">
|
|
223
223
|
<div className="flex flex-col space-y-2 w-4/6">
|
|
224
|
-
<div className="flex flex-row
|
|
224
|
+
<div className="flex flex-row gap-x-2">
|
|
225
225
|
<Select
|
|
226
226
|
size='middle'
|
|
227
227
|
value={data.select.crate || undefined}
|
|
228
228
|
onChange={handleCrateChange}
|
|
229
229
|
placeholder="Select a crate"
|
|
230
|
-
style={{ width: '100%' }}
|
|
230
|
+
style={{ width: '100%', minWidth: '190px' }}
|
|
231
231
|
>
|
|
232
232
|
{data.crates.map((crate) => (
|
|
233
233
|
<Select.Option key={crate.name} value={crate.name}>
|
|
@@ -241,7 +241,7 @@ const EmbeddedComponent: React.FC = () => {
|
|
|
241
241
|
value={data.select.profile || undefined}
|
|
242
242
|
onChange={handleProfileChange}
|
|
243
243
|
placeholder="Select a profile"
|
|
244
|
-
style={{ width: '100%' }}
|
|
244
|
+
style={{ width: '100%', minWidth: '190px' }}
|
|
245
245
|
>
|
|
246
246
|
{data.profiles.map((profile) => (
|
|
247
247
|
<Select.Option key={profile.name} value={profile.name}>
|
|
@@ -18,7 +18,7 @@ export const ItemLink: React.FC<ItemLinkProps> = ({ entity, onLoadEntity, classN
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<div className={`flex flex-col w-full ${className || ''}`} onClick={handleLoadEntity}>
|
|
21
|
+
<div className={`flex flex-col m-4 w-full ${className || ''}`} onClick={handleLoadEntity}>
|
|
22
22
|
<Typography.Text type="secondary" style={{ fontSize: '0.75rem' }} className="pb-1 mb-1 border-b border-black/20">
|
|
23
23
|
{decodeURIComponent(entity['@id'])}
|
|
24
24
|
</Typography.Text>
|
|
@@ -130,9 +130,9 @@ const RenderControls: React.FC<RenderControlsProps> = ({
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
return (
|
|
133
|
-
<Flex className="flex-row
|
|
133
|
+
<Flex className="flex-row gap-x-1">
|
|
134
134
|
{/* Navigation Controls */}
|
|
135
|
-
<Flex className="flex-row
|
|
135
|
+
<Flex className="flex-row gap-x-1">
|
|
136
136
|
<Button
|
|
137
137
|
onClick={handleBack}
|
|
138
138
|
type="primary"
|
|
@@ -81,7 +81,7 @@ const RenderLinkedItem: React.FC<RenderLinkedItemProps> = ({
|
|
|
81
81
|
<Flex className="describo-render-item-link py-1 rounded hover:rounded-r-none">
|
|
82
82
|
<Flex
|
|
83
83
|
vertical
|
|
84
|
-
style={{ margin: entity?.associations?.length ? 8 :
|
|
84
|
+
style={{ margin: entity?.associations?.length ? 8 : 2 }}
|
|
85
85
|
>
|
|
86
86
|
<Card
|
|
87
87
|
style={{
|
|
@@ -104,7 +104,7 @@ const RenderReverseConnections: React.FC<RenderReverseConnectionsProps> = ({
|
|
|
104
104
|
<Typography.Text className="text-lg mb-2">{t("links_to_this_entity")}</Typography.Text>
|
|
105
105
|
<div className="flex-grow" />
|
|
106
106
|
</div>
|
|
107
|
-
<div className="flex flex-col
|
|
107
|
+
<div className="flex flex-col gap-y-2">
|
|
108
108
|
<Pagination
|
|
109
109
|
current={currentPage}
|
|
110
110
|
total={connections.total}
|
|
@@ -131,7 +131,7 @@ const RenderReverseConnections: React.FC<RenderReverseConnectionsProps> = ({
|
|
|
131
131
|
hoverable
|
|
132
132
|
>
|
|
133
133
|
<Card.Meta
|
|
134
|
-
className="describo-render-item-link"
|
|
134
|
+
className="describo-render-item-link m-2"
|
|
135
135
|
title={
|
|
136
136
|
<RenderItemLink
|
|
137
137
|
entity={entity}
|
|
@@ -124,7 +124,7 @@ const NumberComponent: React.FC<NumberProps> = ({
|
|
|
124
124
|
|
|
125
125
|
return (
|
|
126
126
|
<div className="flex flex-col w-full describo-property-type-number">
|
|
127
|
-
<div className="flex flex-row
|
|
127
|
+
<div className="flex flex-row gap-x-2">
|
|
128
128
|
<Input
|
|
129
129
|
size='middle'
|
|
130
130
|
type="number"
|
|
@@ -82,19 +82,18 @@ const SelectComponent: React.FC<SelectProps> = ({
|
|
|
82
82
|
return (
|
|
83
83
|
<div className="flex flex-col w-full describo-property-type-select">
|
|
84
84
|
<Checkbox.Group
|
|
85
|
-
className="
|
|
85
|
+
className="flex flex-col gap-1"
|
|
86
86
|
value={isArray(internalValue) ? internalValue : []}
|
|
87
87
|
onChange={(checkedValues) => save(checkedValues as string[])}
|
|
88
88
|
>
|
|
89
89
|
{definition.values.map((value, idx) => (
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
</Checkbox>
|
|
94
|
-
</div>
|
|
90
|
+
<Checkbox key={idx} value={value} className="block">
|
|
91
|
+
{value}
|
|
92
|
+
</Checkbox>
|
|
95
93
|
))}
|
|
96
94
|
</Checkbox.Group>
|
|
97
95
|
</div>
|
|
96
|
+
|
|
98
97
|
);
|
|
99
98
|
}
|
|
100
99
|
|
|
@@ -151,7 +151,7 @@ const Text: React.FC<TextProps> = ({
|
|
|
151
151
|
|
|
152
152
|
return (
|
|
153
153
|
<div className="flex flex-col w-full space-y-2 describo-property-type-text">
|
|
154
|
-
<div className="flex flex-row
|
|
154
|
+
<div className="flex flex-row gap-x-2">
|
|
155
155
|
{type !== 'textarea' ? (
|
|
156
156
|
<Input
|
|
157
157
|
size='middle'
|
|
@@ -46,7 +46,7 @@ const Url: React.FC<UrlProps> = ({
|
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
48
|
<div className="flex flex-col describo-property-type-url">
|
|
49
|
-
<div className="flex flex-row flex-grow
|
|
49
|
+
<div className="flex flex-row flex-grow gap-x-2">
|
|
50
50
|
<Input
|
|
51
51
|
size='middle'
|
|
52
52
|
value={internalValue}
|
package/vite.config.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { defineConfig } from 'vite';
|
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import dts from 'vite-plugin-dts';
|
|
5
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
5
6
|
|
|
6
7
|
export default defineConfig({
|
|
7
8
|
server: {
|
|
@@ -11,6 +12,7 @@ export default defineConfig({
|
|
|
11
12
|
// For Describo
|
|
12
13
|
plugins: [
|
|
13
14
|
react(),
|
|
15
|
+
tailwindcss(),
|
|
14
16
|
dts({
|
|
15
17
|
include: ["src"],
|
|
16
18
|
insertTypesEntry: true, // <== important!
|