@toolpath/dfm 0.2.1 → 0.3.1
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/README.md +4 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +10 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -77,6 +77,10 @@ lower-cased feature tag; `regionAreas` is each face's area by region index.
|
|
|
77
77
|
Put `ruleListKeys` on the panel that holds the list, so the arrow keys walk the
|
|
78
78
|
rules from anywhere in it.
|
|
79
79
|
|
|
80
|
+
`actions` puts the app's own buttons at the end of the footer's row, after
|
|
81
|
+
Import…, Export and Copy LLM prompt — a way back to the app's default rules,
|
|
82
|
+
say, since the package has none of its own.
|
|
83
|
+
|
|
80
84
|
## Reach chart
|
|
81
85
|
|
|
82
86
|
`ReachChart` draws a feature's reach curve: the section through the part at the
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { FC, KeyboardEvent, Ref, ComponentType,
|
|
2
|
+
import { ReactNode, FC, KeyboardEvent, Ref, ComponentType, ReactElement, HTMLAttributes } from 'react';
|
|
3
3
|
import { D as DfmRule, a as DfmCheck, b as DfmFeature, F as FeatureSheets, U as Units, R as ReachCurve, c as FeatureProfile, B as BrokenRule, M as Measurement, d as FeatureRecord } from './feature-record-BUoFFjN6.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -32,6 +32,11 @@ interface RuleListProps {
|
|
|
32
32
|
selectedGroup: readonly string[] | null;
|
|
33
33
|
onInspect: (tag: string, group?: readonly string[]) => void;
|
|
34
34
|
onHover: (hovered: Hovered) => void;
|
|
35
|
+
/**
|
|
36
|
+
* At the end of the footer's row, after Copy LLM prompt: the app's own
|
|
37
|
+
* buttons — a way back to its default rules, say.
|
|
38
|
+
*/
|
|
39
|
+
actions?: ReactNode;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
/**
|
package/dist/index.js
CHANGED
|
@@ -961,7 +961,10 @@ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
|
961
961
|
var NOTE_MS = 4e3;
|
|
962
962
|
var COPIED_MS = 2e3;
|
|
963
963
|
var EXPORT_FILE_NAME = "dfm-rules.json";
|
|
964
|
-
var RuleSetActions = ({
|
|
964
|
+
var RuleSetActions = ({
|
|
965
|
+
rules,
|
|
966
|
+
actions
|
|
967
|
+
}) => {
|
|
965
968
|
const [note, setNote] = useTimedValue(NOTE_MS);
|
|
966
969
|
const [copied, setCopied] = useTimedValue(COPIED_MS);
|
|
967
970
|
const fileInput = useRef4(null);
|
|
@@ -1008,6 +1011,7 @@ var RuleSetActions = ({ rules }) => {
|
|
|
1008
1011
|
] })
|
|
1009
1012
|
}
|
|
1010
1013
|
),
|
|
1014
|
+
actions,
|
|
1011
1015
|
/* @__PURE__ */ jsx11(
|
|
1012
1016
|
"input",
|
|
1013
1017
|
{
|
|
@@ -1063,6 +1067,7 @@ var RuleList = ({
|
|
|
1063
1067
|
features,
|
|
1064
1068
|
sheets,
|
|
1065
1069
|
units,
|
|
1070
|
+
actions,
|
|
1066
1071
|
...list
|
|
1067
1072
|
}) => {
|
|
1068
1073
|
const [openIds, setOpenIds] = useState8(/* @__PURE__ */ new Set());
|
|
@@ -1118,7 +1123,7 @@ var RuleList = ({
|
|
|
1118
1123
|
}
|
|
1119
1124
|
)
|
|
1120
1125
|
] }),
|
|
1121
|
-
/* @__PURE__ */ jsx12(RuleSetActions, { rules })
|
|
1126
|
+
/* @__PURE__ */ jsx12(RuleSetActions, { rules, actions })
|
|
1122
1127
|
] })
|
|
1123
1128
|
);
|
|
1124
1129
|
};
|
|
@@ -2505,10 +2510,9 @@ import { IconButton as IconButton5, ScrollArea as ScrollArea2, cn as cn15 } from
|
|
|
2505
2510
|
import { Fragment as Fragment11, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2506
2511
|
var title = (faces, active, group) => {
|
|
2507
2512
|
if (faces.length > 1) return `Comparing ${faces.length} faces`;
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
return "Feature";
|
|
2513
|
+
const clicked = faces[active]?.region !== null && faces[active]?.region !== void 0;
|
|
2514
|
+
if (!clicked && group !== void 0) return `${group} identical holes`;
|
|
2515
|
+
return "Feature details";
|
|
2512
2516
|
};
|
|
2513
2517
|
var FeaturePanel = ({
|
|
2514
2518
|
faces,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolpath/dfm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Toolpath DFM rules: the rule list, the rules and the part checker, and the feature panel",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"tsup": "8.5.1",
|
|
65
65
|
"typescript": "5.9.3",
|
|
66
66
|
"vitest": "4.1.10",
|
|
67
|
-
"@toolpath/api": "^0.
|
|
67
|
+
"@toolpath/api": "^0.7.0",
|
|
68
68
|
"@toolpath/ui": "^1.0.0"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|