@neo4j-ndl/react-graph 1.2.44 → 1.3.0

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.
Files changed (96) hide show
  1. package/lib/cjs/graph-visualization-buttons.js +1 -3
  2. package/lib/cjs/graph-visualization-buttons.js.map +1 -1
  3. package/lib/cjs/graph-visualization-context.js.map +1 -1
  4. package/lib/cjs/graph-visualization.js +7 -5
  5. package/lib/cjs/graph-visualization.js.map +1 -1
  6. package/lib/cjs/index.js.map +1 -1
  7. package/lib/cjs/sidepanel-components/details-panel.js +5 -11
  8. package/lib/cjs/sidepanel-components/details-panel.js.map +1 -1
  9. package/lib/cjs/sidepanel-components/graph-label-wrapper.js +40 -0
  10. package/lib/cjs/sidepanel-components/graph-label-wrapper.js.map +1 -0
  11. package/lib/cjs/sidepanel-components/overview-panel.js +3 -12
  12. package/lib/cjs/sidepanel-components/overview-panel.js.map +1 -1
  13. package/lib/cjs/stories/graph-visualization-rule-based-styling-advanced.story.js +247 -0
  14. package/lib/cjs/stories/graph-visualization-rule-based-styling-advanced.story.js.map +1 -0
  15. package/lib/cjs/stories/graph-visualization-rule-based-styling.story.js +79 -0
  16. package/lib/cjs/stories/graph-visualization-rule-based-styling.story.js.map +1 -0
  17. package/lib/cjs/stories/graph-visualization-simple-styling.story.js +57 -0
  18. package/lib/cjs/stories/graph-visualization-simple-styling.story.js.map +1 -0
  19. package/lib/cjs/stories/index.js +23 -10
  20. package/lib/cjs/stories/index.js.map +1 -1
  21. package/lib/cjs/stories/story-data.js +906 -3
  22. package/lib/cjs/stories/story-data.js.map +1 -1
  23. package/lib/cjs/styling/compile-graph-styles.js +22 -21
  24. package/lib/cjs/styling/compile-graph-styles.js.map +1 -1
  25. package/lib/cjs/styling/create-vis-data-structures.js +126 -0
  26. package/lib/cjs/styling/create-vis-data-structures.js.map +1 -0
  27. package/lib/cjs/styling/use-graph-data.js +35 -0
  28. package/lib/cjs/styling/use-graph-data.js.map +1 -0
  29. package/lib/cjs/utils.js +23 -9
  30. package/lib/cjs/utils.js.map +1 -1
  31. package/lib/esm/graph-visualization-buttons.js +1 -3
  32. package/lib/esm/graph-visualization-buttons.js.map +1 -1
  33. package/lib/esm/graph-visualization-context.js.map +1 -1
  34. package/lib/esm/graph-visualization.js +7 -5
  35. package/lib/esm/graph-visualization.js.map +1 -1
  36. package/lib/esm/index.js.map +1 -1
  37. package/lib/esm/sidepanel-components/details-panel.js +6 -12
  38. package/lib/esm/sidepanel-components/details-panel.js.map +1 -1
  39. package/lib/esm/sidepanel-components/graph-label-wrapper.js +33 -0
  40. package/lib/esm/sidepanel-components/graph-label-wrapper.js.map +1 -0
  41. package/lib/esm/sidepanel-components/overview-panel.js +4 -13
  42. package/lib/esm/sidepanel-components/overview-panel.js.map +1 -1
  43. package/lib/esm/stories/graph-visualization-rule-based-styling-advanced.story.js +244 -0
  44. package/lib/esm/stories/graph-visualization-rule-based-styling-advanced.story.js.map +1 -0
  45. package/lib/esm/stories/graph-visualization-rule-based-styling.story.js +76 -0
  46. package/lib/esm/stories/graph-visualization-rule-based-styling.story.js.map +1 -0
  47. package/lib/esm/stories/graph-visualization-simple-styling.story.js +54 -0
  48. package/lib/esm/stories/graph-visualization-simple-styling.story.js.map +1 -0
  49. package/lib/esm/stories/index.js +18 -8
  50. package/lib/esm/stories/index.js.map +1 -1
  51. package/lib/esm/stories/story-data.js +905 -2
  52. package/lib/esm/stories/story-data.js.map +1 -1
  53. package/lib/esm/styling/compile-graph-styles.js +22 -21
  54. package/lib/esm/styling/compile-graph-styles.js.map +1 -1
  55. package/lib/esm/styling/create-vis-data-structures.js +122 -0
  56. package/lib/esm/styling/create-vis-data-structures.js.map +1 -0
  57. package/lib/esm/styling/use-graph-data.js +32 -0
  58. package/lib/esm/styling/use-graph-data.js.map +1 -0
  59. package/lib/esm/utils.js +20 -8
  60. package/lib/esm/utils.js.map +1 -1
  61. package/lib/types/graph-visualization-buttons.d.ts.map +1 -1
  62. package/lib/types/graph-visualization-context.d.ts +15 -9
  63. package/lib/types/graph-visualization-context.d.ts.map +1 -1
  64. package/lib/types/graph-visualization.d.ts +8 -1
  65. package/lib/types/graph-visualization.d.ts.map +1 -1
  66. package/lib/types/index.d.ts +2 -1
  67. package/lib/types/index.d.ts.map +1 -1
  68. package/lib/types/sidepanel-components/details-panel.d.ts.map +1 -1
  69. package/lib/types/{map-to-nvl-graph.d.ts → sidepanel-components/graph-label-wrapper.d.ts} +10 -17
  70. package/lib/types/sidepanel-components/graph-label-wrapper.d.ts.map +1 -0
  71. package/lib/types/sidepanel-components/overview-panel.d.ts.map +1 -1
  72. package/lib/types/stories/graph-visualization-rule-based-styling-advanced.story.d.ts +33 -0
  73. package/lib/types/stories/graph-visualization-rule-based-styling-advanced.story.d.ts.map +1 -0
  74. package/lib/types/stories/graph-visualization-rule-based-styling.story.d.ts +25 -0
  75. package/lib/types/stories/graph-visualization-rule-based-styling.story.d.ts.map +1 -0
  76. package/lib/types/stories/graph-visualization-simple-styling.story.d.ts +25 -0
  77. package/lib/types/stories/graph-visualization-simple-styling.story.d.ts.map +1 -0
  78. package/lib/types/stories/index.d.ts +7 -1
  79. package/lib/types/stories/index.d.ts.map +1 -1
  80. package/lib/types/stories/story-data.d.ts +4 -0
  81. package/lib/types/stories/story-data.d.ts.map +1 -1
  82. package/lib/types/styling/compile-graph-styles.d.ts +2 -5
  83. package/lib/types/styling/compile-graph-styles.d.ts.map +1 -1
  84. package/lib/types/styling/create-vis-data-structures.d.ts +28 -0
  85. package/lib/types/styling/create-vis-data-structures.d.ts.map +1 -0
  86. package/lib/types/styling/style-types.d.ts +2 -2
  87. package/lib/types/styling/use-graph-data.d.ts +28 -0
  88. package/lib/types/styling/use-graph-data.d.ts.map +1 -0
  89. package/lib/types/utils.d.ts +5 -3
  90. package/lib/types/utils.d.ts.map +1 -1
  91. package/package.json +1 -1
  92. package/lib/cjs/map-to-nvl-graph.js +0 -167
  93. package/lib/cjs/map-to-nvl-graph.js.map +0 -1
  94. package/lib/esm/map-to-nvl-graph.js +0 -162
  95. package/lib/esm/map-to-nvl-graph.js.map +0 -1
  96. package/lib/types/map-to-nvl-graph.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"story-data.js","sourceRoot":"","sources":["../../../src/stories/story-data.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIU,QAAA,UAAU,GAAyC;IAC9D,KAAK,EAAE;QACL;YACE,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;YAChC,UAAU,EAAE;gBACV,mBAAmB,EAAE;oBACnB,WAAW,EAAE,oBAAoB;oBACjC,IAAI,EAAE,UAAU;iBACjB;gBACD,cAAc,EAAE;oBACd,WAAW,EAAE,0BAA0B;oBACvC,IAAI,EAAE,MAAM;iBACb;gBACD,UAAU,EAAE;oBACV,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,MAAM;iBACb;gBACD,SAAS,EAAE;oBACT,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,SAAS;iBAChB;gBACD,QAAQ,EAAE;oBACR,WAAW,EAAE,sCAAsC;oBACnD,IAAI,EAAE,OAAO;iBACd;gBACD,IAAI,EAAE;oBACJ,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,QAAQ;iBACf;gBACD,MAAM,EAAE;oBACN,WAAW,EAAE,OAAO;oBACpB,IAAI,EAAE,OAAO;iBACd;aACF;SACF;QACD;YACE,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;SAChE;QACD;YACE,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;SAChE;KACF;IACD,IAAI,EAAE;QACJ;YACE,IAAI,EAAE,OAAO;YACb,EAAE,EAAE,MAAM;YACV,UAAU,EAAE,EAAE;YACd,EAAE,EAAE,OAAO;YACX,IAAI,EAAE,UAAU;SACjB;QACD;YACE,IAAI,EAAE,OAAO;YACb,EAAE,EAAE,MAAM;YACV,UAAU,EAAE,EAAE;YACd,EAAE,EAAE,OAAO;YACX,IAAI,EAAE,UAAU;SACjB;KACF;CACF,CAAC;AAEW,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type NeoNode, type NeoRel } from '../graph-visualization-context';\n\nexport const StoryGraph: { nodes: NeoNode[]; rels: NeoRel[] } = {\n nodes: [\n {\n id: 'node1',\n labels: ['Pokemon', 'Legendary'],\n properties: {\n durationToWinBattle: {\n stringified: 'P0M0DT0.000000001S',\n type: 'duration',\n },\n favoriteColors: {\n stringified: '[\"red\", \"blue\", \"green\"]',\n type: 'list',\n },\n getsBeatBy: {\n stringified: 'null',\n type: 'null',\n },\n isAwesome: {\n stringified: 'true',\n type: 'boolean',\n },\n location: {\n stringified: 'point({srid:1, x:100, y:200, z:300})',\n type: 'point',\n },\n name: {\n stringified: '\"Rayquaza\"',\n type: 'string',\n },\n weight: {\n stringified: '392.0',\n type: 'float',\n },\n },\n },\n {\n id: 'node2',\n labels: ['Type'],\n properties: { name: { stringified: 'Dragon', type: 'String' } },\n },\n {\n id: 'node3',\n labels: ['Type'],\n properties: { name: { stringified: 'Flying', type: 'String' } },\n },\n ],\n rels: [\n {\n from: 'node1',\n id: 'rel1',\n properties: {},\n to: 'node2',\n type: 'HAS_TYPE',\n },\n {\n from: 'node1',\n id: 'rel2',\n properties: {},\n to: 'node3',\n type: 'HAS_TYPE',\n },\n ],\n};\n\nexport const containerClasses =\n 'n-w-full n-border-neutral-border-weak n-mx-2 n-rounded-lg n-border';\n"]}
1
+ {"version":3,"file":"story-data.js","sourceRoot":"","sources":["../../../src/stories/story-data.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIU,QAAA,UAAU,GAAyC;IAC9D,KAAK,EAAE;QACL;YACE,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;YAChC,UAAU,EAAE;gBACV,mBAAmB,EAAE;oBACnB,WAAW,EAAE,oBAAoB;oBACjC,IAAI,EAAE,UAAU;iBACjB;gBACD,cAAc,EAAE;oBACd,WAAW,EAAE,0BAA0B;oBACvC,IAAI,EAAE,MAAM;iBACb;gBACD,UAAU,EAAE;oBACV,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,MAAM;iBACb;gBACD,SAAS,EAAE;oBACT,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,SAAS;iBAChB;gBACD,QAAQ,EAAE;oBACR,WAAW,EAAE,sCAAsC;oBACnD,IAAI,EAAE,OAAO;iBACd;gBACD,IAAI,EAAE;oBACJ,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,QAAQ;iBACf;gBACD,MAAM,EAAE;oBACN,WAAW,EAAE,OAAO;oBACpB,IAAI,EAAE,OAAO;iBACd;aACF;SACF;QACD;YACE,EAAE,EAAE,OAAO;YACX,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI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neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type NeoNode, type NeoRel } from '../graph-visualization-context';\n\nexport const StoryGraph: { nodes: NeoNode[]; rels: NeoRel[] } = {\n nodes: [\n {\n id: 'node1',\n labels: ['Pokemon', 'Legendary'],\n properties: {\n durationToWinBattle: {\n stringified: 'P0M0DT0.000000001S',\n type: 'duration',\n },\n favoriteColors: {\n stringified: '[\"red\", \"blue\", \"green\"]',\n type: 'list',\n },\n getsBeatBy: {\n stringified: 'null',\n type: 'null',\n },\n isAwesome: {\n stringified: 'true',\n type: 'boolean',\n },\n location: {\n stringified: 'point({srid:1, x:100, y:200, z:300})',\n type: 'point',\n },\n name: {\n stringified: '\"Rayquaza\"',\n type: 'string',\n },\n weight: {\n stringified: '392.0',\n type: 'float',\n },\n },\n },\n {\n id: 'node2',\n labels: ['Type'],\n properties: { name: { stringified: '\"Dragon\"', type: 'string' } },\n },\n {\n id: 'node3',\n labels: ['Type'],\n properties: { name: { stringified: '\"Flying\"', type: 'string' } },\n },\n {\n id: 'node4',\n labels: ['Pokemon'],\n properties: { name: { stringified: '\"Pidgey\"', type: 'string' } },\n },\n ],\n rels: [\n {\n from: 'node1',\n id: 'rel1',\n properties: {},\n to: 'node2',\n type: 'HAS_TYPE',\n },\n {\n from: 'node1',\n id: 'rel2',\n properties: {},\n to: 'node3',\n type: 'HAS_TYPE',\n },\n {\n from: 'node4',\n id: 'rel3',\n properties: {},\n to: 'node3',\n type: 'HAS_TYPE',\n },\n ],\n};\n\nexport const advancedStoryGraph: { nodes: NeoNode[]; rels: NeoRel[] } = {\n nodes: [\n // Trainers\n {\n id: 'trainer1',\n labels: ['Trainer'],\n properties: {\n name: { stringified: '\"Ash\"', type: 'string' },\n level: { stringified: '85', type: 'integer' },\n badges: { stringified: '8', type: 'integer' },\n reputation: { stringified: '\"Champion\"', type: 'string' },\n },\n },\n {\n id: 'trainer2',\n labels: ['Trainer'],\n properties: {\n name: { stringified: '\"Misty\"', type: 'string' },\n level: { stringified: '72', type: 'integer' },\n badges: { stringified: '8', type: 'integer' },\n reputation: { stringified: '\"Gym Leader\"', type: 'string' },\n },\n },\n {\n id: 'trainer3',\n labels: ['Trainer'],\n properties: {\n name: { stringified: '\"Gary\"', type: 'string' },\n level: { stringified: '80', type: 'integer' },\n badges: { stringified: '8', type: 'integer' },\n reputation: { stringified: '\"Rival\"', type: 'string' },\n },\n },\n {\n id: 'trainer4',\n labels: ['Trainer'],\n properties: {\n name: { stringified: '\"Brock\"', type: 'string' },\n level: { stringified: '68', type: 'integer' },\n badges: { stringified: '2', type: 'integer' },\n reputation: { stringified: '\"Breeder\"', type: 'string' },\n },\n },\n // Gyms\n {\n id: 'gym1',\n labels: ['Gym'],\n properties: {\n name: { stringified: '\"Cerulean Gym\"', type: 'string' },\n city: { stringified: '\"Cerulean City\"', type: 'string' },\n type: { stringified: '\"Water\"', type: 'string' },\n badge: { stringified: '\"Cascade Badge\"', type: 'string' },\n },\n },\n // Ash's Pokemon\n {\n id: 'pokemon1',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Pikachu\"', type: 'string' },\n level: { stringified: '88', type: 'integer' },\n is_starter: { stringified: 'true', type: 'boolean' },\n catch_rate: { stringified: '190.0', type: 'float' },\n },\n },\n {\n id: 'pokemon2',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Charizard\"', type: 'string' },\n level: { stringified: '82', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n {\n id: 'pokemon3',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Greninja\"', type: 'string' },\n level: { stringified: '80', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n // Misty's Pokemon\n {\n id: 'pokemon4',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Starmie\"', type: 'string' },\n level: { stringified: '75', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '60.0', type: 'float' },\n },\n },\n {\n id: 'pokemon5',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Psyduck\"', type: 'string' },\n level: { stringified: '65', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '190.0', type: 'float' },\n },\n },\n {\n id: 'pokemon6',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Gyarados\"', type: 'string' },\n level: { stringified: '78', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n // Gary's Pokemon\n {\n id: 'pokemon7',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Blastoise\"', type: 'string' },\n level: { stringified: '83', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n {\n id: 'pokemon8',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Umbreon\"', type: 'string' },\n level: { stringified: '79', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n {\n id: 'pokemon9',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Electivire\"', type: 'string' },\n level: { stringified: '81', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '30.0', type: 'float' },\n },\n },\n // Brock's Pokemon\n {\n id: 'pokemon10',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Onix\"', type: 'string' },\n level: { stringified: '70', type: 'integer' },\n is_starter: { stringified: 'true', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n // Evolution Pokemon (pre-evolutions and uncaught)\n {\n id: 'pokemon11',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Pichu\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '190.0', type: 'float' },\n },\n },\n {\n id: 'pokemon12',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Raichu\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '75.0', type: 'float' },\n },\n },\n {\n id: 'pokemon13',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Charmander\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'true', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n {\n id: 'pokemon14',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Charmeleon\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n {\n id: 'pokemon15',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Staryu\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '225.0', type: 'float' },\n },\n },\n {\n id: 'pokemon16',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Golduck\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '75.0', type: 'float' },\n },\n },\n {\n id: 'pokemon17',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Magikarp\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '255.0', type: 'float' },\n },\n },\n {\n id: 'pokemon18',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Eevee\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'true', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n {\n id: 'pokemon19',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Steelix\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '25.0', type: 'float' },\n },\n },\n // Uncaught evolution line: Bulbasaur line\n {\n id: 'pokemon20',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Bulbasaur\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'true', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n {\n id: 'pokemon21',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Ivysaur\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n {\n id: 'pokemon22',\n labels: ['Pokemon'],\n properties: {\n name: { stringified: '\"Venusaur\"', type: 'string' },\n level: { stringified: '1', type: 'integer' },\n is_starter: { stringified: 'false', type: 'boolean' },\n catch_rate: { stringified: '45.0', type: 'float' },\n },\n },\n // Types\n {\n id: 'type1',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Electric\"', type: 'string' },\n },\n },\n {\n id: 'type2',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Fire\"', type: 'string' },\n },\n },\n {\n id: 'type3',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Flying\"', type: 'string' },\n },\n },\n {\n id: 'type4',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Water\"', type: 'string' },\n },\n },\n {\n id: 'type5',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Dark\"', type: 'string' },\n },\n },\n {\n id: 'type6',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Psychic\"', type: 'string' },\n },\n },\n {\n id: 'type7',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Rock\"', type: 'string' },\n },\n },\n {\n id: 'type8',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Ground\"', type: 'string' },\n },\n },\n {\n id: 'type9',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Grass\"', type: 'string' },\n },\n },\n {\n id: 'type10',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Poison\"', type: 'string' },\n },\n },\n {\n id: 'type11',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Steel\"', type: 'string' },\n },\n },\n {\n id: 'type12',\n labels: ['Type'],\n properties: {\n name: { stringified: '\"Normal\"', type: 'string' },\n },\n },\n ],\n rels: [\n // Trainer -> Pokemon relationships (CAUGHT)\n // Ash's Pokemon\n {\n id: 'rel_p1',\n from: 'trainer1',\n to: 'pokemon1',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"1997-04-01\"', type: 'string' },\n level: { stringified: '5', type: 'integer' },\n },\n },\n {\n id: 'rel_p2',\n from: 'trainer1',\n to: 'pokemon2',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"1997-06-15\"', type: 'string' },\n level: { stringified: '7', type: 'integer' },\n },\n },\n {\n id: 'rel_p3',\n from: 'trainer1',\n to: 'pokemon3',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"2015-10-22\"', type: 'string' },\n level: { stringified: '5', type: 'integer' },\n },\n },\n // Misty's Pokemon\n {\n id: 'rel_p4',\n from: 'trainer2',\n to: 'pokemon4',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"1996-08-10\"', type: 'string' },\n level: { stringified: '20', type: 'integer' },\n },\n },\n {\n id: 'rel_p5',\n from: 'trainer2',\n to: 'pokemon5',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"1997-09-12\"', type: 'string' },\n level: { stringified: '15', type: 'integer' },\n },\n },\n {\n id: 'rel_p6',\n from: 'trainer2',\n to: 'pokemon6',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"1998-02-18\"', type: 'string' },\n level: { stringified: '10', type: 'integer' },\n },\n },\n // Gary's Pokemon\n {\n id: 'rel_p7',\n from: 'trainer3',\n to: 'pokemon7',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"1997-04-01\"', type: 'string' },\n level: { stringified: '5', type: 'integer' },\n },\n },\n {\n id: 'rel_p8',\n from: 'trainer3',\n to: 'pokemon8',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"1999-12-14\"', type: 'string' },\n level: { stringified: '12', type: 'integer' },\n },\n },\n {\n id: 'rel_p9',\n from: 'trainer3',\n to: 'pokemon9',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"2008-05-29\"', type: 'string' },\n level: { stringified: '30', type: 'integer' },\n },\n },\n // Brock's Pokemon\n {\n id: 'rel_p10',\n from: 'trainer4',\n to: 'pokemon10',\n type: 'CAUGHT',\n properties: {\n at: { stringified: '\"1995-03-20\"', type: 'string' },\n level: { stringified: '8', type: 'integer' },\n },\n },\n // Gym leadership\n {\n id: 'rel1',\n from: 'trainer2',\n to: 'gym1',\n type: 'LEADS',\n properties: {\n since: { stringified: '\"1998-03-15\"', type: 'string' },\n },\n },\n // Gym -> Type specialization\n {\n id: 'rel_gym_type',\n from: 'gym1',\n to: 'type4',\n type: 'SPECIALIZES_IN',\n properties: {},\n },\n // Ash's gym battle\n {\n id: 'rel2',\n from: 'trainer1',\n to: 'gym1',\n type: 'BATTLED',\n properties: {\n date: { stringified: '\"2024-05-10\"', type: 'string' },\n won: { stringified: 'true', type: 'boolean' },\n attempt: { stringified: '1', type: 'integer' },\n },\n },\n // Gary's first gym battle (lost)\n {\n id: 'rel3',\n from: 'trainer3',\n to: 'gym1',\n type: 'BATTLED',\n properties: {\n date: { stringified: '\"2024-04-15\"', type: 'string' },\n won: { stringified: 'false', type: 'boolean' },\n attempt: { stringified: '1', type: 'integer' },\n },\n },\n // Gary's second gym battle (won)\n {\n id: 'rel4',\n from: 'trainer3',\n to: 'gym1',\n type: 'BATTLED',\n properties: {\n date: { stringified: '\"2024-06-20\"', type: 'string' },\n won: { stringified: 'true', type: 'boolean' },\n attempt: { stringified: '2', type: 'integer' },\n },\n },\n // Rival battles between Ash and Gary\n {\n id: 'rel5',\n from: 'trainer1',\n to: 'trainer3',\n type: 'BATTLED',\n properties: {\n date: { stringified: '\"2024-03-10\"', type: 'string' },\n won: { stringified: 'false', type: 'boolean' },\n location: { stringified: '\"Pallet Town\"', type: 'string' },\n },\n },\n {\n id: 'rel6',\n from: 'trainer1',\n to: 'trainer3',\n type: 'BATTLED',\n properties: {\n date: { stringified: '\"2024-05-22\"', type: 'string' },\n won: { stringified: 'true', type: 'boolean' },\n location: { stringified: '\"Viridian City\"', type: 'string' },\n },\n },\n {\n id: 'rel7',\n from: 'trainer1',\n to: 'trainer3',\n type: 'BATTLED',\n properties: {\n date: { stringified: '\"2024-07-15\"', type: 'string' },\n won: { stringified: 'true', type: 'boolean' },\n location: { stringified: '\"Indigo Plateau\"', type: 'string' },\n },\n },\n // Pokemon -> Type relationships (OF_TYPE)\n {\n id: 'rel_t1',\n from: 'pokemon1',\n to: 'type1',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t2',\n from: 'pokemon2',\n to: 'type2',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t3',\n from: 'pokemon2',\n to: 'type3',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t4',\n from: 'pokemon3',\n to: 'type4',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t5',\n from: 'pokemon3',\n to: 'type5',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t6',\n from: 'pokemon4',\n to: 'type4',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t7',\n from: 'pokemon4',\n to: 'type6',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t8',\n from: 'pokemon5',\n to: 'type4',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t9',\n from: 'pokemon6',\n to: 'type4',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t10',\n from: 'pokemon6',\n to: 'type3',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t11',\n from: 'pokemon7',\n to: 'type4',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t12',\n from: 'pokemon8',\n to: 'type5',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t13',\n from: 'pokemon9',\n to: 'type1',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t14',\n from: 'pokemon10',\n to: 'type7',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t15',\n from: 'pokemon10',\n to: 'type8',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t16',\n from: 'pokemon11',\n to: 'type1',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t17',\n from: 'pokemon12',\n to: 'type1',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t18',\n from: 'pokemon13',\n to: 'type2',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t19',\n from: 'pokemon14',\n to: 'type2',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t20',\n from: 'pokemon15',\n to: 'type4',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t21',\n from: 'pokemon16',\n to: 'type4',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t22',\n from: 'pokemon17',\n to: 'type4',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t23',\n from: 'pokemon18',\n to: 'type12',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t24',\n from: 'pokemon19',\n to: 'type11',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t25',\n from: 'pokemon19',\n to: 'type8',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t26',\n from: 'pokemon20',\n to: 'type9',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t27',\n from: 'pokemon20',\n to: 'type10',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t28',\n from: 'pokemon21',\n to: 'type9',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t29',\n from: 'pokemon21',\n to: 'type10',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t30',\n from: 'pokemon22',\n to: 'type9',\n type: 'OF_TYPE',\n properties: {},\n },\n {\n id: 'rel_t31',\n from: 'pokemon22',\n to: 'type10',\n type: 'OF_TYPE',\n properties: {},\n },\n // Evolution relationships (EVOLVES_TO)\n {\n id: 'rel_e1',\n from: 'pokemon11',\n to: 'pokemon1',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '0', type: 'integer' },\n method: { stringified: '\"Friendship\"', type: 'string' },\n },\n },\n {\n id: 'rel_e2',\n from: 'pokemon1',\n to: 'pokemon12',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '0', type: 'integer' },\n method: { stringified: '\"Thunder Stone\"', type: 'string' },\n },\n },\n {\n id: 'rel_e3',\n from: 'pokemon13',\n to: 'pokemon14',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '16', type: 'integer' },\n method: { stringified: '\"Level\"', type: 'string' },\n },\n },\n {\n id: 'rel_e4',\n from: 'pokemon14',\n to: 'pokemon2',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '36', type: 'integer' },\n method: { stringified: '\"Level\"', type: 'string' },\n },\n },\n {\n id: 'rel_e5',\n from: 'pokemon15',\n to: 'pokemon4',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '0', type: 'integer' },\n method: { stringified: '\"Water Stone\"', type: 'string' },\n },\n },\n {\n id: 'rel_e6',\n from: 'pokemon5',\n to: 'pokemon16',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '33', type: 'integer' },\n method: { stringified: '\"Level\"', type: 'string' },\n },\n },\n {\n id: 'rel_e7',\n from: 'pokemon17',\n to: 'pokemon6',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '20', type: 'integer' },\n method: { stringified: '\"Level\"', type: 'string' },\n },\n },\n {\n id: 'rel_e8',\n from: 'pokemon18',\n to: 'pokemon8',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '0', type: 'integer' },\n method: { stringified: '\"Friendship (Night)\"', type: 'string' },\n },\n },\n {\n id: 'rel_e9',\n from: 'pokemon10',\n to: 'pokemon19',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '0', type: 'integer' },\n method: { stringified: '\"Trade with Metal Coat\"', type: 'string' },\n },\n },\n {\n id: 'rel_e10',\n from: 'pokemon20',\n to: 'pokemon21',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '16', type: 'integer' },\n method: { stringified: '\"Level\"', type: 'string' },\n },\n },\n {\n id: 'rel_e11',\n from: 'pokemon21',\n to: 'pokemon22',\n type: 'EVOLVES_TO',\n properties: {\n level: { stringified: '32', type: 'integer' },\n method: { stringified: '\"Level\"', type: 'string' },\n },\n },\n ],\n};\n\nexport const containerClasses =\n 'n-w-full n-border-neutral-border-weak n-mx-2 n-rounded-lg n-border';\n"]}
@@ -54,7 +54,7 @@ function collectStyleMatchers(styles) {
54
54
  }
55
55
  const totalRules = styles.length;
56
56
  styles.forEach((style, index) => {
57
- var _a, _b;
57
+ var _a, _b, _c;
58
58
  if ((_a = style.disabled) !== null && _a !== void 0 ? _a : false) {
59
59
  return;
60
60
  }
@@ -66,8 +66,8 @@ function collectStyleMatchers(styles) {
66
66
  const ruleWithPriority = Object.assign(Object.assign({}, rest), { priority: priority !== null && priority !== void 0 ? priority : index - totalRules });
67
67
  // style for nodes
68
68
  if ('label' in style.match) {
69
- // if the label is null/undefined, it's a global rule (matches any node)
70
- if (style.match.label == null) {
69
+ // if the label is null, it's a global rule (matches any node)
70
+ if (style.match.label === null) {
71
71
  globalLabelRules.push(ruleWithPriority);
72
72
  }
73
73
  else {
@@ -84,7 +84,7 @@ function collectStyleMatchers(styles) {
84
84
  }
85
85
  else {
86
86
  // Specific reltype rule
87
- const existing = rulesByType.get(style.match.reltype) || [];
87
+ const existing = (_c = rulesByType.get(style.match.reltype)) !== null && _c !== void 0 ? _c : [];
88
88
  rulesByType.set(style.match.reltype, [...existing, ruleWithPriority]);
89
89
  }
90
90
  }
@@ -344,7 +344,7 @@ function getDefaultNodeCaption(node) {
344
344
  if (node.labelsSorted[0] !== undefined) {
345
345
  return { value: { useType: true } };
346
346
  }
347
- return { value: { property: node.id } };
347
+ return { value: node.id };
348
348
  }
349
349
  function evaluateNodeStyle(apply, node) {
350
350
  var _a;
@@ -390,11 +390,8 @@ function createRelStyleFunction(rules) {
390
390
  exports.DEFAULT_REL_COLOR = base_1.tokens.palette.neutral['40'];
391
391
  const NO_LABEL_FALLBACK_COLOR = base_1.tokens.palette.neutral['40'];
392
392
  function createByLabelSetFunction(styleMatchers) {
393
- // Memoize default color by label string (idea 2: avoid recalculating per node)
394
393
  const defaultColorCache = new Map();
395
- // Cache sorted rules by label set key (idea 1: avoid allocation + sort per node)
396
394
  const sortedRulesCache = new Map();
397
- // Cache merged Style for where-free rule sets (idea 3: skip rule iteration entirely)
398
395
  const mergedStyleCache = new Map();
399
396
  return (node) => {
400
397
  var _a;
@@ -462,20 +459,24 @@ const DEFAULT_REL_STYLE = {
462
459
  captions: [{ value: { useType: true } }],
463
460
  },
464
461
  };
465
- function compileStyleRules({ reltypes, styleRules, }) {
466
- var _a;
462
+ function compileStyleRules(styleRules) {
467
463
  const styleMatchers = collectStyleMatchers(styleRules);
468
- // as relationships can only have one type, we can use a map to store the style function for each type
469
- const byType = new Map();
470
- // Compile relationship type-based rules
471
- for (const reltype of reltypes) {
472
- const rules = (_a = styleMatchers.rulesByType.get(reltype)) !== null && _a !== void 0 ? _a : [];
473
- byType.set(reltype, createRelStyleFunction([
474
- DEFAULT_REL_STYLE,
475
- ...styleMatchers.globalReltypeRules,
476
- ...rules,
477
- ]));
478
- }
464
+ // Lazily build and cache a style function per relationship type
465
+ const cache = new Map();
466
+ const byType = (type) => {
467
+ var _a;
468
+ let fn = cache.get(type);
469
+ if (fn === undefined) {
470
+ const rules = (_a = styleMatchers.rulesByType.get(type)) !== null && _a !== void 0 ? _a : [];
471
+ fn = createRelStyleFunction([
472
+ DEFAULT_REL_STYLE,
473
+ ...styleMatchers.globalReltypeRules,
474
+ ...rules,
475
+ ]);
476
+ cache.set(type, fn);
477
+ }
478
+ return fn;
479
+ };
479
480
  const byLabelSet = createByLabelSetFunction(styleMatchers);
480
481
  return { byLabelSet, byType, styleMatchers };
481
482
  }
@@ -1 +1 @@
1
- {"version":3,"file":"compile-graph-styles.js","sourceRoot":"","sources":["../../../src/styling/compile-graph-styles.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAokBH,8CA8BC;AAhmBD,2DAAwE;AACxE,0CAAyC;AAyBzC,SAAS,0BAA0B,CAAC,CAAY,EAAE,CAAY;IAC5D,OAAO,CAAC,CAAC,QAAS,GAAG,CAAC,CAAC,QAAS,CAAC;AACnC,CAAC;AAED,SAAS,oBAAoB,CAC3B,MAAsC;IAEtC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAuB,CAAC;IACpD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAuB,CAAC;IACnD,MAAM,gBAAgB,GAAgB,EAAE,CAAC;IACzC,MAAM,kBAAkB,GAAgB,EAAE,CAAC;IAE3C,0CAA0C;IAC1C,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,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C/C,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { calculateDefaultNodeColors } from '@neo4j-devtools/word-color';\nimport { tokens } from '@neo4j-ndl/base';\n\nimport {\n type NodeData,\n type PortableProperty,\n type RelData,\n} from '../graph-visualization-context';\nimport {\n type Caption,\n type CypherValue,\n type EvaluatedNvlNodeStyle,\n type EvaluatedNvlRelationshipStyle,\n type Style,\n type StyleRule,\n type Value,\n type Where,\n} from './style-types';\n\ntype StyleMatchers = {\n globalLabelRules: StyleRule[];\n globalReltypeRules: StyleRule[];\n rulesByLabel: Map<string, StyleRule[]>;\n rulesByType: Map<string, StyleRule[]>;\n};\n\nfunction compareByPriorityAscending(a: StyleRule, b: StyleRule): number {\n return a.priority! - b.priority!;\n}\n\nfunction collectStyleMatchers(\n styles: StyleRule[] | null | undefined,\n): StyleMatchers {\n const rulesByLabel = new Map<string, StyleRule[]>();\n const rulesByType = new Map<string, StyleRule[]>();\n const globalLabelRules: StyleRule[] = [];\n const globalReltypeRules: StyleRule[] = [];\n\n // Handle null/undefined styles gracefully\n if (!styles || styles.length === 0) {\n return {\n globalLabelRules,\n globalReltypeRules,\n rulesByLabel,\n rulesByType,\n };\n }\n\n const totalRules = styles.length;\n\n styles.forEach((style, index) => {\n if (style.disabled ?? false) {\n return;\n }\n\n if (style.priority !== undefined && style.priority < 0) {\n throw new Error(\n `StyleRule priority must be >= 0, got ${style.priority}. Negative values are reserved for internal use.`,\n );\n }\n\n // Fill in priority if not set (negative values preserve original order)\n const { priority, ...rest } = style;\n const ruleWithPriority: StyleRule = {\n ...rest,\n priority: priority ?? index - totalRules,\n };\n\n // style for nodes\n if ('label' in style.match) {\n // if the label is null/undefined, it's a global rule (matches any node)\n if (style.match.label == null) {\n globalLabelRules.push(ruleWithPriority);\n } else {\n // Specific label rule\n const existing = rulesByLabel.get(style.match.label) ?? [];\n rulesByLabel.set(style.match.label, [...existing, ruleWithPriority]);\n }\n }\n\n // style for relationships\n if ('reltype' in style.match) {\n if (style.match.reltype === null) {\n // Global reltype rule (matches any relationship)\n globalReltypeRules.push(ruleWithPriority);\n } else {\n // Specific reltype rule\n const existing = rulesByType.get(style.match.reltype) || [];\n rulesByType.set(style.match.reltype, [...existing, ruleWithPriority]);\n }\n }\n });\n\n return {\n globalLabelRules,\n globalReltypeRules,\n rulesByLabel,\n rulesByType,\n };\n}\n\nfunction extractPropertyValue(\n prop: PortableProperty,\n): string | number | boolean | null {\n switch (prop.type) {\n case 'string':\n return JSON.parse(prop.stringified);\n case 'number':\n case 'integer':\n case 'float':\n return Number(prop.stringified);\n case 'boolean':\n case 'Boolean':\n return prop.stringified === 'true';\n case 'null':\n return null;\n default:\n return prop.stringified;\n }\n}\n\n/**\n * Three-valued logic type matching Cypher/SQL semantics.\n * - `true`: condition is satisfied\n * - `false`: condition is not satisfied\n * - `null`: condition is unknown (e.g., comparing with null/missing property)\n *\n * @see https://neo4j.com/docs/cypher-manual/current/values-and-types/working-with-null/\n */\ntype Ternary = boolean | null;\n\n/**\n * Evaluates a WHERE clause using three-valued logic matching Cypher semantics.\n *\n * From Neo4j Cypher Manual:\n * - Comparing any value to `null` results in `null`, not `true` or `false`\n * - Accessing a non-existent property returns `null`\n * - In WHERE clauses, only `true` passes; both `false` and `null` exclude the row\n *\n * Three-valued logic rules:\n * - NOT null → null\n * - true AND null → null, false AND null → false\n * - true OR null → true, false OR null → null\n *\n * @see https://neo4j.com/docs/cypher-manual/current/values-and-types/working-with-null/\n */\nfunction evaluateWhere(node: NodeData | RelData, where?: Where): Ternary {\n if (!where) {\n return true;\n }\n\n if ('equal' in where) {\n const [left, right] = where.equal;\n const leftVal = evaluateValue(left, node);\n const rightVal = evaluateValue(right, node);\n // In Cypher, null = null → null (not true)\n if (leftVal === null || rightVal === null) {\n return null;\n }\n return leftVal === rightVal;\n }\n\n if ('not' in where) {\n // Cypher: NOT null → null\n const isMatch = evaluateWhere(node, where.not);\n return isMatch === null ? null : !isMatch;\n }\n\n if ('lessThan' in where) {\n const [left, right] = where.lessThan;\n return safeCompare(left, right, node, (a, b) => a < b);\n }\n\n if ('lessThanOrEqual' in where) {\n const [left, right] = where.lessThanOrEqual;\n return safeCompare(left, right, node, (a, b) => a <= b);\n }\n\n if ('greaterThan' in where) {\n const [left, right] = where.greaterThan;\n return safeCompare(left, right, node, (a, b) => a > b);\n }\n\n if ('greaterThanOrEqual' in where) {\n const [left, right] = where.greaterThanOrEqual;\n return safeCompare(left, right, node, (a, b) => a >= b);\n }\n\n if ('contains' in where) {\n const [left, right] = where.contains;\n return safeStringCompare(left, right, node, (a, b) => a.includes(b));\n }\n\n if ('startsWith' in where) {\n const [left, right] = where.startsWith;\n return safeStringCompare(left, right, node, (a, b) => a.startsWith(b));\n }\n\n if ('endsWith' in where) {\n const [left, right] = where.endsWith;\n return safeStringCompare(left, right, node, (a, b) => a.endsWith(b));\n }\n\n if ('isNull' in where) {\n // IS NULL returns true/false (never null)\n const value = evaluateValue(where.isNull, node);\n return value === null;\n }\n\n if ('and' in where) {\n // Cypher three-valued AND:\n // - If any is false → false\n // - Else if any is null → null\n // - Else → true\n let hasNull = false;\n for (const r of where.and) {\n const isMatch = evaluateWhere(node, r);\n if (isMatch === false) {\n return false;\n }\n if (isMatch === null) {\n hasNull = true;\n }\n }\n return hasNull ? null : true;\n }\n\n if ('or' in where) {\n // Cypher three-valued OR:\n // - If any is true → true\n // - Else if any is null → null\n // - Else → false\n let hasNull = false;\n for (const r of where.or) {\n const isMatch = evaluateWhere(node, r);\n if (isMatch === true) {\n return true;\n }\n if (isMatch === null) {\n hasNull = true;\n }\n }\n return hasNull ? null : false;\n }\n\n if ('label' in where) {\n if ('labelsSorted' in node) {\n return where.label === null || node.labelsSorted.includes(where.label);\n }\n return false;\n }\n\n if ('reltype' in where) {\n if ('type' in node) {\n return where.reltype === null || (node as RelData).type === where.reltype;\n }\n return false;\n }\n\n if ('property' in where) {\n return where.property === null || where.property in node.properties;\n }\n\n return false;\n}\n\nfunction evaluateRelStyle(\n apply: Style,\n rel: RelData,\n): EvaluatedNvlRelationshipStyle {\n return {\n ...apply,\n captions: apply.captions?.map((caption) => {\n const { value, styles } = caption;\n\n if (typeof value === 'string' || value === undefined) {\n return { styles, value };\n }\n\n if ('useType' in value) {\n return { styles, value: rel.type };\n }\n\n if ('property' in value) {\n const prop = rel.properties[value.property];\n if (prop === undefined) {\n return { styles, value: '' };\n }\n\n const resolvedValue =\n prop.type === 'string'\n ? prop.stringified.slice(1, -1)\n : prop.stringified;\n\n return { styles, value: resolvedValue };\n }\n\n return { styles, value: rel.id };\n }),\n };\n}\n\n/**\n * Safely compare two values using Cypher's three-valued logic.\n * Returns `null` if either operand is null (matching Cypher semantics).\n *\n * From Neo4j Cypher Manual:\n * \"Comparing any value to `null` using `=` or `<>` results in `null`\"\n *\n * @see https://neo4j.com/docs/cypher-manual/current/values-and-types/working-with-null/\n */\nfunction safeCompare(\n left: Value,\n right: Value,\n graphItem: NodeData | RelData,\n compareFn: (\n a: NonNullable<CypherValue>,\n b: NonNullable<CypherValue>,\n ) => boolean,\n): Ternary {\n const leftVal = evaluateValue(left, graphItem);\n const rightVal = evaluateValue(right, graphItem);\n if (leftVal === null || rightVal === null) {\n return null;\n }\n return compareFn(leftVal, rightVal);\n}\n\n/**\n * String comparison using Cypher semantics.\n * Returns `null` if either operand is null OR not a string.\n *\n * From Neo4j Cypher Manual:\n * \"When these operators are applied to non-string values, they return `null`\n * instead of attempting type coercion.\"\n *\n * @see https://neo4j.com/docs/cypher-manual/current/expressions/predicates/string-operators/\n */\nfunction safeStringCompare(\n left: Value,\n right: Value,\n graphItem: NodeData | RelData,\n compareFn: (a: string, b: string) => boolean,\n): Ternary {\n const leftVal = evaluateValue(left, graphItem);\n const rightVal = evaluateValue(right, graphItem);\n // Return null if either is null or not a string (no type coercion)\n if (\n leftVal === null ||\n rightVal === null ||\n typeof leftVal !== 'string' ||\n typeof rightVal !== 'string'\n ) {\n return null;\n }\n return compareFn(leftVal, rightVal);\n}\n\nfunction evaluateValue(\n value: Value,\n graphItem: NodeData | RelData,\n): CypherValue {\n if (typeof value === 'object' && value !== null) {\n if ('property' in value) {\n if (value.property === null) {\n return null;\n }\n const prop = graphItem.properties[value.property];\n if (prop === undefined) {\n return null;\n }\n return extractPropertyValue(prop);\n }\n if ('label' in value) {\n if ('labelsSorted' in graphItem) {\n return (\n value.label === null || graphItem.labelsSorted.includes(value.label)\n );\n }\n return false;\n }\n if ('reltype' in value) {\n if ('type' in graphItem) {\n return (\n value.reltype === null ||\n (graphItem as RelData).type === value.reltype\n );\n }\n return false;\n }\n }\n\n return value;\n}\n\n// Default caption selection logic\nconst captionPriorityOrder = [\n /^name$/i,\n /^title$/i,\n /^label$/i,\n /name$/i,\n /description$/i,\n /^.+/,\n];\n\nfunction getDefaultNodeCaption(node: NodeData): Caption {\n const propertyKeys = Object.keys(node.properties);\n\n for (const regex of captionPriorityOrder) {\n const matchingKey = propertyKeys.find((key) => regex.test(key));\n if (matchingKey !== undefined) {\n const prop = node.properties[matchingKey];\n if (prop !== undefined) {\n return { value: { property: matchingKey } };\n }\n }\n }\n\n if (node.labelsSorted[0] !== undefined) {\n return { value: { useType: true } };\n }\n\n return { value: { property: node.id } };\n}\n\nfunction evaluateNodeStyle(\n apply: Style,\n node: NodeData,\n): EvaluatedNvlNodeStyle {\n return {\n ...apply,\n captions: (apply.captions ?? [getDefaultNodeCaption(node)]).map(\n (caption) => {\n const { value, styles } = caption;\n\n if (typeof value === 'string' || value === undefined) {\n return { styles, value };\n }\n\n if ('useType' in value) {\n return { styles, value: node.labelsSorted[0] };\n }\n\n if ('property' in value) {\n const prop = node.properties[value.property];\n if (prop === undefined) {\n return { styles, value: '' };\n }\n\n const resolvedValue =\n prop.type === 'string'\n ? prop.stringified.slice(1, -1)\n : prop.stringified;\n\n return { styles, value: resolvedValue };\n }\n\n return { styles, value: node.labelsSorted[0] };\n },\n ),\n };\n}\n\nfunction createRelStyleFunction(\n rules: StyleRule[],\n): (rel: RelData) => EvaluatedNvlRelationshipStyle {\n return (rel: RelData) => {\n const style: Style = {};\n\n // evaluateWhere uses Cypher-style three-valued logic (true/false/null).\n // Only `true` passes; both `false` and `null` (unknown) skip the rule.\n for (const rule of rules) {\n // Check if the rule applies to this relationship\n if ('reltype' in rule.match) {\n const isReltypeMatch =\n rule.match.reltype === null || rel.type === rule.match.reltype;\n\n if (isReltypeMatch && evaluateWhere(rel, rule.where) === true) {\n // Merge the style properties (later rules override earlier ones)\n Object.assign(style, rule.apply);\n }\n }\n }\n\n return evaluateRelStyle(style, rel);\n };\n}\n\nexport type CompiledStyleRules = {\n byType: Map<string, (rel: RelData) => EvaluatedNvlRelationshipStyle>;\n styleMatchers: StyleMatchers;\n byLabelSet: (node: NodeData) => EvaluatedNvlNodeStyle;\n};\n\nexport const DEFAULT_REL_COLOR = tokens.palette.neutral['40'];\nconst NO_LABEL_FALLBACK_COLOR = tokens.palette.neutral['40'];\n\nfunction createByLabelSetFunction(\n styleMatchers: StyleMatchers,\n): (node: NodeData) => EvaluatedNvlNodeStyle {\n // Memoize default color by label string (idea 2: avoid recalculating per node)\n const defaultColorCache = new Map<string, string>();\n // Cache sorted rules by label set key (idea 1: avoid allocation + sort per node)\n const sortedRulesCache = new Map<string, StyleRule[]>();\n // Cache merged Style for where-free rule sets (idea 3: skip rule iteration entirely)\n const mergedStyleCache = new Map<string, Style>();\n\n return (node: NodeData) => {\n const labelSetKey = node.labelsSorted.join('\\0');\n\n // Fast path: if all rules for this label set are where-free,\n // the merged style is identical for every node with the same labels.\n const cachedStyle = mergedStyleCache.get(labelSetKey);\n if (cachedStyle !== undefined) {\n return evaluateNodeStyle(cachedStyle, node);\n }\n\n // Memoize default color by first label\n const labelForDefaultColor = node.labelsSorted[0] ?? null;\n let defaultColor: string;\n if (labelForDefaultColor === null) {\n defaultColor = NO_LABEL_FALLBACK_COLOR;\n } else {\n let cached = defaultColorCache.get(labelForDefaultColor);\n if (cached === undefined) {\n cached =\n calculateDefaultNodeColors(labelForDefaultColor).backgroundColor;\n defaultColorCache.set(labelForDefaultColor, cached);\n }\n defaultColor = cached;\n }\n\n // Cache sorted rules by label set (avoids repeated allocation + sort)\n let sortedRules = sortedRulesCache.get(labelSetKey);\n if (sortedRules === undefined) {\n const matchingRules: StyleRule[] = [...styleMatchers.globalLabelRules];\n for (const label of node.labelsSorted) {\n const labelRules = styleMatchers.rulesByLabel.get(label);\n if (labelRules) {\n matchingRules.push(...labelRules);\n }\n }\n sortedRules = matchingRules.toSorted(compareByPriorityAscending);\n sortedRulesCache.set(labelSetKey, sortedRules);\n }\n\n // Evaluate rules, tracking whether all are where-free\n const collectStyles: Style = { color: defaultColor };\n let isAllWhereFree = true;\n for (const rule of sortedRules) {\n if (rule.where !== undefined) {\n isAllWhereFree = false;\n if (evaluateWhere(node, rule.where) === true) {\n Object.assign(collectStyles, rule.apply);\n }\n } else {\n Object.assign(collectStyles, rule.apply);\n }\n }\n\n // When all rules are where-free, the merged style depends only on labels.\n // Cache it so subsequent nodes with the same label set skip rule iteration.\n if (isAllWhereFree) {\n mergedStyleCache.set(labelSetKey, collectStyles);\n }\n\n return evaluateNodeStyle(collectStyles, node);\n };\n}\n\nconst DEFAULT_REL_STYLE: StyleRule = {\n match: { reltype: null },\n apply: {\n color: DEFAULT_REL_COLOR,\n captions: [{ value: { useType: true } }],\n },\n};\n\nexport function compileStyleRules({\n reltypes,\n styleRules,\n}: {\n reltypes: string[];\n styleRules: StyleRule[] | null | undefined;\n}): CompiledStyleRules {\n const styleMatchers = collectStyleMatchers(styleRules);\n // as relationships can only have one type, we can use a map to store the style function for each type\n const byType = new Map<\n string,\n (rel: RelData) => EvaluatedNvlRelationshipStyle\n >();\n\n // Compile relationship type-based rules\n for (const reltype of reltypes) {\n const rules = styleMatchers.rulesByType.get(reltype) ?? [];\n byType.set(\n reltype,\n createRelStyleFunction([\n DEFAULT_REL_STYLE,\n ...styleMatchers.globalReltypeRules,\n ...rules,\n ]),\n );\n }\n\n const byLabelSet = createByLabelSetFunction(styleMatchers);\n\n return { byLabelSet, byType, styleMatchers };\n}\n"]}
1
+ {"version":3,"file":"compile-graph-styles.js","sourceRoot":"","sources":["../../../src/styling/compile-graph-styles.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;AAikBH,8CA2BC;AA1lBD,2DAAwE;AACxE,0CAAyC;AAyBzC,SAAS,0BAA0B,CAAC,CAAY,EAAE,CAAY;IAC5D,OAAO,CAAC,CAAC,QAAS,GAAG,CAAC,CAAC,QAAS,CAAC;AACnC,CAAC;AAED,SAAS,oBAAoB,CAC3B,MAAsC;IAEtC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAuB,CAAC;IACpD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAuB,CAAC;IACnD,MAAM,gBAAgB,GAAgB,EAAE,CAAC;IACzC,MAAM,kBAAkB,GAAgB,EAAE,CAAC;IAE3C,0CAA0C;IAC1C,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnC,OAAO;YACL,gBAAgB;YAChB,kBAAkB;YAClB,YAAY;YACZ,WAAW;SACZ,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IAEjC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;;QAC9B,IAAI,MAAA,KAAK,CAAC,QAAQ,mCA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QACnD,CAAC;QAED,OAAO,iBAAiB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAc;IACnC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IACxB,KAAK,EAAE;QACL,KAAK,EAAE,yBAAiB;QACxB,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;KACzC;CACF,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAA0C;IAE1C,MAAM,aAAa,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAEvD,gEAAgE;IAChE,MAAM,KAAK,GAAG,IAAI,GAAG,EAGlB,CAAC;IACJ,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAE;;QAC9B,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;YACrB,MAAM,KAAK,GAAG,MAAA,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;YACxD,EAAE,GAAG,sBAAsB,CAAC;gBAC1B,iBAAiB;gBACjB,GAAG,aAAa,CAAC,kBAAkB;gBACnC,GAAG,KAAK;aACT,CAAC,CAAC;YACH,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACtB,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,wBAAwB,CAAC,aAAa,CAAC,CAAC;IAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;AAC/C,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { calculateDefaultNodeColors } from '@neo4j-devtools/word-color';\nimport { tokens } from '@neo4j-ndl/base';\n\nimport {\n type NodeData,\n type PortableProperty,\n type RelData,\n} from '../graph-visualization-context';\nimport {\n type Caption,\n type CypherValue,\n type EvaluatedNvlNodeStyle,\n type EvaluatedNvlRelationshipStyle,\n type Style,\n type StyleRule,\n type Value,\n type Where,\n} from './style-types';\n\ntype StyleMatchers = {\n globalLabelRules: StyleRule[];\n globalReltypeRules: StyleRule[];\n rulesByLabel: Map<string, StyleRule[]>;\n rulesByType: Map<string, StyleRule[]>;\n};\n\nfunction compareByPriorityAscending(a: StyleRule, b: StyleRule): number {\n return a.priority! - b.priority!;\n}\n\nfunction collectStyleMatchers(\n styles: StyleRule[] | null | undefined,\n): StyleMatchers {\n const rulesByLabel = new Map<string, StyleRule[]>();\n const rulesByType = new Map<string, StyleRule[]>();\n const globalLabelRules: StyleRule[] = [];\n const globalReltypeRules: StyleRule[] = [];\n\n // Handle null/undefined styles gracefully\n if (!styles || styles.length === 0) {\n return {\n globalLabelRules,\n globalReltypeRules,\n rulesByLabel,\n rulesByType,\n };\n }\n\n const totalRules = styles.length;\n\n styles.forEach((style, index) => {\n if (style.disabled ?? false) {\n return;\n }\n\n if (style.priority !== undefined && style.priority < 0) {\n throw new Error(\n `StyleRule priority must be >= 0, got ${style.priority}. Negative values are reserved for internal use.`,\n );\n }\n\n // Fill in priority if not set (negative values preserve original order)\n const { priority, ...rest } = style;\n const ruleWithPriority: StyleRule = {\n ...rest,\n priority: priority ?? index - totalRules,\n };\n\n // style for nodes\n if ('label' in style.match) {\n // if the label is null, it's a global rule (matches any node)\n if (style.match.label === null) {\n globalLabelRules.push(ruleWithPriority);\n } else {\n // Specific label rule\n const existing = rulesByLabel.get(style.match.label) ?? [];\n rulesByLabel.set(style.match.label, [...existing, ruleWithPriority]);\n }\n }\n\n // style for relationships\n if ('reltype' in style.match) {\n if (style.match.reltype === null) {\n // Global reltype rule (matches any relationship)\n globalReltypeRules.push(ruleWithPriority);\n } else {\n // Specific reltype rule\n const existing = rulesByType.get(style.match.reltype) ?? [];\n rulesByType.set(style.match.reltype, [...existing, ruleWithPriority]);\n }\n }\n });\n\n return {\n globalLabelRules,\n globalReltypeRules,\n rulesByLabel,\n rulesByType,\n };\n}\n\nfunction extractPropertyValue(\n prop: PortableProperty,\n): string | number | boolean | null {\n switch (prop.type) {\n case 'string':\n return JSON.parse(prop.stringified);\n case 'number':\n case 'integer':\n case 'float':\n return Number(prop.stringified);\n case 'boolean':\n case 'Boolean':\n return prop.stringified === 'true';\n case 'null':\n return null;\n default:\n return prop.stringified;\n }\n}\n\n/**\n * Three-valued logic type matching Cypher/SQL semantics.\n * - `true`: condition is satisfied\n * - `false`: condition is not satisfied\n * - `null`: condition is unknown (e.g., comparing with null/missing property)\n *\n * @see https://neo4j.com/docs/cypher-manual/current/values-and-types/working-with-null/\n */\ntype Ternary = boolean | null;\n\n/**\n * Evaluates a WHERE clause using three-valued logic matching Cypher semantics.\n *\n * From Neo4j Cypher Manual:\n * - Comparing any value to `null` results in `null`, not `true` or `false`\n * - Accessing a non-existent property returns `null`\n * - In WHERE clauses, only `true` passes; both `false` and `null` exclude the row\n *\n * Three-valued logic rules:\n * - NOT null → null\n * - true AND null → null, false AND null → false\n * - true OR null → true, false OR null → null\n *\n * @see https://neo4j.com/docs/cypher-manual/current/values-and-types/working-with-null/\n */\nfunction evaluateWhere(node: NodeData | RelData, where?: Where): Ternary {\n if (!where) {\n return true;\n }\n\n if ('equal' in where) {\n const [left, right] = where.equal;\n const leftVal = evaluateValue(left, node);\n const rightVal = evaluateValue(right, node);\n // In Cypher, null = null → null (not true)\n if (leftVal === null || rightVal === null) {\n return null;\n }\n return leftVal === rightVal;\n }\n\n if ('not' in where) {\n // Cypher: NOT null → null\n const isMatch = evaluateWhere(node, where.not);\n return isMatch === null ? null : !isMatch;\n }\n\n if ('lessThan' in where) {\n const [left, right] = where.lessThan;\n return safeCompare(left, right, node, (a, b) => a < b);\n }\n\n if ('lessThanOrEqual' in where) {\n const [left, right] = where.lessThanOrEqual;\n return safeCompare(left, right, node, (a, b) => a <= b);\n }\n\n if ('greaterThan' in where) {\n const [left, right] = where.greaterThan;\n return safeCompare(left, right, node, (a, b) => a > b);\n }\n\n if ('greaterThanOrEqual' in where) {\n const [left, right] = where.greaterThanOrEqual;\n return safeCompare(left, right, node, (a, b) => a >= b);\n }\n\n if ('contains' in where) {\n const [left, right] = where.contains;\n return safeStringCompare(left, right, node, (a, b) => a.includes(b));\n }\n\n if ('startsWith' in where) {\n const [left, right] = where.startsWith;\n return safeStringCompare(left, right, node, (a, b) => a.startsWith(b));\n }\n\n if ('endsWith' in where) {\n const [left, right] = where.endsWith;\n return safeStringCompare(left, right, node, (a, b) => a.endsWith(b));\n }\n\n if ('isNull' in where) {\n // IS NULL returns true/false (never null)\n const value = evaluateValue(where.isNull, node);\n return value === null;\n }\n\n if ('and' in where) {\n // Cypher three-valued AND:\n // - If any is false → false\n // - Else if any is null → null\n // - Else → true\n let hasNull = false;\n for (const r of where.and) {\n const isMatch = evaluateWhere(node, r);\n if (isMatch === false) {\n return false;\n }\n if (isMatch === null) {\n hasNull = true;\n }\n }\n return hasNull ? null : true;\n }\n\n if ('or' in where) {\n // Cypher three-valued OR:\n // - If any is true → true\n // - Else if any is null → null\n // - Else → false\n let hasNull = false;\n for (const r of where.or) {\n const isMatch = evaluateWhere(node, r);\n if (isMatch === true) {\n return true;\n }\n if (isMatch === null) {\n hasNull = true;\n }\n }\n return hasNull ? null : false;\n }\n\n if ('label' in where) {\n if ('labelsSorted' in node) {\n return where.label === null || node.labelsSorted.includes(where.label);\n }\n return false;\n }\n\n if ('reltype' in where) {\n if ('type' in node) {\n return where.reltype === null || (node as RelData).type === where.reltype;\n }\n return false;\n }\n\n if ('property' in where) {\n return where.property === null || where.property in node.properties;\n }\n\n return false;\n}\n\nfunction evaluateRelStyle(\n apply: Style,\n rel: RelData,\n): EvaluatedNvlRelationshipStyle {\n return {\n ...apply,\n captions: apply.captions?.map((caption) => {\n const { value, styles } = caption;\n\n if (typeof value === 'string' || value === undefined) {\n return { styles, value };\n }\n\n if ('useType' in value) {\n return { styles, value: rel.type };\n }\n\n if ('property' in value) {\n const prop = rel.properties[value.property];\n if (prop === undefined) {\n return { styles, value: '' };\n }\n\n const resolvedValue =\n prop.type === 'string'\n ? prop.stringified.slice(1, -1)\n : prop.stringified;\n\n return { styles, value: resolvedValue };\n }\n\n return { styles, value: rel.id };\n }),\n };\n}\n\n/**\n * Safely compare two values using Cypher's three-valued logic.\n * Returns `null` if either operand is null (matching Cypher semantics).\n *\n * From Neo4j Cypher Manual:\n * \"Comparing any value to `null` using `=` or `<>` results in `null`\"\n *\n * @see https://neo4j.com/docs/cypher-manual/current/values-and-types/working-with-null/\n */\nfunction safeCompare(\n left: Value,\n right: Value,\n graphItem: NodeData | RelData,\n compareFn: (\n a: NonNullable<CypherValue>,\n b: NonNullable<CypherValue>,\n ) => boolean,\n): Ternary {\n const leftVal = evaluateValue(left, graphItem);\n const rightVal = evaluateValue(right, graphItem);\n if (leftVal === null || rightVal === null) {\n return null;\n }\n return compareFn(leftVal, rightVal);\n}\n\n/**\n * String comparison using Cypher semantics.\n * Returns `null` if either operand is null OR not a string.\n *\n * From Neo4j Cypher Manual:\n * \"When these operators are applied to non-string values, they return `null`\n * instead of attempting type coercion.\"\n *\n * @see https://neo4j.com/docs/cypher-manual/current/expressions/predicates/string-operators/\n */\nfunction safeStringCompare(\n left: Value,\n right: Value,\n graphItem: NodeData | RelData,\n compareFn: (a: string, b: string) => boolean,\n): Ternary {\n const leftVal = evaluateValue(left, graphItem);\n const rightVal = evaluateValue(right, graphItem);\n // Return null if either is null or not a string (no type coercion)\n if (\n leftVal === null ||\n rightVal === null ||\n typeof leftVal !== 'string' ||\n typeof rightVal !== 'string'\n ) {\n return null;\n }\n return compareFn(leftVal, rightVal);\n}\n\nfunction evaluateValue(\n value: Value,\n graphItem: NodeData | RelData,\n): CypherValue {\n if (typeof value === 'object' && value !== null) {\n if ('property' in value) {\n if (value.property === null) {\n return null;\n }\n const prop = graphItem.properties[value.property];\n if (prop === undefined) {\n return null;\n }\n return extractPropertyValue(prop);\n }\n if ('label' in value) {\n if ('labelsSorted' in graphItem) {\n return (\n value.label === null || graphItem.labelsSorted.includes(value.label)\n );\n }\n return false;\n }\n if ('reltype' in value) {\n if ('type' in graphItem) {\n return (\n value.reltype === null ||\n (graphItem as RelData).type === value.reltype\n );\n }\n return false;\n }\n }\n\n return value;\n}\n\n// Default caption selection logic\nconst captionPriorityOrder = [\n /^name$/i,\n /^title$/i,\n /^label$/i,\n /name$/i,\n /description$/i,\n /^.+/,\n];\n\nfunction getDefaultNodeCaption(node: NodeData): Caption {\n const propertyKeys = Object.keys(node.properties);\n\n for (const regex of captionPriorityOrder) {\n const matchingKey = propertyKeys.find((key) => regex.test(key));\n if (matchingKey !== undefined) {\n const prop = node.properties[matchingKey];\n if (prop !== undefined) {\n return { value: { property: matchingKey } };\n }\n }\n }\n\n if (node.labelsSorted[0] !== undefined) {\n return { value: { useType: true } };\n }\n\n return { value: node.id };\n}\n\nfunction evaluateNodeStyle(\n apply: Style,\n node: NodeData,\n): EvaluatedNvlNodeStyle {\n return {\n ...apply,\n captions: (apply.captions ?? [getDefaultNodeCaption(node)]).map(\n (caption) => {\n const { value, styles } = caption;\n\n if (typeof value === 'string' || value === undefined) {\n return { styles, value };\n }\n\n if ('useType' in value) {\n return { styles, value: node.labelsSorted[0] };\n }\n\n if ('property' in value) {\n const prop = node.properties[value.property];\n if (prop === undefined) {\n return { styles, value: '' };\n }\n\n const resolvedValue =\n prop.type === 'string'\n ? prop.stringified.slice(1, -1)\n : prop.stringified;\n\n return { styles, value: resolvedValue };\n }\n\n return { styles, value: node.labelsSorted[0] };\n },\n ),\n };\n}\n\nfunction createRelStyleFunction(\n rules: StyleRule[],\n): (rel: RelData) => EvaluatedNvlRelationshipStyle {\n return (rel: RelData) => {\n const style: Style = {};\n\n // evaluateWhere uses Cypher-style three-valued logic (true/false/null).\n // Only `true` passes; both `false` and `null` (unknown) skip the rule.\n for (const rule of rules) {\n // Check if the rule applies to this relationship\n if ('reltype' in rule.match) {\n const isReltypeMatch =\n rule.match.reltype === null || rel.type === rule.match.reltype;\n\n if (isReltypeMatch && evaluateWhere(rel, rule.where) === true) {\n // Merge the style properties (later rules override earlier ones)\n Object.assign(style, rule.apply);\n }\n }\n }\n\n return evaluateRelStyle(style, rel);\n };\n}\n\nexport type CompiledStyleRules = {\n byType: (type: string) => (rel: RelData) => EvaluatedNvlRelationshipStyle;\n styleMatchers: StyleMatchers;\n byLabelSet: (node: NodeData) => EvaluatedNvlNodeStyle;\n};\n\nexport const DEFAULT_REL_COLOR = tokens.palette.neutral['40'];\nconst NO_LABEL_FALLBACK_COLOR = tokens.palette.neutral['40'];\n\nfunction createByLabelSetFunction(\n styleMatchers: StyleMatchers,\n): (node: NodeData) => EvaluatedNvlNodeStyle {\n const defaultColorCache = new Map<string, string>();\n const sortedRulesCache = new Map<string, StyleRule[]>();\n const mergedStyleCache = new Map<string, Style>();\n\n return (node: NodeData) => {\n const labelSetKey = node.labelsSorted.join('\\0');\n\n // Fast path: if all rules for this label set are where-free,\n // the merged style is identical for every node with the same labels.\n const cachedStyle = mergedStyleCache.get(labelSetKey);\n if (cachedStyle !== undefined) {\n return evaluateNodeStyle(cachedStyle, node);\n }\n\n // Memoize default color by first label\n const labelForDefaultColor = node.labelsSorted[0] ?? null;\n let defaultColor: string;\n if (labelForDefaultColor === null) {\n defaultColor = NO_LABEL_FALLBACK_COLOR;\n } else {\n let cached = defaultColorCache.get(labelForDefaultColor);\n if (cached === undefined) {\n cached =\n calculateDefaultNodeColors(labelForDefaultColor).backgroundColor;\n defaultColorCache.set(labelForDefaultColor, cached);\n }\n defaultColor = cached;\n }\n\n // Cache sorted rules by label set (avoids repeated allocation + sort)\n let sortedRules = sortedRulesCache.get(labelSetKey);\n if (sortedRules === undefined) {\n const matchingRules: StyleRule[] = [...styleMatchers.globalLabelRules];\n for (const label of node.labelsSorted) {\n const labelRules = styleMatchers.rulesByLabel.get(label);\n if (labelRules) {\n matchingRules.push(...labelRules);\n }\n }\n sortedRules = matchingRules.toSorted(compareByPriorityAscending);\n sortedRulesCache.set(labelSetKey, sortedRules);\n }\n\n // Evaluate rules, tracking whether all are where-free\n const collectStyles: Style = { color: defaultColor };\n let isAllWhereFree = true;\n for (const rule of sortedRules) {\n if (rule.where !== undefined) {\n isAllWhereFree = false;\n if (evaluateWhere(node, rule.where) === true) {\n Object.assign(collectStyles, rule.apply);\n }\n } else {\n Object.assign(collectStyles, rule.apply);\n }\n }\n\n // When all rules are where-free, the merged style depends only on labels.\n // Cache it so subsequent nodes with the same label set skip rule iteration.\n if (isAllWhereFree) {\n mergedStyleCache.set(labelSetKey, collectStyles);\n }\n\n return evaluateNodeStyle(collectStyles, node);\n };\n}\n\nconst DEFAULT_REL_STYLE: StyleRule = {\n match: { reltype: null },\n apply: {\n color: DEFAULT_REL_COLOR,\n captions: [{ value: { useType: true } }],\n },\n};\n\nexport function compileStyleRules(\n styleRules: StyleRule[] | null | undefined,\n): CompiledStyleRules {\n const styleMatchers = collectStyleMatchers(styleRules);\n\n // Lazily build and cache a style function per relationship type\n const cache = new Map<\n string,\n (rel: RelData) => EvaluatedNvlRelationshipStyle\n >();\n const byType = (type: string) => {\n let fn = cache.get(type);\n if (fn === undefined) {\n const rules = styleMatchers.rulesByType.get(type) ?? [];\n fn = createRelStyleFunction([\n DEFAULT_REL_STYLE,\n ...styleMatchers.globalReltypeRules,\n ...rules,\n ]);\n cache.set(type, fn);\n }\n return fn;\n };\n\n const byLabelSet = createByLabelSetFunction(styleMatchers);\n\n return { byLabelSet, byType, styleMatchers };\n}\n"]}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.NO_LABEL = void 0;
24
+ exports.createVisualizationDataStructures = createVisualizationDataStructures;
25
+ const utils_1 = require("../utils");
26
+ exports.NO_LABEL = '(no label)';
27
+ function buildColorDistribution(colorCounts) {
28
+ return Object.entries(colorCounts)
29
+ .map(([color, count]) => ({ color, count }))
30
+ .sort((a, b) => b.count - a.count);
31
+ }
32
+ function createVisualizationDataStructures(rawNodes, rawRels, compiledStyleRules) {
33
+ var _a, _b;
34
+ const nodeData = {};
35
+ const labelColorCounts = {};
36
+ const labelTotalCounts = {};
37
+ // Single pass: extract data, apply styles, count colors
38
+ const styledNodes = rawNodes.map((rawNode) => {
39
+ var _a, _b, _c;
40
+ const data = {
41
+ id: rawNode.id,
42
+ labelsSorted: [...rawNode.labels].sort(utils_1.sortAlphabetically),
43
+ properties: rawNode.properties,
44
+ };
45
+ nodeData[rawNode.id] = data;
46
+ const appliedStyle = compiledStyleRules.byLabelSet(data);
47
+ const styledNode = Object.assign(Object.assign(Object.assign(Object.assign({}, rawNode), { labels: undefined, properties: undefined }), appliedStyle), (rawNode.color !== undefined ? { color: rawNode.color } : {}));
48
+ // Accumulate color distribution
49
+ const labels = data.labelsSorted.length > 0 ? data.labelsSorted : [exports.NO_LABEL];
50
+ const color = styledNode.color;
51
+ for (const label of labels) {
52
+ labelTotalCounts[label] = ((_a = labelTotalCounts[label]) !== null && _a !== void 0 ? _a : 0) + 1;
53
+ if (color !== undefined) {
54
+ const counts = (_b = labelColorCounts[label]) !== null && _b !== void 0 ? _b : {};
55
+ counts[color] = ((_c = counts[color]) !== null && _c !== void 0 ? _c : 0) + 1;
56
+ labelColorCounts[label] = counts;
57
+ }
58
+ }
59
+ return styledNode;
60
+ });
61
+ const labels = Object.keys(labelTotalCounts).sort(utils_1.sortAlphabetically);
62
+ const labelMetaData = {};
63
+ let hasMultipleColors = false;
64
+ for (const label of labels) {
65
+ const colorDistribution = buildColorDistribution((_a = labelColorCounts[label]) !== null && _a !== void 0 ? _a : {});
66
+ if (colorDistribution.length > 1) {
67
+ hasMultipleColors = true;
68
+ }
69
+ labelMetaData[label] = {
70
+ totalCount: labelTotalCounts[label],
71
+ colorDistribution,
72
+ };
73
+ }
74
+ const relData = {};
75
+ const relTypeCounts = {};
76
+ const relColorCounts = {};
77
+ // Single pass: extract data, apply styles, count colors
78
+ const styledRels = rawRels.map((rawRel) => {
79
+ var _a, _b, _c;
80
+ const data = {
81
+ id: rawRel.id,
82
+ properties: rawRel.properties,
83
+ type: rawRel.type,
84
+ };
85
+ relData[rawRel.id] = data;
86
+ const appliedStyle = compiledStyleRules.byType(data.type)(data);
87
+ const styledRel = Object.assign(Object.assign(Object.assign(Object.assign({}, rawRel), { properties: undefined, type: undefined }), appliedStyle), (rawRel.color !== undefined ? { color: rawRel.color } : {}));
88
+ // Accumulate color distribution and type counts
89
+ relTypeCounts[data.type] = ((_a = relTypeCounts[data.type]) !== null && _a !== void 0 ? _a : 0) + 1;
90
+ const color = styledRel.color;
91
+ if (color !== undefined) {
92
+ const counts = (_b = relColorCounts[data.type]) !== null && _b !== void 0 ? _b : {};
93
+ counts[color] = ((_c = counts[color]) !== null && _c !== void 0 ? _c : 0) + 1;
94
+ relColorCounts[data.type] = counts;
95
+ }
96
+ return styledRel;
97
+ });
98
+ const reltypes = Object.keys(relTypeCounts).sort(utils_1.sortAlphabetically);
99
+ const reltypeMetaData = {};
100
+ for (const type of reltypes) {
101
+ const colorDistribution = buildColorDistribution((_b = relColorCounts[type]) !== null && _b !== void 0 ? _b : {});
102
+ if (colorDistribution.length > 1) {
103
+ hasMultipleColors = true;
104
+ }
105
+ reltypeMetaData[type] = {
106
+ totalCount: relTypeCounts[type],
107
+ colorDistribution,
108
+ };
109
+ }
110
+ return {
111
+ metadataLookup: {
112
+ hasMultipleColors,
113
+ labelMetaData,
114
+ labels,
115
+ reltypeMetaData,
116
+ reltypes,
117
+ },
118
+ styledGraph: {
119
+ nodeData,
120
+ nodes: styledNodes,
121
+ relData,
122
+ rels: styledRels,
123
+ },
124
+ };
125
+ }
126
+ //# sourceMappingURL=create-vis-data-structures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-vis-data-structures.js","sourceRoot":"","sources":["../../../src/styling/create-vis-data-structures.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAyBH,8EAoIC;AAjJD,oCAA8C;AAGjC,QAAA,QAAQ,GAAG,YAAY,CAAC;AAErC,SAAS,sBAAsB,CAC7B,WAAmC;IAEnC,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;SAC/B,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;SAC3C,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAED,SAAgB,iCAAiC,CAC/C,QAAmB,EACnB,OAAiB,EAC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AAC;YACjC,iBAAiB,GAAG,IAAI,CAAC;QAC3B,CAAC;QACD,eAAe,CAAC,IAAI,CAAC,GAAG;YACtB,UAAU,EAAE,aAAa,CAAC,IAAI,CAAE;YAChC,iBAAiB;SAClB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,cAAc,EAAE;YACd,iBAAiB;YACjB,aAAa;YACb,MAAM;YACN,eAAe;YACf,QAAQ;SACT;QACD,WAAW,EAAE;YACX,QAAQ;YACR,KAAK,EAAE,WAAW;YAClB,OAAO;YACP,IAAI,EAAE,UAAU;SACjB;KACF,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type {\n ColorCount,\n GraphItemMetaData,\n MetadataLookupTable,\n NeoNode,\n NeoRel,\n NodeData,\n NvlGraph,\n RelData,\n} from '../graph-visualization-context';\nimport { sortAlphabetically } from '../utils';\nimport type { CompiledStyleRules } from './compile-graph-styles';\n\nexport const NO_LABEL = '(no label)';\n\nfunction buildColorDistribution(\n colorCounts: Record<string, number>,\n): ColorCount[] {\n return Object.entries(colorCounts)\n .map(([color, count]) => ({ color, count }))\n .sort((a, b) => b.count - a.count);\n}\n\nexport function createVisualizationDataStructures(\n rawNodes: NeoNode[],\n rawRels: NeoRel[],\n compiledStyleRules: CompiledStyleRules,\n): {\n styledGraph: NvlGraph;\n metadataLookup: MetadataLookupTable;\n} {\n const nodeData: Record<string, NodeData> = {};\n const labelColorCounts: Record<string, Record<string, number>> = {};\n const labelTotalCounts: Record<string, number> = {};\n\n // Single pass: extract data, apply styles, count colors\n const styledNodes = rawNodes.map((rawNode) => {\n const data: NodeData = {\n id: rawNode.id,\n labelsSorted: [...rawNode.labels].sort(sortAlphabetically),\n properties: rawNode.properties,\n };\n nodeData[rawNode.id] = data;\n\n const appliedStyle = compiledStyleRules.byLabelSet(data);\n\n const styledNode = {\n ...rawNode,\n labels: undefined,\n properties: undefined,\n ...appliedStyle,\n // Consumer-set color on NeoNode takes precedence over style rules\n ...(rawNode.color !== undefined ? { color: rawNode.color } : {}),\n };\n\n // Accumulate color distribution\n const labels =\n data.labelsSorted.length > 0 ? data.labelsSorted : [NO_LABEL];\n const color = styledNode.color;\n\n for (const label of labels) {\n labelTotalCounts[label] = (labelTotalCounts[label] ?? 0) + 1;\n\n if (color !== undefined) {\n const counts = labelColorCounts[label] ?? {};\n counts[color] = (counts[color] ?? 0) + 1;\n labelColorCounts[label] = counts;\n }\n }\n\n return styledNode;\n });\n\n const labels = Object.keys(labelTotalCounts).sort(sortAlphabetically);\n const labelMetaData: Record<string, GraphItemMetaData> = {};\n let hasMultipleColors = false;\n for (const label of labels) {\n const colorDistribution = buildColorDistribution(\n labelColorCounts[label] ?? {},\n );\n if (colorDistribution.length > 1) {\n hasMultipleColors = true;\n }\n labelMetaData[label] = {\n totalCount: labelTotalCounts[label]!,\n colorDistribution,\n };\n }\n\n const relData: Record<string, RelData> = {};\n const relTypeCounts: Record<string, number> = {};\n const relColorCounts: Record<string, Record<string, number>> = {};\n\n // Single pass: extract data, apply styles, count colors\n const styledRels = rawRels.map((rawRel) => {\n const data: RelData = {\n id: rawRel.id,\n properties: rawRel.properties,\n type: rawRel.type,\n };\n relData[rawRel.id] = data;\n\n const appliedStyle = compiledStyleRules.byType(data.type)(data);\n\n const styledRel = {\n ...rawRel,\n properties: undefined,\n type: undefined,\n ...appliedStyle,\n // Consumer-set color on NeoRel takes precedence over style rules\n ...(rawRel.color !== undefined ? { color: rawRel.color } : {}),\n };\n\n // Accumulate color distribution and type counts\n relTypeCounts[data.type] = (relTypeCounts[data.type] ?? 0) + 1;\n const color = styledRel.color;\n if (color !== undefined) {\n const counts = relColorCounts[data.type] ?? {};\n counts[color] = (counts[color] ?? 0) + 1;\n relColorCounts[data.type] = counts;\n }\n\n return styledRel;\n });\n\n const reltypes = Object.keys(relTypeCounts).sort(sortAlphabetically);\n const reltypeMetaData: Record<string, GraphItemMetaData> = {};\n for (const type of reltypes) {\n const colorDistribution = buildColorDistribution(\n relColorCounts[type] ?? {},\n );\n if (colorDistribution.length > 1) {\n hasMultipleColors = true;\n }\n reltypeMetaData[type] = {\n totalCount: relTypeCounts[type]!,\n colorDistribution,\n };\n }\n\n return {\n metadataLookup: {\n hasMultipleColors,\n labelMetaData,\n labels,\n reltypeMetaData,\n reltypes,\n },\n styledGraph: {\n nodeData,\n nodes: styledNodes,\n relData,\n rels: styledRels,\n },\n };\n}\n"]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.useGraphData = useGraphData;
24
+ const react_1 = require("react");
25
+ const compile_graph_styles_1 = require("./compile-graph-styles");
26
+ const create_vis_data_structures_1 = require("./create-vis-data-structures");
27
+ function useGraphData(rawNodes, rawRels, styleRules) {
28
+ // Compile style rules — only re-runs when styleRules changes.
29
+ // Per-type relationship functions are built lazily on first access.
30
+ const compiledStyleRules = (0, react_1.useMemo)(() => (0, compile_graph_styles_1.compileStyleRules)(styleRules), [styleRules]);
31
+ // Apply styles and build metadata — runs on every data change.
32
+ const { styledGraph, metadataLookup } = (0, react_1.useMemo)(() => (0, create_vis_data_structures_1.createVisualizationDataStructures)(rawNodes, rawRels, compiledStyleRules), [rawNodes, rawRels, compiledStyleRules]);
33
+ return { styledGraph, metadataLookup, compiledStyleRules };
34
+ }
35
+ //# sourceMappingURL=use-graph-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-graph-data.js","sourceRoot":"","sources":["../../../src/styling/use-graph-data.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AASH,oCAoBC;AA3BD,iCAAgC;AAGhC,iEAA2D;AAC3D,6EAAiF;AAGjF,SAAgB,YAAY,CAC1B,QAAmB,EACnB,OAAiB,EACjB,UAAwB;IAExB,8DAA8D;IAC9D,oEAAoE;IACpE,MAAM,kBAAkB,GAAG,IAAA,eAAO,EAChC,GAAG,EAAE,CAAC,IAAA,wCAAiB,EAAC,UAAU,CAAC,EACnC,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,+DAA+D;IAC/D,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,IAAA,eAAO,EAC7C,GAAG,EAAE,CACH,IAAA,8DAAiC,EAAC,QAAQ,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAC1E,CAAC,QAAQ,EAAE,OAAO,EAAE,kBAAkB,CAAC,CACxC,CAAC;IAEF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;AAC7D,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useMemo } from 'react';\n\nimport type { NeoNode, NeoRel } from '../graph-visualization-context';\nimport { compileStyleRules } from './compile-graph-styles';\nimport { createVisualizationDataStructures } from './create-vis-data-structures';\nimport type { StyleRule } from './style-types';\n\nexport function useGraphData(\n rawNodes: NeoNode[],\n rawRels: NeoRel[],\n styleRules?: StyleRule[],\n) {\n // Compile style rules — only re-runs when styleRules changes.\n // Per-type relationship functions are built lazily on first access.\n const compiledStyleRules = useMemo(\n () => compileStyleRules(styleRules),\n [styleRules],\n );\n\n // Apply styles and build metadata — runs on every data change.\n const { styledGraph, metadataLookup } = useMemo(\n () =>\n createVisualizationDataStructures(rawNodes, rawRels, compiledStyleRules),\n [rawNodes, rawRels, compiledStyleRules],\n );\n\n return { styledGraph, metadataLookup, compiledStyleRules };\n}\n"]}