@ldo/svelte 1.0.0-alpha.34 → 1.0.0-alpha.38
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 +1 -1
- package/dist/createLdoSvelteMethods.cjs +1 -1
- package/dist/createLdoSvelteMethods.d.cts +1 -1
- package/dist/createLdoSvelteMethods.d.ts +1 -1
- package/dist/createLdoSvelteMethods.js +1 -1
- package/dist/createLdoSvelteMethods.js.map +1 -1
- package/package.json +8 -8
- package/src/createLdoSvelteMethods.tsx +1 -1
package/Readme.md
CHANGED
|
@@ -36,7 +36,7 @@ Use them in your svelte components
|
|
|
36
36
|
|
|
37
37
|
```svelte
|
|
38
38
|
<script lang="ts">
|
|
39
|
-
import { SolidProfileShapeShapeType } from "
|
|
39
|
+
import { SolidProfileShapeShapeType } from "./_ldo/solidProfile.shapeTypes.js";
|
|
40
40
|
// Assuming these are the Svelte-specific functions/stores from your @ldo/svelte library
|
|
41
41
|
import { useResource, useSubject } from "./ldoSvelteMethods.js";
|
|
42
42
|
const SAMPLE_DATA_URI =
|
|
@@ -38,7 +38,7 @@ const __ldo_connected = require_rolldown_runtime.__toESM(require("@ldo/connected
|
|
|
38
38
|
* `App.tsx`
|
|
39
39
|
* ```typescript
|
|
40
40
|
* import react, { FunctionComponent } from "react";
|
|
41
|
-
* import { PostShShapeType } from "
|
|
41
|
+
* import { PostShShapeType } from "./_ldo/posts.shapeType.ts";
|
|
42
42
|
* import { useResource, useSubject } from "./methods.ts";
|
|
43
43
|
*
|
|
44
44
|
* const UseSubjectTest: FunctionComponent = () => {
|
|
@@ -32,7 +32,7 @@ import { ConnectedPlugin } from "@ldo/connected";
|
|
|
32
32
|
* `App.tsx`
|
|
33
33
|
* ```typescript
|
|
34
34
|
* import react, { FunctionComponent } from "react";
|
|
35
|
-
* import { PostShShapeType } from "
|
|
35
|
+
* import { PostShShapeType } from "./_ldo/posts.shapeType.ts";
|
|
36
36
|
* import { useResource, useSubject } from "./methods.ts";
|
|
37
37
|
*
|
|
38
38
|
* const UseSubjectTest: FunctionComponent = () => {
|
|
@@ -32,7 +32,7 @@ import { ConnectedPlugin } from "@ldo/connected";
|
|
|
32
32
|
* `App.tsx`
|
|
33
33
|
* ```typescript
|
|
34
34
|
* import react, { FunctionComponent } from "react";
|
|
35
|
-
* import { PostShShapeType } from "
|
|
35
|
+
* import { PostShShapeType } from "./_ldo/posts.shapeType.ts";
|
|
36
36
|
* import { useResource, useSubject } from "./methods.ts";
|
|
37
37
|
*
|
|
38
38
|
* const UseSubjectTest: FunctionComponent = () => {
|
|
@@ -37,7 +37,7 @@ import { createConnectedLdoDataset } from "@ldo/connected";
|
|
|
37
37
|
* `App.tsx`
|
|
38
38
|
* ```typescript
|
|
39
39
|
* import react, { FunctionComponent } from "react";
|
|
40
|
-
* import { PostShShapeType } from "
|
|
40
|
+
* import { PostShShapeType } from "./_ldo/posts.shapeType.ts";
|
|
41
41
|
* import { useResource, useSubject } from "./methods.ts";
|
|
42
42
|
*
|
|
43
43
|
* const UseSubjectTest: FunctionComponent = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createLdoSvelteMethods.js","names":["plugins: Plugins"],"sources":["../src/createLdoSvelteMethods.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { createUseLdo } from \"./methods/useLdo\";\nimport {\n createConnectedLdoDataset,\n type ConnectedPlugin,\n} from \"@ldo/connected\";\nimport { createUseMatchObject } from \"./methods/useMatchObject\";\nimport { createUseMatchSubject } from \"./methods/useMatchSubject\";\nimport { createUseResource } from \"./methods/useResource\";\nimport { createUseSubject } from \"./methods/useSubject\";\nimport { createUseSubscribeToResource } from \"./methods/useSubscribeToResource\";\nimport { createUseLinkQuery } from \"./methods/useLinkQuery\";\n\n/**\n * A function that creates all common react functions given specific plugin.\n *\n * @example\n * `methods.ts`\n * ```tyepscript\n * import { solidConnectedPlugin } from \"@ldo/connected-solid\";\n * import { nextGraphConnectedPlugin } from \"@ldo/connected-nextgraph\";\n * import { createLdoReactMethods } from \"@ldo/react\";\n *\n * // Export the results to be used in the reset of the application\n * export const {\n * dataset,\n * useLdo,\n * useMatchObject,\n * useMatchSubject,\n * useResource,\n * useSubject,\n * useSubscribeToResource,\n * useLinkQuery,\n * } = createLdoReactMethods([\n * solidConnectedPlugin,\n * nextGraphConnectedPlugin\n * ]);\n * ```\n *\n * `App.tsx`\n * ```typescript\n * import react, { FunctionComponent } from \"react\";\n * import { PostShShapeType } from \"
|
|
1
|
+
{"version":3,"file":"createLdoSvelteMethods.js","names":["plugins: Plugins"],"sources":["../src/createLdoSvelteMethods.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { createUseLdo } from \"./methods/useLdo\";\nimport {\n createConnectedLdoDataset,\n type ConnectedPlugin,\n} from \"@ldo/connected\";\nimport { createUseMatchObject } from \"./methods/useMatchObject\";\nimport { createUseMatchSubject } from \"./methods/useMatchSubject\";\nimport { createUseResource } from \"./methods/useResource\";\nimport { createUseSubject } from \"./methods/useSubject\";\nimport { createUseSubscribeToResource } from \"./methods/useSubscribeToResource\";\nimport { createUseLinkQuery } from \"./methods/useLinkQuery\";\n\n/**\n * A function that creates all common react functions given specific plugin.\n *\n * @example\n * `methods.ts`\n * ```tyepscript\n * import { solidConnectedPlugin } from \"@ldo/connected-solid\";\n * import { nextGraphConnectedPlugin } from \"@ldo/connected-nextgraph\";\n * import { createLdoReactMethods } from \"@ldo/react\";\n *\n * // Export the results to be used in the reset of the application\n * export const {\n * dataset,\n * useLdo,\n * useMatchObject,\n * useMatchSubject,\n * useResource,\n * useSubject,\n * useSubscribeToResource,\n * useLinkQuery,\n * } = createLdoReactMethods([\n * solidConnectedPlugin,\n * nextGraphConnectedPlugin\n * ]);\n * ```\n *\n * `App.tsx`\n * ```typescript\n * import react, { FunctionComponent } from \"react\";\n * import { PostShShapeType } from \"./_ldo/posts.shapeType.ts\";\n * import { useResource, useSubject } from \"./methods.ts\";\n *\n * const UseSubjectTest: FunctionComponent = () => {\n * const resource = useResource(SAMPLE_DATA_URI);\n * const post = useSubject(PostShShapeType, `${SAMPLE_DATA_URI}#Post1`);\n * if (resource.isLoading() || !post) return <p>loading</p>;\n *\n * return (\n * <ul>\n * {post.publisher.map((publisher) => {\n * return <li key={publisher[\"@id\"]}>{publisher[\"@id\"]}</li>;\n * })}\n * </ul>\n * );\n * };\n * ```\n */\nexport function createLdoSvelteMethods<\n Plugins extends ConnectedPlugin<any, any, any, any>[],\n>(plugins: Plugins) {\n const dataset = createConnectedLdoDataset(plugins);\n dataset.setMaxListeners(1000);\n\n return {\n dataset,\n useLdo: createUseLdo<Plugins>(dataset),\n useMatchObject: createUseMatchObject<Plugins>(dataset),\n useMatchSubject: createUseMatchSubject<Plugins>(dataset),\n useResource: createUseResource<Plugins>(dataset),\n useSubject: createUseSubject<Plugins>(dataset),\n useSubscribeToResource: createUseSubscribeToResource<Plugins>(dataset),\n useLinkQuery: createUseLinkQuery<Plugins>(dataset),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,SAAgB,uBAEdA,SAAkB;CAClB,MAAM,UAAU,0BAA0B,QAAQ;AAClD,SAAQ,gBAAgB,IAAK;AAE7B,QAAO;EACL;EACA,QAAQ,aAAsB,QAAQ;EACtC,gBAAgB,qBAA8B,QAAQ;EACtD,iBAAiB,sBAA+B,QAAQ;EACxD,aAAa,kBAA2B,QAAQ;EAChD,YAAY,iBAA0B,QAAQ;EAC9C,wBAAwB,6BAAsC,QAAQ;EACtE,cAAc,mBAA4B,QAAQ;CACnD;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldo/svelte",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.38",
|
|
4
4
|
"description": "A Svelte library for LDO.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/o-development/ldo/tree/main/packages/svelte#readme",
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@ldo/test-solid-server": "^1.0.0-alpha.
|
|
45
|
+
"@ldo/test-solid-server": "^1.0.0-alpha.38",
|
|
46
46
|
"@sveltejs/vite-plugin-svelte": "^2.5.3",
|
|
47
47
|
"@testing-library/jest-dom": "^6.6.3",
|
|
48
48
|
"@testing-library/svelte": "^5.2.7",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"svelte": "^3.50.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@ldo/connected": "^1.0.0-alpha.
|
|
67
|
-
"@ldo/jsonld-dataset-proxy": "^1.0.0-alpha.
|
|
68
|
-
"@ldo/ldo": "^1.0.0-alpha.
|
|
69
|
-
"@ldo/rdf-utils": "^1.0.0-alpha.
|
|
70
|
-
"@ldo/subscribable-dataset": "^1.0.0-alpha.
|
|
66
|
+
"@ldo/connected": "^1.0.0-alpha.38",
|
|
67
|
+
"@ldo/jsonld-dataset-proxy": "^1.0.0-alpha.38",
|
|
68
|
+
"@ldo/ldo": "^1.0.0-alpha.38",
|
|
69
|
+
"@ldo/rdf-utils": "^1.0.0-alpha.38",
|
|
70
|
+
"@ldo/subscribable-dataset": "^1.0.0-alpha.38",
|
|
71
71
|
"tsx": "^4.19.4"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "c09a1e1c1c5eee9682e141e0657e4bef3b9973b9"
|
|
81
81
|
}
|
|
@@ -40,7 +40,7 @@ import { createUseLinkQuery } from "./methods/useLinkQuery";
|
|
|
40
40
|
* `App.tsx`
|
|
41
41
|
* ```typescript
|
|
42
42
|
* import react, { FunctionComponent } from "react";
|
|
43
|
-
* import { PostShShapeType } from "
|
|
43
|
+
* import { PostShShapeType } from "./_ldo/posts.shapeType.ts";
|
|
44
44
|
* import { useResource, useSubject } from "./methods.ts";
|
|
45
45
|
*
|
|
46
46
|
* const UseSubjectTest: FunctionComponent = () => {
|