@plitzi/sdk-navigation 0.38.16 → 0.38.17
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/CHANGELOG.md +44 -0
- package/dist/NavigationHelper.mjs +1 -2
- package/dist/hooks/useNavigation.mjs +1 -1
- package/package.json +13 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @plitzi/sdk-navigation
|
|
2
2
|
|
|
3
|
+
## 0.38.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4f8dc37: ## Packages
|
|
8
|
+
|
|
9
|
+
- **A library package is imported by its root and its folders, never by a file** (`@plitzi/sdk-shared`, `sdk-schema`,
|
|
10
|
+
`sdk-style`, `sdk-elements`, `sdk-interactions`, `sdk-auth`, `sdk-dev-tools`, `sdk-event-bridge`, `sdk-navigation`,
|
|
11
|
+
`sdk-plugins`, `sdk-variables`): each `exports` is now `"."` and `"./*"`, the latter a folder's `index`.
|
|
12
|
+
`@plitzi/sdk-shared/helpers/isRecord` becomes `import { isRecord } from '@plitzi/sdk-shared/helpers'`, and a default
|
|
13
|
+
export by the name its folder gives it — almost always its file's (`import usePlitzi from '…/hooks/usePlitzi'` →
|
|
14
|
+
`import { usePlitzi } from '@plitzi/sdk-shared/hooks'`). A file-level specifier now fails with `ERR_MODULE_NOT_FOUND`.
|
|
15
|
+
New entries where a folder barrel would have brought more than was asked for: `@plitzi/sdk-shared/project` and
|
|
16
|
+
`@plitzi/sdk-shared/plugins/bundle` (Node only), `@plitzi/sdk-interactions/declarations` (the global callbacks and
|
|
17
|
+
utility specs, without React), and `@plitzi/sdk-elements/elements/declarations`, which now also carries the
|
|
18
|
+
declarations' attribute types and the constants they are checked with. `RuleGroup` is exported by `@plitzi/sdk-shared`
|
|
19
|
+
with the document types that use it. `plitzi upgrade migrations` names every such import in a project, with the folder to
|
|
20
|
+
import it from instead.
|
|
21
|
+
- **`@plitzi/sdk-shared`'s root exports the document types, and only them** (`@plitzi/sdk-shared`): what the package
|
|
22
|
+
does is imported from its folder — `formatDate` from `@plitzi/sdk-shared/helpers`, `ThemeProvider` from
|
|
23
|
+
`@plitzi/sdk-shared/theme`, a GraphQL operation's types from `@plitzi/sdk-shared/network/graphql` — so a module that
|
|
24
|
+
imports a type from the root no longer loads every area of the package.
|
|
25
|
+
- **What one package alone used lives in that package** (`@plitzi/sdk-shared`, `@plitzi/sdk-elements`): the data
|
|
26
|
+
source hooks moved from `@plitzi/sdk-shared/dataSource/hooks` to `@plitzi/sdk-elements/dataSource`
|
|
27
|
+
(`useRegisterSource`, `useResolvedVariables`), and the Apollo links the builder's client is built with into the
|
|
28
|
+
builder.
|
|
29
|
+
- **The builder's panels are an entry of their own** (`@plitzi/sdk-style`, `@plitzi/sdk-variables`,
|
|
30
|
+
`@plitzi/sdk-elements`): the style inspector, the advanced style editor and `BuilderStyleContextProvider` are imported
|
|
31
|
+
from `@plitzi/sdk-style/builder`; the variables' lists and forms from `@plitzi/sdk-variables/builder`; the elements'
|
|
32
|
+
settings panels (`defaultElementsSettings`) from `@plitzi/sdk-elements/builder`. Each package's root keeps what a page
|
|
33
|
+
and a server use — `generateCache` no longer loads the inspector, on a server 227 modules down to 21.
|
|
34
|
+
|
|
35
|
+
## CLI
|
|
36
|
+
- **`plitzi upgrade`'s `renames` part is now `migrations`** (`@plitzi/cli`): what a version changed that a project's
|
|
37
|
+
own source must follow, one file per change in the CLI's `src/migrations/changes/` with the version it shipped in —
|
|
38
|
+
rewritten with `--write` when it has one right answer, said otherwise. The `--json` report carries `migrations` (each
|
|
39
|
+
with its `migration`, `since`, `file`, `line`, `what` and whether it was `written`) in place of `renames` and
|
|
40
|
+
`changes`. The changes of 0.38.0 (`canTemplate` → `canSnippet`, the `*Template` authoring names), 0.38.9 (a
|
|
41
|
+
`formControl` without `required` is optional) and 0.38.12 (`usePlitziServiceContext` → `usePlitzi`) are no longer
|
|
42
|
+
looked for: a project still on one of those versions makes them by hand.
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [4f8dc37]
|
|
45
|
+
- @plitzi/sdk-shared@0.38.17
|
|
46
|
+
|
|
3
47
|
## 0.38.16
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as getPageFullPath, t as getPaths, n as getRouteParams, r as isPageAuthored, i as matchPath, a as matchRoutePath, o as notFoundPageFor };
|
|
1
|
+
export { getPageFullPath, getPaths, getRouteParams, isPageAuthored, matchPath, matchRoutePath, notFoundPageFor } from "@plitzi/sdk-shared/navigation";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { get as e } from "@plitzi/plitzi-ui/helpers";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
|
-
import { ParamsFromURL as n } from "@plitzi/sdk-shared/helpers
|
|
3
|
+
import { ParamsFromURL as n } from "@plitzi/sdk-shared/helpers";
|
|
4
4
|
//#region src/hooks/useNavigation.ts
|
|
5
5
|
var r = ({ server: r, routerLocation: i }) => {
|
|
6
6
|
let a = t(() => typeof window < "u" ? window.location : e(r, "location", { pathname: "/" }), [r]), o = t(() => {
|
package/package.json
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-navigation",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.17",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"@plitzi/source": "./src/index.ts",
|
|
10
11
|
"types": "./dist/index.d.ts",
|
|
11
12
|
"import": "./dist/index.mjs"
|
|
12
13
|
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"./hooks/useNavigation": {
|
|
18
|
-
"types": "./dist/hooks/useNavigation.d.ts",
|
|
19
|
-
"import": "./dist/hooks/useNavigation.mjs"
|
|
20
|
-
},
|
|
21
|
-
"./index": {
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
|
-
"import": "./dist/index.mjs"
|
|
14
|
+
"./*": {
|
|
15
|
+
"@plitzi/source": "./src/*/index.ts",
|
|
16
|
+
"types": "./dist/*/index.d.ts",
|
|
17
|
+
"import": "./dist/*/index.mjs"
|
|
24
18
|
}
|
|
25
19
|
},
|
|
26
20
|
"scripts": {
|
|
@@ -30,20 +24,20 @@
|
|
|
30
24
|
"test:coverage": "vitest --coverage",
|
|
31
25
|
"test:watch": "vitest",
|
|
32
26
|
"test:ui": "vitest --ui",
|
|
33
|
-
"build:dev": "vite build --mode development --minify false
|
|
27
|
+
"build:dev": "vite build --mode development --minify false",
|
|
34
28
|
"build:dev-watch": "vite build --mode development --watch --minify false",
|
|
35
|
-
"build:prod": "vite build
|
|
29
|
+
"build:prod": "vite build"
|
|
36
30
|
},
|
|
37
31
|
"type": "module",
|
|
38
32
|
"sideEffects": false,
|
|
39
33
|
"devDependencies": {
|
|
40
34
|
"eslint": "^9.39.5",
|
|
41
|
-
"react": "^19.3.
|
|
42
|
-
"react-dom": "^19.3.
|
|
35
|
+
"react": "^19.3.1",
|
|
36
|
+
"react-dom": "^19.3.1",
|
|
43
37
|
"react-router-dom": "^7.18.4",
|
|
44
38
|
"typescript": "^6.0.3",
|
|
45
|
-
"vite": "^8.3.
|
|
46
|
-
"vitest": "^5.0.
|
|
39
|
+
"vite": "^8.3.4",
|
|
40
|
+
"vitest": "^5.0.5"
|
|
47
41
|
},
|
|
48
42
|
"peerDependencies": {
|
|
49
43
|
"react": "^19",
|
|
@@ -51,6 +45,6 @@
|
|
|
51
45
|
},
|
|
52
46
|
"dependencies": {
|
|
53
47
|
"@plitzi/plitzi-ui": "^1.6.33",
|
|
54
|
-
"@plitzi/sdk-shared": "0.38.
|
|
48
|
+
"@plitzi/sdk-shared": "0.38.17"
|
|
55
49
|
}
|
|
56
50
|
}
|