@superblocksteam/library-shared 2.0.9-next.0 → 2.0.9-next.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/index.d.ts +13 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +10 -9
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +10 -9
- package/dist/types/index.js.map +1 -1
- package/dist/types/routing.d.ts +58 -0
- package/dist/types/routing.d.ts.map +1 -0
- package/dist/types/routing.js +2 -0
- package/dist/types/routing.js.map +1 -0
- package/dist/types/scope.d.ts.map +1 -1
- package/dist/utils/routing.d.ts +5 -0
- package/dist/utils/routing.d.ts.map +1 -0
- package/dist/utils/routing.js +9 -0
- package/dist/utils/routing.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
export * from "./apis.js";
|
|
2
|
+
export * from "./bindings.js";
|
|
3
|
+
export * from "./computed.js";
|
|
4
|
+
export * from "./event-trigger-constants.js";
|
|
1
5
|
export * from "./helper.js";
|
|
6
|
+
export * from "./layout.js";
|
|
7
|
+
export * from "./mobx-sync/index.js";
|
|
8
|
+
export * from "./pages.js";
|
|
9
|
+
export * from "./props/helpers.js";
|
|
10
|
+
export * from "./scope.js";
|
|
11
|
+
export * from "./utils/binding-identifier.js";
|
|
12
|
+
export * from "./utils/blocks.js";
|
|
13
|
+
export * from "./utils/computed-args.js";
|
|
2
14
|
export * from "./utils/dotted-paths.js";
|
|
3
15
|
export * from "./utils/name-generator.js";
|
|
4
16
|
export * from "./utils/properties.js";
|
|
17
|
+
export * from "./utils/routing.js";
|
|
5
18
|
export * from "./utils/source-id.js";
|
|
6
19
|
export * from "./utils/strings.js";
|
|
7
|
-
export * from "./utils/binding-identifier.js";
|
|
8
|
-
export * from "./utils/computed-args.js";
|
|
9
|
-
export * from "./utils/blocks.js";
|
|
10
|
-
export * from "./layout.js";
|
|
11
|
-
export * from "./pages.js";
|
|
12
|
-
export * from "./apis.js";
|
|
13
|
-
export * from "./mobx-sync/index.js";
|
|
14
|
-
export * from "./props/helpers.js";
|
|
15
|
-
export * from "./bindings.js";
|
|
16
|
-
export * from "./computed.js";
|
|
17
|
-
export * from "./scope.js";
|
|
18
|
-
export * from "./event-trigger-constants.js";
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
export * from "./apis.js";
|
|
2
|
+
export * from "./bindings.js";
|
|
3
|
+
export * from "./computed.js";
|
|
4
|
+
export * from "./event-trigger-constants.js";
|
|
1
5
|
export * from "./helper.js";
|
|
6
|
+
export * from "./layout.js";
|
|
7
|
+
export * from "./mobx-sync/index.js";
|
|
8
|
+
export * from "./pages.js";
|
|
9
|
+
export * from "./props/helpers.js";
|
|
10
|
+
export * from "./scope.js";
|
|
11
|
+
export * from "./utils/binding-identifier.js";
|
|
12
|
+
export * from "./utils/blocks.js";
|
|
13
|
+
export * from "./utils/computed-args.js";
|
|
2
14
|
export * from "./utils/dotted-paths.js";
|
|
3
15
|
export * from "./utils/name-generator.js";
|
|
4
16
|
export * from "./utils/properties.js";
|
|
17
|
+
export * from "./utils/routing.js";
|
|
5
18
|
export * from "./utils/source-id.js";
|
|
6
19
|
export * from "./utils/strings.js";
|
|
7
|
-
export * from "./utils/binding-identifier.js";
|
|
8
|
-
export * from "./utils/computed-args.js";
|
|
9
|
-
export * from "./utils/blocks.js";
|
|
10
|
-
export * from "./layout.js";
|
|
11
|
-
export * from "./pages.js";
|
|
12
|
-
export * from "./apis.js";
|
|
13
|
-
export * from "./mobx-sync/index.js";
|
|
14
|
-
export * from "./props/helpers.js";
|
|
15
|
-
export * from "./bindings.js";
|
|
16
|
-
export * from "./computed.js";
|
|
17
|
-
export * from "./scope.js";
|
|
18
|
-
export * from "./event-trigger-constants.js";
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
export * from "./ai.js";
|
|
2
|
+
export * from "./apis.js";
|
|
3
|
+
export * from "./base-entity-manager.js";
|
|
4
|
+
export * from "./binding-identifiers.js";
|
|
5
|
+
export * from "./common.js";
|
|
6
|
+
export * from "./edit-operations.js";
|
|
1
7
|
export * from "./entities.js";
|
|
8
|
+
export * from "./errors.js";
|
|
2
9
|
export * from "./events.js";
|
|
10
|
+
export * from "./mobx-patch.js";
|
|
11
|
+
export * from "./mobx-shared-state.js";
|
|
3
12
|
export * from "./parent-messages.js";
|
|
13
|
+
export * from "./routing.js";
|
|
4
14
|
export * from "./scope.js";
|
|
5
15
|
export * from "./socket.js";
|
|
6
16
|
export * from "./theme.js";
|
|
7
|
-
export * from "./common.js";
|
|
8
|
-
export * from "./edit-operations.js";
|
|
9
|
-
export * from "./apis.js";
|
|
10
|
-
export * from "./errors.js";
|
|
11
|
-
export * from "./mobx-patch.js";
|
|
12
|
-
export * from "./mobx-shared-state.js";
|
|
13
|
-
export * from "./binding-identifiers.js";
|
|
14
|
-
export * from "./ai.js";
|
|
15
17
|
export * from "./vite.js";
|
|
16
|
-
export * from "./base-entity-manager.js";
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
export * from "./ai.js";
|
|
2
|
+
export * from "./apis.js";
|
|
3
|
+
export * from "./base-entity-manager.js";
|
|
4
|
+
export * from "./binding-identifiers.js";
|
|
5
|
+
export * from "./common.js";
|
|
6
|
+
export * from "./edit-operations.js";
|
|
1
7
|
export * from "./entities.js";
|
|
8
|
+
export * from "./errors.js";
|
|
2
9
|
export * from "./events.js";
|
|
10
|
+
export * from "./mobx-patch.js";
|
|
11
|
+
export * from "./mobx-shared-state.js";
|
|
3
12
|
export * from "./parent-messages.js";
|
|
13
|
+
export * from "./routing.js";
|
|
4
14
|
export * from "./scope.js";
|
|
5
15
|
export * from "./socket.js";
|
|
6
16
|
export * from "./theme.js";
|
|
7
|
-
export * from "./common.js";
|
|
8
|
-
export * from "./edit-operations.js";
|
|
9
|
-
export * from "./apis.js";
|
|
10
|
-
export * from "./errors.js";
|
|
11
|
-
export * from "./mobx-patch.js";
|
|
12
|
-
export * from "./mobx-shared-state.js";
|
|
13
|
-
export * from "./binding-identifiers.js";
|
|
14
|
-
export * from "./ai.js";
|
|
15
17
|
export * from "./vite.js";
|
|
16
|
-
export * from "./base-entity-manager.js";
|
|
17
18
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export type RoutesFileDefinition = {
|
|
2
|
+
[route: string]: {
|
|
3
|
+
file: string;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export type UrlState = {
|
|
7
|
+
/**
|
|
8
|
+
* Search query parameters
|
|
9
|
+
* @example { q: 'query' }
|
|
10
|
+
*/
|
|
11
|
+
queryParams: Record<string, string>;
|
|
12
|
+
/**
|
|
13
|
+
* Current protocol
|
|
14
|
+
* @example "https"
|
|
15
|
+
*/
|
|
16
|
+
protocol: string;
|
|
17
|
+
/**
|
|
18
|
+
* Full host, including port if applicable
|
|
19
|
+
* @example "superblocks.com:443"
|
|
20
|
+
*/
|
|
21
|
+
host: string;
|
|
22
|
+
/**
|
|
23
|
+
* Domain name
|
|
24
|
+
* @example "superblocks.com"
|
|
25
|
+
*/
|
|
26
|
+
hostname: string;
|
|
27
|
+
/**
|
|
28
|
+
* The current port
|
|
29
|
+
* @example "8080"
|
|
30
|
+
*/
|
|
31
|
+
port: string;
|
|
32
|
+
/**
|
|
33
|
+
* Uninterpolated route
|
|
34
|
+
* @example "/orders/:orderId"
|
|
35
|
+
*/
|
|
36
|
+
route: string;
|
|
37
|
+
/**
|
|
38
|
+
* Route parameters
|
|
39
|
+
* @example { orderId: 123 }
|
|
40
|
+
*/
|
|
41
|
+
routeParams: Record<string, unknown>;
|
|
42
|
+
/**
|
|
43
|
+
* Interpolated pathname
|
|
44
|
+
* @example "/orders/123"
|
|
45
|
+
*/
|
|
46
|
+
pathname: string;
|
|
47
|
+
/**
|
|
48
|
+
* Route hash (/path#some-hash)
|
|
49
|
+
* @example "element-id"
|
|
50
|
+
*/
|
|
51
|
+
hash: string;
|
|
52
|
+
/**
|
|
53
|
+
* Full path, including domain, hash and search params
|
|
54
|
+
* @example "https://superblocks.com/orders/123#element-id?q=query"
|
|
55
|
+
*/
|
|
56
|
+
href: string;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/types/routing.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/types/routing.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/types/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/types/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IAEpC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const SYSTEM_PARAMS: string[];
|
|
2
|
+
export declare function getQueryParams(search: URLSearchParams | string | Record<string, string | readonly string[]> | Iterable<[string, string]> | ReadonlyArray<[string, string]>): {
|
|
3
|
+
[k: string]: string;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/utils/routing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAIzB,CAAC;AAEF,wBAAgB,cAAc,CAC5B,MAAM,EACF,eAAe,GACf,MAAM,GACN,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC,GAC1C,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC1B,aAAa,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;EAOpC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const SYSTEM_PARAMS = [
|
|
2
|
+
"ui_version",
|
|
3
|
+
"superblocks_user_email",
|
|
4
|
+
"superblocks_org_name",
|
|
5
|
+
];
|
|
6
|
+
export function getQueryParams(search) {
|
|
7
|
+
return Object.fromEntries([...new URLSearchParams(search).entries()].filter(([key]) => !SYSTEM_PARAMS.includes(key)));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=routing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/utils/routing.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY;IACZ,wBAAwB;IACxB,sBAAsB;CACvB,CAAC;AAEF,MAAM,UAAU,cAAc,CAC5B,MAKmC;IAEnC,OAAO,MAAM,CAAC,WAAW,CACvB,CAAC,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAC/C,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CACxC,CACF,CAAC;AACJ,CAAC"}
|