@_linked/shape-ui 2.3.2 → 2.3.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/lib/esm/package.d.ts +18 -3
- package/lib/esm/package.js +16 -3
- package/lib/esm/package.js.map +1 -1
- package/lib/esm/utils/helper.d.ts +8 -0
- package/lib/esm/utils/helper.js +27 -0
- package/lib/esm/utils/helper.js.map +1 -0
- package/package.json +5 -5
- package/src/package.ts +20 -15
package/lib/esm/package.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This package's own identity.
|
|
3
|
+
*
|
|
4
|
+
* It used to re-export `@_linked/core`'s decorators verbatim, which meant any
|
|
5
|
+
* shape declared here would register under the package name `@_linked/core`
|
|
6
|
+
* and carry a `.../shape/core/...` IRI. A third name — a cosmetic
|
|
7
|
+
* `packageName: '@_linked/ui'` literal — matched neither the npm name nor the
|
|
8
|
+
* registration.
|
|
9
|
+
*
|
|
10
|
+
* Nothing is decorated here today, so nothing was mis-registered. The point is
|
|
11
|
+
* that the next shape added to this package would have been, silently: a shape
|
|
12
|
+
* whose IRI names the wrong package is unreachable by `Server.call`, which
|
|
13
|
+
* routes on exactly that name.
|
|
14
|
+
*/
|
|
15
|
+
export declare const linkedShape: {
|
|
16
|
+
<T extends typeof import("@_linked/core/shapes/Shape").Shape>(constructor: T): void;
|
|
17
|
+
<T extends typeof import("@_linked/core/shapes/Shape").Shape>(config?: import("@_linked/core/utils/Package").ShapeConfig): (constructor: T) => void;
|
|
18
|
+
}, linkedUtil: (constructor: any) => any, linkedOntology: (allFileExports: any, nameSpace: (term: string) => import("@_linked/core/utils/NodeReference").NodeReferenceValue, suggestedPrefixAndFileName: string, loadDataFunction?: () => Promise<any>, dataSource?: string | string[]) => void, registerPackageExport: (exportedObject: any) => void, registerPackageModule: (_module: any) => void, getPackageShape: (name: string) => import("@_linked/core/shapes/Shape").ShapeConstructor | undefined, packageExports: any, packageName: string;
|
package/lib/esm/package.js
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { linkedPackage } from '@_linked/core/utils/Package';
|
|
2
|
+
/**
|
|
3
|
+
* This package's own identity.
|
|
4
|
+
*
|
|
5
|
+
* It used to re-export `@_linked/core`'s decorators verbatim, which meant any
|
|
6
|
+
* shape declared here would register under the package name `@_linked/core`
|
|
7
|
+
* and carry a `.../shape/core/...` IRI. A third name — a cosmetic
|
|
8
|
+
* `packageName: '@_linked/ui'` literal — matched neither the npm name nor the
|
|
9
|
+
* registration.
|
|
10
|
+
*
|
|
11
|
+
* Nothing is decorated here today, so nothing was mis-registered. The point is
|
|
12
|
+
* that the next shape added to this package would have been, silently: a shape
|
|
13
|
+
* whose IRI names the wrong package is unreachable by `Server.call`, which
|
|
14
|
+
* routes on exactly that name.
|
|
15
|
+
*/
|
|
16
|
+
export const { linkedShape, linkedUtil, linkedOntology, registerPackageExport, registerPackageModule, getPackageShape, packageExports, packageName, } = linkedPackage('@_linked/shape-ui');
|
|
4
17
|
//# sourceMappingURL=package.js.map
|
package/lib/esm/package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAE1D;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,EACX,WAAW,EACX,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,WAAW,GACZ,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function generateRandomName(format: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Fixes the image path for Android devices during development.
|
|
4
|
+
* Replaces 'localhost' with the appropriate site root URL.
|
|
5
|
+
* @param croppedImage
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function replaceLocalhostWithSiteRoot(croppedImage: string): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Capacitor } from '@capacitor/core';
|
|
2
|
+
// currently use for generate
|
|
3
|
+
export function generateRandomName(format) {
|
|
4
|
+
const timestamp = new Date().getTime();
|
|
5
|
+
const randomString = Math.random().toString(15).substring(7); // Generate a random string
|
|
6
|
+
return format
|
|
7
|
+
? `${timestamp}_${randomString}.${format}`
|
|
8
|
+
: `${timestamp}_${randomString}`;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Fixes the image path for Android devices during development.
|
|
12
|
+
* Replaces 'localhost' with the appropriate site root URL.
|
|
13
|
+
* @param croppedImage
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export function replaceLocalhostWithSiteRoot(croppedImage) {
|
|
17
|
+
let imageSrc = croppedImage;
|
|
18
|
+
if (imageSrc &&
|
|
19
|
+
process.env.NODE_ENV !== 'production' &&
|
|
20
|
+
Capacitor.getPlatform() === 'android') {
|
|
21
|
+
if (imageSrc.includes('localhost')) {
|
|
22
|
+
imageSrc = imageSrc.replace(/http\:\/\/localhost\:\d+/, process.env.SITE_ROOT);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return imageSrc;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/utils/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,6BAA6B;AAC7B,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IACvC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,2BAA2B;IAEzF,OAAO,MAAM;QACX,CAAC,CAAC,GAAG,SAAS,IAAI,YAAY,IAAI,MAAM,EAAE;QAC1C,CAAC,CAAC,GAAG,SAAS,IAAI,YAAY,EAAE,CAAC;AACrC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAAC,YAAoB;IAC/D,IAAI,QAAQ,GAAG,YAAY,CAAC;IAC5B,IACE,QAAQ;QACR,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;QACrC,SAAS,CAAC,WAAW,EAAE,KAAK,SAAS,EACrC,CAAC;QACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACnC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CACzB,0BAA0B,EAC1B,OAAO,CAAC,GAAG,CAAC,SAAS,CACtB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/linked-fw/shape-ui.git"
|
|
12
12
|
},
|
|
13
|
-
"version": "2.3.
|
|
13
|
+
"version": "2.3.4",
|
|
14
14
|
"packageManager": "npm@11.19.1",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"linkedPackage": true,
|
|
17
17
|
"main": "lib/esm/index.js",
|
|
18
|
-
"types": "
|
|
18
|
+
"types": "index.d.ts",
|
|
19
19
|
"license": "ISC",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"start": "npm exec linked dev",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"@changesets/changelog-github": "^0.5.2",
|
|
46
46
|
"@changesets/cli": "^2.29.8",
|
|
47
47
|
"@types/node": "^20.14.9",
|
|
48
|
-
"@types/react": "^
|
|
48
|
+
"@types/react": "^19.3.0",
|
|
49
49
|
"copyfiles": "^2.4.1",
|
|
50
50
|
"framer-motion": "^12.0.0",
|
|
51
|
-
"react": "^
|
|
52
|
-
"react-dom": "^
|
|
51
|
+
"react": "^19.3.0",
|
|
52
|
+
"react-dom": "^19.3.0",
|
|
53
53
|
"rimraf": "^5.0.7",
|
|
54
54
|
"tsconfig-to-dual-package": "^1.2.0",
|
|
55
55
|
"typescript": "^5.7.3",
|
package/src/package.ts
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {linkedPackage} from '@_linked/core/utils/Package';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This package's own identity.
|
|
5
|
+
*
|
|
6
|
+
* It used to re-export `@_linked/core`'s decorators verbatim, which meant any
|
|
7
|
+
* shape declared here would register under the package name `@_linked/core`
|
|
8
|
+
* and carry a `.../shape/core/...` IRI. A third name — a cosmetic
|
|
9
|
+
* `packageName: '@_linked/ui'` literal — matched neither the npm name nor the
|
|
10
|
+
* registration.
|
|
11
|
+
*
|
|
12
|
+
* Nothing is decorated here today, so nothing was mis-registered. The point is
|
|
13
|
+
* that the next shape added to this package would have been, silently: a shape
|
|
14
|
+
* whose IRI names the wrong package is unreachable by `Server.call`, which
|
|
15
|
+
* routes on exactly that name.
|
|
16
|
+
*/
|
|
17
|
+
export const {
|
|
4
18
|
linkedShape,
|
|
5
19
|
linkedUtil,
|
|
6
|
-
|
|
20
|
+
linkedOntology,
|
|
7
21
|
registerPackageExport,
|
|
8
22
|
registerPackageModule,
|
|
9
|
-
} from '@_linked/core/package';
|
|
10
|
-
|
|
11
|
-
export const { packageName } = { packageName: '@_linked/ui' };
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
23
|
getPackageShape,
|
|
15
|
-
linkedOntology,
|
|
16
|
-
linkedShape,
|
|
17
|
-
linkedUtil,
|
|
18
24
|
packageExports,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
25
|
+
packageName,
|
|
26
|
+
} = linkedPackage('@_linked/shape-ui');
|