@arpproject/recrate 0.1.3 → 0.1.4
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/README.md +5 -5
- package/dist/crate-builder/emotionCache.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/recrate.css +1896 -0
- package/dist/recrate.es.js +63295 -104099
- package/dist/recrate.umd.js +35999 -76803
- package/package.json +6 -5
- package/src/crate-builder/Shell.tsx +31 -17
- package/src/crate-builder/emotionCache.ts +8 -0
- package/src/crate-builder/recrate.css +3 -0
- package/src/index.ts +2 -0
- package/tailwind.config.js +1 -0
- package/vite.config.ts +4 -1
- package/dist/style.css +0 -1721
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arpproject/recrate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"main": "dist/describo-crate-builder.umd.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"import": "./dist/recrate.es.js",
|
|
9
|
-
"require": "./dist/recrate.umd.js"
|
|
9
|
+
"require": "./dist/recrate.umd.js",
|
|
10
|
+
"default": "./dist/index.d.ts"
|
|
10
11
|
},
|
|
11
12
|
"./style.css": {
|
|
12
|
-
"import": "./dist/
|
|
13
|
+
"import": "./dist/recrate.css"
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
"types": "dist/index.d.ts",
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
"@codemirror/lang-javascript": "^6.2.3",
|
|
19
20
|
"@codemirror/state": "^6.5.2",
|
|
20
21
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
22
|
+
"@emotion/cache": "^11.14.0",
|
|
21
23
|
"@emotion/react": "^11.14.0",
|
|
22
24
|
"@emotion/styled": "^11.14.0",
|
|
23
25
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
|
@@ -31,6 +33,7 @@
|
|
|
31
33
|
"@mui/material": "^7.1.0",
|
|
32
34
|
"@mui/system": "^7.1.0",
|
|
33
35
|
"@mui/x-date-pickers": "^8.2.0",
|
|
36
|
+
"@tailwindcss/postcss": "^4.1.16",
|
|
34
37
|
"@terraformer/wkt": "^2.2.1",
|
|
35
38
|
"@testing-library/dom": "^10.4.0",
|
|
36
39
|
"@testing-library/jest-dom": "^6.6.3",
|
|
@@ -57,7 +60,6 @@
|
|
|
57
60
|
"react-to-webcomponent": "^2.0.1",
|
|
58
61
|
"react-window": "^2.1.1",
|
|
59
62
|
"tailwindcss": "^4.1.16",
|
|
60
|
-
"@tailwindcss/postcss": "^4.1.16",
|
|
61
63
|
"uuid": "^11.1.0",
|
|
62
64
|
"validate-iri": "^1.0.1",
|
|
63
65
|
"validator": "^13.15.0",
|
|
@@ -71,7 +73,6 @@
|
|
|
71
73
|
"build": "vite build",
|
|
72
74
|
"storybook": "storybook dev -p 6006",
|
|
73
75
|
"build-storybook": "storybook build",
|
|
74
|
-
"develop": "npm install --legacy-peer-deps && npm run update-dependencies && npm run start:elastic && vite && npm run stop:elastic",
|
|
75
76
|
"update-dependencies": "bash -x ./update-deps.sh",
|
|
76
77
|
"test": "./node_modules/.bin/vitest run",
|
|
77
78
|
"test:watch": "./node_modules/.bin/vitest watch",
|
|
@@ -22,6 +22,12 @@ import isFunction from "lodash/isFunction";
|
|
|
22
22
|
import { CrateManagerType, ProfileManagerType, UnverifiedCrate } from "./types"; // Add appropriate types
|
|
23
23
|
import { propertyDefinitions } from "./property-definitions";
|
|
24
24
|
import { Lookup } from "./RenderEntity/auto-complete.lib";
|
|
25
|
+
import { App as AntApp, ConfigProvider } from 'antd';
|
|
26
|
+
import { createScopedCache } from './emotionCache';
|
|
27
|
+
import { CacheProvider } from "@emotion/react";
|
|
28
|
+
|
|
29
|
+
const antdCache = createScopedCache('recrate');
|
|
30
|
+
|
|
25
31
|
|
|
26
32
|
export interface DescriboCrateBuilderProps {
|
|
27
33
|
crate?: CrateManagerType["crate"];
|
|
@@ -300,23 +306,31 @@ export function DescriboCrateBuilder(props: DescriboCrateBuilderProps): JSX.Elem
|
|
|
300
306
|
};
|
|
301
307
|
|
|
302
308
|
return (
|
|
303
|
-
<
|
|
304
|
-
<
|
|
305
|
-
<
|
|
306
|
-
|
|
307
|
-
<
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
309
|
+
<div className="recrate">
|
|
310
|
+
<CacheProvider value={antdCache}>
|
|
311
|
+
<ConfigProvider>
|
|
312
|
+
<AntApp className="recrate-ant">
|
|
313
|
+
<ProfileManagerContext.Provider value={pm}>
|
|
314
|
+
<CrateManagerContext.Provider value={cm}>
|
|
315
|
+
<LookupsContext.Provider value={lookups}>
|
|
316
|
+
{ready && !error && contextEntity && (
|
|
317
|
+
<RenderEntity
|
|
318
|
+
ref={renderEntityRef}
|
|
319
|
+
entity={contextEntity}
|
|
320
|
+
onLoadEntity={handleSetCurrentEntity}
|
|
321
|
+
onSaveCrate={saveCrate}
|
|
322
|
+
onSaveEntityTemplate={saveEntityAsTemplate}
|
|
323
|
+
onWarning={handleWarning}
|
|
324
|
+
onError={handleError}
|
|
325
|
+
/>
|
|
326
|
+
)}
|
|
327
|
+
</LookupsContext.Provider>
|
|
328
|
+
</CrateManagerContext.Provider>
|
|
329
|
+
</ProfileManagerContext.Provider>
|
|
330
|
+
</AntApp>
|
|
331
|
+
</ConfigProvider>
|
|
332
|
+
</CacheProvider>
|
|
333
|
+
</div>
|
|
320
334
|
);
|
|
321
335
|
};
|
|
322
336
|
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import "./crate-builder/component.css";
|
|
2
2
|
import "./crate-builder/tailwind.css";
|
|
3
|
+
import "./crate-builder/recrate.css";
|
|
3
4
|
//import { DescriboCrateBuilder, DescriboCrateBuilderProps } from "./crate-builder/Shell";
|
|
4
5
|
|
|
5
6
|
//export default { DescriboCrateBuilder };
|
|
6
7
|
export type { JSONObject } from "./types";
|
|
8
|
+
export type { DescriboCrateBuilderProps } from "./types";
|
|
7
9
|
|
|
8
10
|
import { DescriboCrateBuilder } from "./crate-builder/Shell";
|
|
9
11
|
export { DescriboCrateBuilder };
|
package/tailwind.config.js
CHANGED
package/vite.config.ts
CHANGED
|
@@ -7,7 +7,7 @@ import tailwindcss from "@tailwindcss/vite";
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
server: {
|
|
9
9
|
host: "0.0.0.0",
|
|
10
|
-
port:
|
|
10
|
+
port: 9000,
|
|
11
11
|
},
|
|
12
12
|
// For Describo
|
|
13
13
|
plugins: [
|
|
@@ -39,5 +39,8 @@ export default defineConfig({
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
+
css: {
|
|
43
|
+
postcss: './postcss.config.js',
|
|
44
|
+
}
|
|
42
45
|
|
|
43
46
|
})
|