@skaldapp/shared 1.2.42 → 1.2.44

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 CHANGED
@@ -23,6 +23,7 @@ export type TPage = FromSchema<typeof Page> & {
23
23
  };
24
24
  export declare const sharedStore: {
25
25
  $nodes: TPage[];
26
+ isRedirect: ({ branch, id, siblings }: TPage) => unknown;
26
27
  kvNodes: Record<string, TPage>;
27
28
  nodes: TPage[];
28
29
  add: (pId: string) => string | undefined;
package/dist/index.js CHANGED
@@ -14,8 +14,10 @@ const esm = true, code = { esm }, coerceTypes = true, keywords = [dynamicDefault
14
14
  removeAdditional,
15
15
  schemas,
16
16
  useDefaults,
17
- }), immediate = true, isRedirect = ({ id, parent, siblings }) => parent?.frontmatter["template"] &&
18
- siblings.find(({ frontmatter: { hidden } }) => !hidden)?.id === id, properties = {
17
+ }), immediate = true, isRedirect = ({ branch, id, siblings }) => branch
18
+ .slice(0, -1)
19
+ .reverse()
20
+ .find(({ frontmatter: { hidden } }) => !hidden)?.frontmatter["template"] && siblings.find(({ frontmatter: { hidden } }) => !hidden)?.id === id, properties = {
19
21
  $branch: {
20
22
  get() {
21
23
  return this.branch.filter(({ frontmatter: { hidden } }) => !hidden);
@@ -75,6 +77,7 @@ export const sharedStore = reactive({
75
77
  tree,
76
78
  ...flatJsonTree,
77
79
  $nodes,
80
+ isRedirect,
78
81
  kvNodes: kvNodes,
79
82
  nodes: nodes,
80
83
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@skaldapp/shared",
4
- "version": "1.2.42",
4
+ "version": "1.2.44",
5
5
  "description": "A TypeScript library providing reactive data structures, JSON schema validation, and tree utilities for Vue-based applications in the skald ecosystem.",
6
6
  "keywords": [
7
7
  "vue",