@rolexjs/core 1.5.0-dev-20260310014736 → 1.5.0-dev-20260310020353

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
@@ -179,8 +179,7 @@ declare const rehire: _rolexjs_system.Process;
179
179
  * - Root (depth 0): full
180
180
  * - Level 1 children: full (with content)
181
181
  * - Level 2+ grandchildren: compact (name/id/tag only, no subtree)
182
- * - Reverse links: compact immediately
183
- * - Forward links: keep children but strip nested links
182
+ * - All link targets: compact (name/id/tag only, no subtree)
184
183
  */
185
184
 
186
185
  interface ProjectionContext {
package/dist/index.js CHANGED
@@ -2840,36 +2840,22 @@ function createProjection(rt, permissions) {
2840
2840
  return permissions.enrich(compacted);
2841
2841
  };
2842
2842
  }
2843
- var compactRelations = /* @__PURE__ */ new Set([
2844
- "crowned",
2845
- "belong",
2846
- "appointment",
2847
- "administer",
2848
- "maintained-by",
2849
- "own"
2850
- ]);
2851
2843
  function compact(state) {
2852
2844
  const { children, links, ...node } = state;
2853
2845
  return node;
2854
2846
  }
2855
2847
  function compactState(state, depth) {
2856
2848
  const children = depth > 0 ? state.children?.map((c) => compactState(c, depth - 1)) : state.children?.map((c) => compact(c));
2857
- const compactedLinks = state.links?.map(
2858
- (l) => compactRelations.has(l.relation) ? { ...l, target: compact(l.target) } : { ...l, target: compactLinkedTarget(l.target) }
2859
- );
2849
+ const compactedLinks = state.links?.map((l) => ({
2850
+ ...l,
2851
+ target: compact(l.target)
2852
+ }));
2860
2853
  return {
2861
2854
  ...state,
2862
2855
  ...children ? { children } : {},
2863
2856
  ...compactedLinks ? { links: compactedLinks } : {}
2864
2857
  };
2865
2858
  }
2866
- function compactLinkedTarget(state) {
2867
- const children = state.children?.map((c) => compactLinkedTarget(c));
2868
- return {
2869
- ...state,
2870
- ...children ? { children } : {}
2871
- };
2872
- }
2873
2859
 
2874
2860
  // src/rolex-service.ts
2875
2861
  var RoleXService = class _RoleXService {