@ankhorage/zora 27.4.2 → 27.4.4
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 +12 -0
- package/README.md +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js +6 -2
- package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js.map +1 -1
- package/package.json +3 -3
- package/src/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.test.ts +32 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.ts +7 -2
- package/web-dist/chunks/{Accordion-rj3ayvn5.js → Accordion-0pm8dvcy.js} +2 -2
- package/web-dist/chunks/{Accordion-ss57gqjb.js → Accordion-0pryvztw.js} +1 -1
- package/web-dist/chunks/{Accordion-a6xxvydp.js → Accordion-0z8nry94.js} +1 -1
- package/web-dist/chunks/{Accordion-64px84rh.js → Accordion-36nt5xmp.js} +4 -4
- package/web-dist/chunks/{Accordion-j61qh3rb.js → Accordion-3qz6s2z9.js} +1 -1
- package/web-dist/chunks/{Accordion-z5kr43w5.js → Accordion-5f9e10c6.js} +1 -1
- package/web-dist/chunks/{Accordion-549akrjn.js → Accordion-6c2ykyad.js} +2 -2
- package/web-dist/chunks/{Accordion-g9m813fh.js → Accordion-6tesp7jr.js} +1 -1
- package/web-dist/chunks/{Accordion-tchccn9f.js → Accordion-8xgdw6ry.js} +1 -1
- package/web-dist/chunks/{Accordion-h21ah8w3.js → Accordion-a6h4ff7g.js} +2 -2
- package/web-dist/chunks/{Accordion-6jb7b67v.js → Accordion-b8659jt9.js} +1 -1
- package/web-dist/chunks/{Accordion-49m38edd.js → Accordion-bj7hv2dq.js} +1 -1
- package/web-dist/chunks/{Accordion-wtqev4qa.js → Accordion-bwp6m0zd.js} +2 -2
- package/web-dist/chunks/{Accordion-wdefxczv.js → Accordion-cp82h5jx.js} +4 -4
- package/web-dist/chunks/{Accordion-xs9aspze.js → Accordion-cqdfhyr9.js} +1 -1
- package/web-dist/chunks/{Accordion-120nmpbe.js → Accordion-d6f4vr6s.js} +1 -1
- package/web-dist/chunks/{Accordion-b8t2gq8g.js → Accordion-dnpfe329.js} +3 -3
- package/web-dist/chunks/{Accordion-x33am5bc.js → Accordion-e8dg1z2s.js} +1 -0
- package/web-dist/chunks/{Accordion-z8c7y6d8.js → Accordion-e9c80kn7.js} +1 -1
- package/web-dist/chunks/{Accordion-sttjd4rs.js → Accordion-ep9xpmbw.js} +3 -3
- package/web-dist/chunks/{Accordion-52a3dpsm.js → Accordion-eqkmzs33.js} +1 -1
- package/web-dist/chunks/{Accordion-sz17szqm.js → Accordion-g009pehq.js} +3 -3
- package/web-dist/chunks/{Accordion-kexh248h.js → Accordion-g758dqfc.js} +1 -1
- package/web-dist/chunks/{Accordion-dk40hsc0.js → Accordion-g9hn7fht.js} +1 -1
- package/web-dist/chunks/{Accordion-0z2t95zw.js → Accordion-hh6jrz1e.js} +4 -4
- package/web-dist/chunks/{Accordion-xfdp8w37.js → Accordion-j09h3pg1.js} +7 -7
- package/web-dist/chunks/{Accordion-hfb983jm.js → Accordion-jp5xt2kz.js} +1 -1
- package/web-dist/chunks/{Accordion-e1krqvc4.js → Accordion-k81eyekh.js} +2 -2
- package/web-dist/chunks/{Accordion-8q7hn9aj.js → Accordion-kpk964z0.js} +1 -0
- package/web-dist/chunks/{Accordion-49mzcav8.js → Accordion-n29svm40.js} +1 -1
- package/web-dist/chunks/{Accordion-p43psvv8.js → Accordion-ppksc4jh.js} +4 -4
- package/web-dist/chunks/{Accordion-ng9pnz9r.js → Accordion-q1vqpaw6.js} +4 -4
- package/web-dist/chunks/{Accordion-09jkcm1x.js → Accordion-qzx53csd.js} +4 -4
- package/web-dist/chunks/{Accordion-z4m47w0b.js → Accordion-rcff84ws.js} +1 -1
- package/web-dist/chunks/{Accordion-kx6695j5.js → Accordion-wfrt39d2.js} +1 -1
- package/web-dist/chunks/{Accordion-dxhs3xwx.js → Accordion-xr81ntxh.js} +4 -4
- package/web-dist/chunks/{Accordion-401452az.js → Accordion-y5kdx80m.js} +3 -3
- package/web-dist/chunks/{Accordion-6ec9bfd8.js → Accordion-yd025qec.js} +2 -2
- package/web-dist/chunks/{Accordion-44bcsg35.js → Accordion-zjygy6n2.js} +3 -3
- package/web-dist/chunks/{Accordion-sheqvs8c.js → Accordion-zqzqg9yc.js} +6 -6
- package/web-dist/components/accordion/Accordion.js +3 -3
- package/web-dist/components/accordion-item/AccordionItem.js +3 -3
- package/web-dist/components/app-bar/AppBar.js +8 -8
- package/web-dist/components/app-header/AppHeader.js +8 -8
- package/web-dist/components/app-shell/AppShell.js +2 -2
- package/web-dist/components/auth-screen/AuthScreen.js +12 -12
- package/web-dist/components/avatar/Avatar.js +3 -3
- package/web-dist/components/avatar-group/AvatarGroup.js +3 -3
- package/web-dist/components/badge/Badge.js +2 -2
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +11 -11
- package/web-dist/components/bottom-sheet/BottomSheet.js +3 -3
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +3 -3
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +3 -3
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +3 -3
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +3 -3
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +3 -3
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +5 -5
- package/web-dist/components/button/Button.js +5 -5
- package/web-dist/components/button-group/ButtonGroup.js +5 -5
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +11 -11
- package/web-dist/components/card/Card.js +10 -10
- package/web-dist/components/chat-list-item/ChatListItem.js +6 -6
- package/web-dist/components/checkbox/Checkbox.js +4 -4
- package/web-dist/components/checkbox-group/CheckboxGroup.js +4 -4
- package/web-dist/components/chip/Chip.js +4 -4
- package/web-dist/components/chip-group/ChipGroup.js +4 -4
- package/web-dist/components/collection-editor/CollectionEditor.js +10 -10
- package/web-dist/components/color-hue-scale/ColorHueScale.js +6 -6
- package/web-dist/components/color-picker/ColorPicker.js +6 -6
- package/web-dist/components/color-tone/ColorTone.js +6 -6
- package/web-dist/components/color-wheel/ColorWheel.js +6 -6
- package/web-dist/components/content-rail/ContentRail.js +5 -5
- package/web-dist/components/data-table/DataTable.js +15 -15
- package/web-dist/components/date-picker/DatePicker.js +9 -9
- package/web-dist/components/dialog/Dialog.js +4 -4
- package/web-dist/components/divider/Divider.js +2 -2
- package/web-dist/components/empty-state/EmptyState.js +11 -11
- package/web-dist/components/explorer/Explorer.js +4 -4
- package/web-dist/components/field/Field.js +4 -4
- package/web-dist/components/file-explorer/FileExplorer.js +4 -4
- package/web-dist/components/flat-list/FlatList.js +5 -5
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +12 -12
- package/web-dist/components/form/Form.js +8 -8
- package/web-dist/components/form-actions/FormActions.js +8 -8
- package/web-dist/components/form-error/FormError.js +8 -8
- package/web-dist/components/game/Game.js +3 -3
- package/web-dist/components/game-entity/GameEntity.js +3 -3
- package/web-dist/components/game-field/GameField.js +3 -3
- package/web-dist/components/game-input-zone/GameInputZone.js +3 -3
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +3 -3
- package/web-dist/components/game-overlay/GameOverlay.js +3 -3
- package/web-dist/components/gradient/Gradient.js +3 -3
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +3 -3
- package/web-dist/components/graph-view/GraphView.js +5 -2
- package/web-dist/components/grid/Grid.js +2 -2
- package/web-dist/components/hero/Hero.js +10 -10
- package/web-dist/components/icon-button/IconButton.js +5 -5
- package/web-dist/components/image/Image.js +3 -3
- package/web-dist/components/list/List.js +5 -5
- package/web-dist/components/list-item/ListItem.js +5 -5
- package/web-dist/components/list-section/ListSection.js +5 -5
- package/web-dist/components/matrix-grid/MatrixGrid.js +1 -1
- package/web-dist/components/media-card/MediaCard.js +10 -10
- package/web-dist/components/media-explorer/MediaExplorer.js +4 -4
- package/web-dist/components/message-bubble/MessageBubble.js +6 -6
- package/web-dist/components/metric-card/MetricCard.js +10 -10
- package/web-dist/components/missing-element/MissingElement.js +3 -3
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +12 -12
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +12 -12
- package/web-dist/components/otp-form/OtpForm.js +12 -12
- package/web-dist/components/pagination/Pagination.js +5 -5
- package/web-dist/components/palette-item/PaletteItem.js +10 -10
- package/web-dist/components/popover-menu/PopoverMenu.js +4 -4
- package/web-dist/components/post-card/PostCard.js +10 -10
- package/web-dist/components/product-card/ProductCard.js +10 -10
- package/web-dist/components/progress/Progress.js +3 -3
- package/web-dist/components/progress-ring/ProgressRing.js +3 -3
- package/web-dist/components/radio/Radio.js +4 -4
- package/web-dist/components/radio-group/RadioGroup.js +4 -4
- package/web-dist/components/rating/Rating.js +2 -2
- package/web-dist/components/reader/Reader.js +11 -11
- package/web-dist/components/scan-overlay/ScanOverlay.js +11 -11
- package/web-dist/components/screen/Screen.js +2 -2
- package/web-dist/components/screen-section/ScreenSection.js +3 -3
- package/web-dist/components/scroll-view/ScrollView.js +2 -2
- package/web-dist/components/search-input/SearchInput.js +6 -6
- package/web-dist/components/section-header/SectionHeader.js +3 -3
- package/web-dist/components/section-list/SectionList.js +5 -5
- package/web-dist/components/select/Select.js +8 -8
- package/web-dist/components/selectable-item/SelectableItem.js +1 -1
- package/web-dist/components/selection-provider/SelectionProvider.js +1 -1
- package/web-dist/components/sign-in-form/SignInForm.js +12 -12
- package/web-dist/components/sign-up-form/SignUpForm.js +12 -12
- package/web-dist/components/skeleton/Skeleton.js +13 -13
- package/web-dist/components/skeleton-card/SkeletonCard.js +13 -13
- package/web-dist/components/skeleton-list/SkeletonList.js +13 -13
- package/web-dist/components/skeleton-text/SkeletonText.js +13 -13
- package/web-dist/components/surface/Surface.js +3 -3
- package/web-dist/components/switch/Switch.js +2 -2
- package/web-dist/components/tab/Tab.js +2 -2
- package/web-dist/components/tab-list/TabList.js +2 -2
- package/web-dist/components/tab-panel/TabPanel.js +2 -2
- package/web-dist/components/tabs/Tabs.js +2 -2
- package/web-dist/components/text-input/TextInput.js +6 -6
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +5 -5
- package/web-dist/components/time-picker/TimePicker.js +9 -9
- package/web-dist/components/timeline/Timeline.js +2 -2
- package/web-dist/components/toast/Toast.js +4 -4
- package/web-dist/components/toast-provider/ToastProvider.js +4 -4
- package/web-dist/components/toolbar/Toolbar.js +10 -10
- package/web-dist/components/tree-item/TreeItem.js +8 -8
- package/web-dist/components/uploader/Uploader.js +13 -13
- package/web-dist/components/view/View.js +2 -2
- package/web-dist/manifest.json +663 -663
- package/web-dist/runtime/ZoraProvider.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 27.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- af0099d: Update dependencies: `@ankhorage/surface`.
|
|
8
|
+
|
|
9
|
+
## 27.4.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 45d8aa9: Keep GraphView label sizing stable when renderer metrics contain floating-point noise above whole pixels.
|
|
14
|
+
|
|
3
15
|
## 27.4.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# ZORA
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Provides opinionated React Native and React Native Web UI components, theme primitives, registries, and reader surfaces built on @ankhorage/surface.
|
|
9
9
|
|
|
@@ -22,8 +22,8 @@ export function sizeGraphNodesToLabels(cy, sizedNodeIds, enabled) {
|
|
|
22
22
|
});
|
|
23
23
|
if (bounds.w <= 0 || bounds.h <= 0)
|
|
24
24
|
return;
|
|
25
|
-
const width =
|
|
26
|
-
const height =
|
|
25
|
+
const width = getStableLabelDimension(bounds.w);
|
|
26
|
+
const height = getStableLabelDimension(bounds.h);
|
|
27
27
|
if (node.width() !== width || node.height() !== height)
|
|
28
28
|
node.style({ width, height });
|
|
29
29
|
visibleIds.add(node.id());
|
|
@@ -37,4 +37,8 @@ export function sizeGraphNodesToLabels(cy, sizedNodeIds, enabled) {
|
|
|
37
37
|
for (const id of visibleIds)
|
|
38
38
|
sizedNodeIds.add(id);
|
|
39
39
|
}
|
|
40
|
+
/*** Round upward while discarding only floating-point noise above whole label pixels. */
|
|
41
|
+
function getStableLabelDimension(dimension) {
|
|
42
|
+
return Math.ceil(dimension - Number.EPSILON * Math.max(1, dimension));
|
|
43
|
+
}
|
|
40
44
|
//# sourceMappingURL=sizeGraphNodesToLabels.js.map
|
package/dist/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizeGraphNodesToLabels.js","sourceRoot":"","sources":["../../../../../../src/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAQ,EAAE,YAAyB,EAAE,OAAgB;IAC1F,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,KAAK,MAAM,EAAE,IAAI,YAAY;YAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACjF,YAAY,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO;IACT,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAC;IACrC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;YAC9B,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE,IAAI;YACnB,eAAe,EAAE,KAAK;YACtB,gBAAgB,EAAE,KAAK;SACxB,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC;YAAE,OAAO;QAC3C,MAAM,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"sizeGraphNodesToLabels.js","sourceRoot":"","sources":["../../../../../../src/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAQ,EAAE,YAAyB,EAAE,OAAgB;IAC1F,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,KAAK,MAAM,EAAE,IAAI,YAAY;YAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACjF,YAAY,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO;IACT,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAC;IACrC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;YAC9B,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE,IAAI;YACnB,eAAe,EAAE,KAAK;YACtB,gBAAgB,EAAE,KAAK;SACxB,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC;YAAE,OAAO;QAC3C,MAAM,KAAK,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACjD,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,KAAK,MAAM;YAAE,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QACtF,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,KAAK,MAAM,EAAE,IAAI,YAAY,EAAE,CAAC;QAC9B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;YACxB,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;YAClD,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,KAAK,MAAM,EAAE,IAAI,UAAU;QAAE,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,yFAAyF;AACzF,SAAS,uBAAuB,CAAC,SAAiB;IAChD,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import type { Core } from 'cytoscape';\n\n/***\n * Size plain leaf nodes from the renderer's styled label bounds, keeping padding in the stylesheet.\n * Reuse Cytoscape's cached text measurements during reconciliation, never a per-element\n * style callback or a pan/zoom listener. Only write changed dimensions; bold and Unicode labels must\n * not regress to character-count estimates. Compound dimensions remain owned by child bounds.\n */\nexport function sizeGraphNodesToLabels(cy: Core, sizedNodeIds: Set<string>, enabled: boolean) {\n if (!enabled) {\n for (const id of sizedNodeIds) cy.getElementById(id).removeStyle('width height');\n sizedNodeIds.clear();\n return;\n }\n const visibleIds = new Set<string>();\n cy.nodes(':childless').forEach((node) => {\n const bounds = node.boundingBox({\n includeNodes: false,\n includeEdges: false,\n includeLabels: true,\n includeOverlays: false,\n includeUnderlays: false,\n });\n if (bounds.w <= 0 || bounds.h <= 0) return;\n const width = getStableLabelDimension(bounds.w);\n const height = getStableLabelDimension(bounds.h);\n if (node.width() !== width || node.height() !== height) node.style({ width, height });\n visibleIds.add(node.id());\n });\n for (const id of sizedNodeIds) {\n if (!visibleIds.has(id)) {\n cy.getElementById(id).removeStyle('width height');\n sizedNodeIds.delete(id);\n }\n }\n for (const id of visibleIds) sizedNodeIds.add(id);\n}\n\n/*** Round upward while discarding only floating-point noise above whole label pixels. */\nfunction getStableLabelDimension(dimension: number): number {\n return Math.ceil(dimension - Number.EPSILON * Math.max(1, dimension));\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "27.4.
|
|
4
|
+
"version": "27.4.4",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@ankhorage/grid-view": "^0.5.0",
|
|
49
49
|
"@ankhorage/reader": "^0.1.3",
|
|
50
50
|
"@ankhorage/runtime": "^5.5.6",
|
|
51
|
-
"@ankhorage/surface": "^9.5.
|
|
51
|
+
"@ankhorage/surface": "^9.5.20",
|
|
52
52
|
"@ankhorage/utility": "^1.10.1",
|
|
53
53
|
"expo-document-picker": "~57.0.3",
|
|
54
54
|
"expo-image-picker": "~57.0.20"
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
},
|
|
168
168
|
"devDependencies": {
|
|
169
169
|
"@ankhorage/devtools": "^2.3.47",
|
|
170
|
-
"@ankhorage/paradox": "^0.
|
|
170
|
+
"@ankhorage/paradox": "^0.6.0",
|
|
171
171
|
"@react-native-vector-icons/fontawesome": "^14.0.0",
|
|
172
172
|
"@react-native-vector-icons/fontawesome5": "^14.0.0",
|
|
173
173
|
"@react-native-vector-icons/fontawesome6": "^14.0.0",
|
package/src/features/graph-view/adapters/inbound/web-artifact/sizeGraphNodesToLabels.test.ts
CHANGED
|
@@ -36,3 +36,35 @@ test('uses rendered label bounds, retains padding, and releases sizing when disa
|
|
|
36
36
|
cy.destroy();
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
+
|
|
40
|
+
test('keeps mathematically whole fractional label metrics idempotent while growing for real fractions', () => {
|
|
41
|
+
const cy = cytoscape({
|
|
42
|
+
headless: true,
|
|
43
|
+
styleEnabled: true,
|
|
44
|
+
elements: [{ data: { id: 'fractional-label' } }],
|
|
45
|
+
style: [{ selector: 'node', style: { width: 30, height: 20 } }],
|
|
46
|
+
});
|
|
47
|
+
const sized = new Set<string>();
|
|
48
|
+
const node = cy.getElementById('fractional-label');
|
|
49
|
+
const bounds = { height: 18.000000000000004, width: 50.00000000000001 };
|
|
50
|
+
node.boundingBox = () => ({
|
|
51
|
+
x1: 0,
|
|
52
|
+
x2: bounds.width,
|
|
53
|
+
y1: 0,
|
|
54
|
+
y2: bounds.height,
|
|
55
|
+
w: bounds.width,
|
|
56
|
+
h: bounds.height,
|
|
57
|
+
});
|
|
58
|
+
try {
|
|
59
|
+
sizeGraphNodesToLabels(cy, sized, true);
|
|
60
|
+
expect(node.width()).toBe(50);
|
|
61
|
+
expect(node.height()).toBe(18);
|
|
62
|
+
sizeGraphNodesToLabels(cy, sized, true);
|
|
63
|
+
expect(node.width()).toBe(50);
|
|
64
|
+
bounds.width = 50.0001;
|
|
65
|
+
sizeGraphNodesToLabels(cy, sized, true);
|
|
66
|
+
expect(node.width()).toBe(51);
|
|
67
|
+
} finally {
|
|
68
|
+
cy.destroy();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
@@ -22,8 +22,8 @@ export function sizeGraphNodesToLabels(cy: Core, sizedNodeIds: Set<string>, enab
|
|
|
22
22
|
includeUnderlays: false,
|
|
23
23
|
});
|
|
24
24
|
if (bounds.w <= 0 || bounds.h <= 0) return;
|
|
25
|
-
const width =
|
|
26
|
-
const height =
|
|
25
|
+
const width = getStableLabelDimension(bounds.w);
|
|
26
|
+
const height = getStableLabelDimension(bounds.h);
|
|
27
27
|
if (node.width() !== width || node.height() !== height) node.style({ width, height });
|
|
28
28
|
visibleIds.add(node.id());
|
|
29
29
|
});
|
|
@@ -35,3 +35,8 @@ export function sizeGraphNodesToLabels(cy: Core, sizedNodeIds: Set<string>, enab
|
|
|
35
35
|
}
|
|
36
36
|
for (const id of visibleIds) sizedNodeIds.add(id);
|
|
37
37
|
}
|
|
38
|
+
|
|
39
|
+
/*** Round upward while discarding only floating-point noise above whole label pixels. */
|
|
40
|
+
function getStableLabelDimension(dimension: number): number {
|
|
41
|
+
return Math.ceil(dimension - Number.EPSILON * Math.max(1, dimension));
|
|
42
|
+
}
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./Accordion-tpd1vvy9.js";
|
|
8
8
|
import {
|
|
9
9
|
View3
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-kpk964z0.js";
|
|
11
11
|
import {
|
|
12
12
|
Pressable
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-6tesp7jr.js";
|
|
14
14
|
import {
|
|
15
15
|
Text2
|
|
16
16
|
} from "./Accordion-8vcs6nz6.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
View3,
|
|
4
4
|
Divider3
|
|
5
|
-
} from "./Accordion-
|
|
5
|
+
} from "./Accordion-kpk964z0.js";
|
|
6
6
|
import {
|
|
7
7
|
useTheme
|
|
8
8
|
} from "./Accordion-tpd1vvy9.js";
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
} from "./Accordion-mrhkw8n6.js";
|
|
12
12
|
import {
|
|
13
13
|
IconButton2
|
|
14
|
-
} from "./Accordion-
|
|
14
|
+
} from "./Accordion-qzx53csd.js";
|
|
15
15
|
import {
|
|
16
16
|
View2
|
|
17
|
-
} from "./Accordion-
|
|
17
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
18
18
|
import {
|
|
19
19
|
PopoverMenu2
|
|
20
|
-
} from "./Accordion-
|
|
20
|
+
} from "./Accordion-g009pehq.js";
|
|
21
21
|
import {
|
|
22
22
|
Heading2,
|
|
23
23
|
Text3
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
View3
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-kpk964z0.js";
|
|
5
5
|
import {
|
|
6
6
|
useTheme
|
|
7
7
|
} from "./Accordion-tpd1vvy9.js";
|
|
8
8
|
import {
|
|
9
9
|
Surface3
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-rcff84ws.js";
|
|
11
11
|
import {
|
|
12
12
|
Text2
|
|
13
13
|
} from "./Accordion-8vcs6nz6.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Pressable
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-6tesp7jr.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
7
|
} from "./Accordion-mrhkw8n6.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./Accordion-9hcbf56f.js";
|
|
11
11
|
import {
|
|
12
12
|
View2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
14
14
|
import {
|
|
15
15
|
Text3
|
|
16
16
|
} from "./Accordion-ew2cebyd.js";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./Accordion-mrhkw8n6.js";
|
|
5
5
|
import {
|
|
6
6
|
Button2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-qzx53csd.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
11
11
|
import {
|
|
12
12
|
Text3
|
|
13
13
|
} from "./Accordion-ew2cebyd.js";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./Accordion-mrhkw8n6.js";
|
|
5
5
|
import {
|
|
6
6
|
Button2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-qzx53csd.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
11
11
|
import {
|
|
12
12
|
Card2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-j09h3pg1.js";
|
|
14
14
|
import {
|
|
15
15
|
Text3
|
|
16
16
|
} from "./Accordion-ew2cebyd.js";
|
|
17
17
|
import {
|
|
18
18
|
Badge2
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-n29svm40.js";
|
|
20
20
|
import {
|
|
21
21
|
useZoraTheme2
|
|
22
22
|
} from "./Accordion-gysa24fk.js";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./Accordion-mnac2z83.js";
|
|
5
5
|
import {
|
|
6
6
|
View3
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-kpk964z0.js";
|
|
8
8
|
import {
|
|
9
9
|
useTheme
|
|
10
10
|
} from "./Accordion-tpd1vvy9.js";
|
|
11
11
|
import {
|
|
12
12
|
Pressable
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-6tesp7jr.js";
|
|
14
14
|
import {
|
|
15
15
|
Text2
|
|
16
16
|
} from "./Accordion-8vcs6nz6.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./Accordion-mrhkw8n6.js";
|
|
20
20
|
import {
|
|
21
21
|
View2
|
|
22
|
-
} from "./Accordion-
|
|
22
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
23
23
|
import {
|
|
24
24
|
Text3
|
|
25
25
|
} from "./Accordion-ew2cebyd.js";
|
|
@@ -281,6 +281,7 @@ function resolveDimensionStyles(theme, breakpoint, props) {
|
|
|
281
281
|
}
|
|
282
282
|
function resolveLayoutStyles(theme, breakpoint, props) {
|
|
283
283
|
return {
|
|
284
|
+
display: "flex",
|
|
284
285
|
flex: resolveResponsive2(props.flex, breakpoint),
|
|
285
286
|
flexGrow: resolveResponsive2(props.flexGrow, breakpoint),
|
|
286
287
|
flexShrink: resolveResponsive2(props.flexShrink, breakpoint),
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./Accordion-mnac2z83.js";
|
|
5
5
|
import {
|
|
6
6
|
View3
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-kpk964z0.js";
|
|
8
8
|
import {
|
|
9
9
|
useTheme
|
|
10
10
|
} from "./Accordion-tpd1vvy9.js";
|
|
11
11
|
import {
|
|
12
12
|
Pressable
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-6tesp7jr.js";
|
|
14
14
|
import {
|
|
15
15
|
Text2
|
|
16
16
|
} from "./Accordion-8vcs6nz6.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./Accordion-mrhkw8n6.js";
|
|
20
20
|
import {
|
|
21
21
|
View2
|
|
22
|
-
} from "./Accordion-
|
|
22
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
23
23
|
import {
|
|
24
24
|
Text3
|
|
25
25
|
} from "./Accordion-ew2cebyd.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./Accordion-be2yhfqz.js";
|
|
8
8
|
import {
|
|
9
9
|
View3
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-kpk964z0.js";
|
|
11
11
|
import {
|
|
12
12
|
useTheme
|
|
13
13
|
} from "./Accordion-tpd1vvy9.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./Accordion-waxb6x73.js";
|
|
17
17
|
import {
|
|
18
18
|
Surface3
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-rcff84ws.js";
|
|
20
20
|
import {
|
|
21
21
|
Text2
|
|
22
22
|
} from "./Accordion-8vcs6nz6.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "./Accordion-9hcbf56f.js";
|
|
29
29
|
import {
|
|
30
30
|
View2
|
|
31
|
-
} from "./Accordion-
|
|
31
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
32
32
|
import {
|
|
33
33
|
resolveIconSize
|
|
34
34
|
} from "./Accordion-961ncx4e.js";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./Accordion-tpd1vvy9.js";
|
|
10
10
|
import {
|
|
11
11
|
Pressable
|
|
12
|
-
} from "./Accordion-
|
|
12
|
+
} from "./Accordion-6tesp7jr.js";
|
|
13
13
|
import {
|
|
14
14
|
withZoraThemeScope
|
|
15
15
|
} from "./Accordion-mrhkw8n6.js";
|
|
16
16
|
import {
|
|
17
17
|
View2
|
|
18
|
-
} from "./Accordion-
|
|
18
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
19
19
|
import {
|
|
20
20
|
Text3
|
|
21
21
|
} from "./Accordion-ew2cebyd.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
Path,
|
|
27
27
|
Polygon,
|
|
28
28
|
Svg
|
|
29
|
-
} from "./Accordion-
|
|
29
|
+
} from "./Accordion-0pm8dvcy.js";
|
|
30
30
|
import {
|
|
31
31
|
TextInput3
|
|
32
32
|
} from "./Accordion-001ymezm.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
TabList2,
|
|
36
36
|
TabPanel2,
|
|
37
37
|
Tabs2
|
|
38
|
-
} from "./Accordion-
|
|
38
|
+
} from "./Accordion-5f9e10c6.js";
|
|
39
39
|
|
|
40
40
|
// src/features/color/ColorHueScale.tsx
|
|
41
41
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
} from "./Accordion-tpd1vvy9.js";
|
|
5
5
|
import {
|
|
6
6
|
Pressable
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-6tesp7jr.js";
|
|
8
8
|
import {
|
|
9
9
|
Surface3
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-rcff84ws.js";
|
|
11
11
|
import {
|
|
12
12
|
withZoraThemeScope
|
|
13
13
|
} from "./Accordion-mrhkw8n6.js";
|
|
14
14
|
import {
|
|
15
15
|
View2,
|
|
16
16
|
Divider2
|
|
17
|
-
} from "./Accordion-
|
|
17
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
18
18
|
import {
|
|
19
19
|
Heading2,
|
|
20
20
|
Text3
|
|
@@ -22,19 +22,19 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
resolveBadgeRecipe,
|
|
24
24
|
Badge2
|
|
25
|
-
} from "./Accordion-
|
|
25
|
+
} from "./Accordion-n29svm40.js";
|
|
26
26
|
import {
|
|
27
27
|
Icon2
|
|
28
28
|
} from "./Accordion-9hcbf56f.js";
|
|
29
29
|
import {
|
|
30
30
|
Avatar2
|
|
31
|
-
} from "./Accordion-
|
|
31
|
+
} from "./Accordion-0pryvztw.js";
|
|
32
32
|
import {
|
|
33
33
|
Button2
|
|
34
|
-
} from "./Accordion-
|
|
34
|
+
} from "./Accordion-qzx53csd.js";
|
|
35
35
|
import {
|
|
36
36
|
Image2
|
|
37
|
-
} from "./Accordion-
|
|
37
|
+
} from "./Accordion-8xgdw6ry.js";
|
|
38
38
|
import {
|
|
39
39
|
resolveIconSize
|
|
40
40
|
} from "./Accordion-961ncx4e.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
View2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
5
5
|
import {
|
|
6
6
|
Text3
|
|
7
7
|
} from "./Accordion-ew2cebyd.js";
|
|
8
8
|
import {
|
|
9
9
|
Field3
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-wfrt39d2.js";
|
|
11
11
|
|
|
12
12
|
// src/features/picker/composition/PickerHeader.tsx
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -110,6 +110,7 @@ function resolveDimensionStyles(theme, breakpoint, props) {
|
|
|
110
110
|
}
|
|
111
111
|
function resolveLayoutStyles(theme, breakpoint, props) {
|
|
112
112
|
return {
|
|
113
|
+
display: "flex",
|
|
113
114
|
flex: resolveResponsive(props.flex, breakpoint),
|
|
114
115
|
flexGrow: resolveResponsive(props.flexGrow, breakpoint),
|
|
115
116
|
flexShrink: resolveResponsive(props.flexShrink, breakpoint),
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./Accordion-mrhkw8n6.js";
|
|
5
5
|
import {
|
|
6
6
|
View2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-d6f4vr6s.js";
|
|
8
8
|
import {
|
|
9
9
|
ButtonGroup2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-qzx53csd.js";
|
|
11
11
|
import {
|
|
12
12
|
Card2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-j09h3pg1.js";
|
|
14
14
|
import {
|
|
15
15
|
List2
|
|
16
|
-
} from "./Accordion-
|
|
16
|
+
} from "./Accordion-q1vqpaw6.js";
|
|
17
17
|
import {
|
|
18
18
|
useZoraTheme2
|
|
19
19
|
} from "./Accordion-gysa24fk.js";
|