@particle-academy/react-fancy 2.9.0 → 2.10.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.
- package/dist/index.cjs +752 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -3
- package/dist/index.d.ts +27 -3
- package/dist/index.js +752 -104
- package/dist/index.js.map +1 -1
- package/docs/Diagram.md +34 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2333,7 +2333,13 @@ declare const Canvas: typeof CanvasRoot & {
|
|
|
2333
2333
|
declare function useCanvas(): CanvasContextValue;
|
|
2334
2334
|
|
|
2335
2335
|
type DiagramType = "erd" | "flowchart" | "general";
|
|
2336
|
-
|
|
2336
|
+
/** ERD/UML shorthand — sets fromMarker/toMarker (and lineStyle for some). */
|
|
2337
|
+
type RelationType = "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many" | "association" | "aggregation" | "composition" | "inheritance" | "implementation" | "dependency" | "custom";
|
|
2338
|
+
/** Shape painted at each line endpoint. Strings prefixed `emoji:` render the
|
|
2339
|
+
* rest of the string as text at the endpoint (e.g. `emoji:🎯`). */
|
|
2340
|
+
type MarkerType = "none" | "arrow" | "arrow-open" | "circle" | "circle-open" | "square" | "square-open" | "diamond" | "diamond-open" | "triangle" | "triangle-open" | "one" | "many" | "optional-one" | "optional-many" | "cross" | (string & {});
|
|
2341
|
+
type LineStyle = "solid" | "dashed" | "dotted";
|
|
2342
|
+
type RoutingMode = "manhattan" | "bezier" | "straight";
|
|
2337
2343
|
type ExportFormat = "erd" | "uml" | "dfd";
|
|
2338
2344
|
interface DiagramFieldData {
|
|
2339
2345
|
name: string;
|
|
@@ -2358,6 +2364,11 @@ interface DiagramRelationData {
|
|
|
2358
2364
|
fromField?: string;
|
|
2359
2365
|
toField?: string;
|
|
2360
2366
|
type: RelationType;
|
|
2367
|
+
fromMarker?: MarkerType;
|
|
2368
|
+
toMarker?: MarkerType;
|
|
2369
|
+
lineStyle?: LineStyle;
|
|
2370
|
+
routing?: RoutingMode;
|
|
2371
|
+
color?: string;
|
|
2361
2372
|
label?: string;
|
|
2362
2373
|
}
|
|
2363
2374
|
interface DiagramSchema {
|
|
@@ -2413,7 +2424,20 @@ interface DiagramRelationProps {
|
|
|
2413
2424
|
to: string;
|
|
2414
2425
|
fromField?: string;
|
|
2415
2426
|
toField?: string;
|
|
2416
|
-
|
|
2427
|
+
/** ERD/UML shorthand. Provides defaults for fromMarker/toMarker/lineStyle. */
|
|
2428
|
+
type?: RelationType;
|
|
2429
|
+
/** Override start endpoint marker. */
|
|
2430
|
+
fromMarker?: MarkerType;
|
|
2431
|
+
/** Override end endpoint marker. */
|
|
2432
|
+
toMarker?: MarkerType;
|
|
2433
|
+
/** Line style — solid (default), dashed, dotted. */
|
|
2434
|
+
lineStyle?: LineStyle;
|
|
2435
|
+
/** Routing algorithm — manhattan (default), bezier, straight. */
|
|
2436
|
+
routing?: RoutingMode;
|
|
2437
|
+
/** Stroke color. Defaults to a zinc gray. */
|
|
2438
|
+
color?: string;
|
|
2439
|
+
/** Stroke width. Default 2. */
|
|
2440
|
+
strokeWidth?: number;
|
|
2417
2441
|
label?: string;
|
|
2418
2442
|
className?: string;
|
|
2419
2443
|
}
|
|
@@ -2431,7 +2455,7 @@ declare namespace DiagramField {
|
|
|
2431
2455
|
var displayName: string;
|
|
2432
2456
|
}
|
|
2433
2457
|
|
|
2434
|
-
declare function DiagramRelation({ from, to, fromField: fromFieldProp, toField: toFieldProp, type, label, }: DiagramRelationProps): react_jsx_runtime.JSX.Element | null;
|
|
2458
|
+
declare function DiagramRelation({ from, to, fromField: fromFieldProp, toField: toFieldProp, type, fromMarker: fromMarkerProp, toMarker: toMarkerProp, lineStyle: lineStyleProp, routing, color, strokeWidth, label, }: DiagramRelationProps): react_jsx_runtime.JSX.Element | null;
|
|
2435
2459
|
declare namespace DiagramRelation {
|
|
2436
2460
|
var _isCanvasEdge: boolean;
|
|
2437
2461
|
var displayName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2333,7 +2333,13 @@ declare const Canvas: typeof CanvasRoot & {
|
|
|
2333
2333
|
declare function useCanvas(): CanvasContextValue;
|
|
2334
2334
|
|
|
2335
2335
|
type DiagramType = "erd" | "flowchart" | "general";
|
|
2336
|
-
|
|
2336
|
+
/** ERD/UML shorthand — sets fromMarker/toMarker (and lineStyle for some). */
|
|
2337
|
+
type RelationType = "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many" | "association" | "aggregation" | "composition" | "inheritance" | "implementation" | "dependency" | "custom";
|
|
2338
|
+
/** Shape painted at each line endpoint. Strings prefixed `emoji:` render the
|
|
2339
|
+
* rest of the string as text at the endpoint (e.g. `emoji:🎯`). */
|
|
2340
|
+
type MarkerType = "none" | "arrow" | "arrow-open" | "circle" | "circle-open" | "square" | "square-open" | "diamond" | "diamond-open" | "triangle" | "triangle-open" | "one" | "many" | "optional-one" | "optional-many" | "cross" | (string & {});
|
|
2341
|
+
type LineStyle = "solid" | "dashed" | "dotted";
|
|
2342
|
+
type RoutingMode = "manhattan" | "bezier" | "straight";
|
|
2337
2343
|
type ExportFormat = "erd" | "uml" | "dfd";
|
|
2338
2344
|
interface DiagramFieldData {
|
|
2339
2345
|
name: string;
|
|
@@ -2358,6 +2364,11 @@ interface DiagramRelationData {
|
|
|
2358
2364
|
fromField?: string;
|
|
2359
2365
|
toField?: string;
|
|
2360
2366
|
type: RelationType;
|
|
2367
|
+
fromMarker?: MarkerType;
|
|
2368
|
+
toMarker?: MarkerType;
|
|
2369
|
+
lineStyle?: LineStyle;
|
|
2370
|
+
routing?: RoutingMode;
|
|
2371
|
+
color?: string;
|
|
2361
2372
|
label?: string;
|
|
2362
2373
|
}
|
|
2363
2374
|
interface DiagramSchema {
|
|
@@ -2413,7 +2424,20 @@ interface DiagramRelationProps {
|
|
|
2413
2424
|
to: string;
|
|
2414
2425
|
fromField?: string;
|
|
2415
2426
|
toField?: string;
|
|
2416
|
-
|
|
2427
|
+
/** ERD/UML shorthand. Provides defaults for fromMarker/toMarker/lineStyle. */
|
|
2428
|
+
type?: RelationType;
|
|
2429
|
+
/** Override start endpoint marker. */
|
|
2430
|
+
fromMarker?: MarkerType;
|
|
2431
|
+
/** Override end endpoint marker. */
|
|
2432
|
+
toMarker?: MarkerType;
|
|
2433
|
+
/** Line style — solid (default), dashed, dotted. */
|
|
2434
|
+
lineStyle?: LineStyle;
|
|
2435
|
+
/** Routing algorithm — manhattan (default), bezier, straight. */
|
|
2436
|
+
routing?: RoutingMode;
|
|
2437
|
+
/** Stroke color. Defaults to a zinc gray. */
|
|
2438
|
+
color?: string;
|
|
2439
|
+
/** Stroke width. Default 2. */
|
|
2440
|
+
strokeWidth?: number;
|
|
2417
2441
|
label?: string;
|
|
2418
2442
|
className?: string;
|
|
2419
2443
|
}
|
|
@@ -2431,7 +2455,7 @@ declare namespace DiagramField {
|
|
|
2431
2455
|
var displayName: string;
|
|
2432
2456
|
}
|
|
2433
2457
|
|
|
2434
|
-
declare function DiagramRelation({ from, to, fromField: fromFieldProp, toField: toFieldProp, type, label, }: DiagramRelationProps): react_jsx_runtime.JSX.Element | null;
|
|
2458
|
+
declare function DiagramRelation({ from, to, fromField: fromFieldProp, toField: toFieldProp, type, fromMarker: fromMarkerProp, toMarker: toMarkerProp, lineStyle: lineStyleProp, routing, color, strokeWidth, label, }: DiagramRelationProps): react_jsx_runtime.JSX.Element | null;
|
|
2435
2459
|
declare namespace DiagramRelation {
|
|
2436
2460
|
var _isCanvasEdge: boolean;
|
|
2437
2461
|
var displayName: string;
|