@terrafirmagreg-team/recipe 0.0.0-stage → 1.2.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/package.json +62 -3
- package/src/components/button-copy.tsx +43 -0
- package/src/components/cards/card/index.tsx +214 -0
- package/src/components/cards/card/scene.tsx +107 -0
- package/src/components/cards/card/strip.tsx +198 -0
- package/src/components/cards/card/text.tsx +46 -0
- package/src/components/cards/card/tips.tsx +63 -0
- package/src/components/cards/default-item.tsx +47 -0
- package/src/components/cards/glare-filter.tsx +29 -0
- package/src/components/cards/paged-card.tsx +222 -0
- package/src/components/cards/slot-hitbox.tsx +213 -0
- package/src/components/cards/strip-card/buttons.tsx +106 -0
- package/src/components/cards/strip-card/index.tsx +214 -0
- package/src/components/cards/strip-card/member-cell.tsx +167 -0
- package/src/components/cards/strip-card/sprite.tsx +36 -0
- package/src/components/embed-card.tsx +44 -0
- package/src/components/mdx/recipe.tsx +129 -0
- package/src/components/tool-list.tsx +49 -0
- package/src/components/tree.tsx +98 -0
- package/src/components/views/alloy/index.tsx +112 -0
- package/src/components/views/alloy/list.tsx +85 -0
- package/src/components/views/alloy/mix/index.tsx +35 -0
- package/src/components/views/alloy/mix/ratio.tsx +94 -0
- package/src/components/views/alloy/mix/rows.tsx +145 -0
- package/src/components/views/alloy/mix/status.tsx +122 -0
- package/src/components/views/alloy/mix/total.tsx +132 -0
- package/src/components/views/alloy/range-bar.tsx +65 -0
- package/src/components/views/alloy/stack-bar.tsx +88 -0
- package/src/components/views/browser/axis-switcher.tsx +54 -0
- package/src/components/views/browser/card-grid.tsx +275 -0
- package/src/components/views/browser/favorite-button.tsx +46 -0
- package/src/components/views/browser/frame.tsx +112 -0
- package/src/components/views/browser/index.tsx +114 -0
- package/src/components/views/browser/item-panel/index.tsx +229 -0
- package/src/components/views/browser/item-panel/skeleton.tsx +26 -0
- package/src/components/views/browser/item-panel-grid/cell.tsx +178 -0
- package/src/components/views/browser/item-panel-grid/favorite-cell.tsx +129 -0
- package/src/components/views/browser/item-panel-grid/index.tsx +105 -0
- package/src/components/views/browser/item-view/index.tsx +186 -0
- package/src/components/views/browser/item-view/tags.tsx +85 -0
- package/src/components/views/browser/item-view-header.tsx +131 -0
- package/src/components/views/browser/pane-tabs.tsx +61 -0
- package/src/components/views/browser/place-header.tsx +72 -0
- package/src/components/views/browser/query-controls.tsx +105 -0
- package/src/components/views/browser/recipe-item-header.tsx +60 -0
- package/src/components/views/browser/settings.tsx +52 -0
- package/src/components/views/browser/toolbar.tsx +54 -0
- package/src/components/views/browser/type-tabs.tsx +71 -0
- package/src/components/views/browser/type-view.tsx +184 -0
- package/src/components/views/browser/workstation-rail.tsx +43 -0
- package/src/components/views/calc/calculator/actions.tsx +47 -0
- package/src/components/views/calc/calculator/help.tsx +189 -0
- package/src/components/views/calc/calculator/index.tsx +172 -0
- package/src/components/views/calc/dot-overlay.tsx +80 -0
- package/src/components/views/calc/edge.tsx +152 -0
- package/src/components/views/calc/flow/index.tsx +305 -0
- package/src/components/views/calc/flow/picker-dialogs.tsx +146 -0
- package/src/components/views/calc/flow/toolbar.tsx +60 -0
- package/src/components/views/calc/flow/view-menu.tsx +117 -0
- package/src/components/views/calc/member-picker.tsx +120 -0
- package/src/components/views/calc/node-card/actions.tsx +90 -0
- package/src/components/views/calc/node-card/badges.tsx +59 -0
- package/src/components/views/calc/node-card/chips.tsx +187 -0
- package/src/components/views/calc/node-card/far.tsx +123 -0
- package/src/components/views/calc/node-card/full.tsx +332 -0
- package/src/components/views/calc/node-card/index.tsx +27 -0
- package/src/components/views/calc/node-card/menu.tsx +282 -0
- package/src/components/views/calc/node-card/port-cells.tsx +186 -0
- package/src/components/views/calc/node-card/port-rails.tsx +251 -0
- package/src/components/views/calc/node-card/ports.tsx +86 -0
- package/src/components/views/calc/recipe-picker/body.tsx +207 -0
- package/src/components/views/calc/recipe-picker/footer.tsx +131 -0
- package/src/components/views/calc/recipe-picker/index.tsx +52 -0
- package/src/components/views/calc/sidebar.tsx +171 -0
- package/src/components/views/calc/trees/icon-picker.tsx +97 -0
- package/src/components/views/calc/trees/index.tsx +134 -0
- package/src/components/views/calc/trees/label.tsx +67 -0
- package/src/components/views/calc/trees/rows.tsx +140 -0
- package/src/components/views/forge/gui.tsx +131 -0
- package/src/components/views/forge/index.tsx +112 -0
- package/src/components/views/forge/list.tsx +113 -0
- package/src/components/views/forge/workbench/controls.tsx +103 -0
- package/src/components/views/forge/workbench/index.tsx +85 -0
- package/src/components/views/forge/workbench/panel.tsx +228 -0
- package/src/components/views/forge/workbench/ruler.tsx +133 -0
- package/src/components/views/forge/workbench/status.tsx +55 -0
- package/src/components/views/forge/workbench/tape.tsx +70 -0
- package/src/hooks/alloy/use-fluid-colors.ts +125 -0
- package/src/hooks/alloy/use-mix-state.ts +240 -0
- package/src/hooks/calc/flow/use-engage.ts +129 -0
- package/src/hooks/calc/flow/use-handlers.ts +192 -0
- package/src/hooks/calc/flow/use-layout.ts +105 -0
- package/src/hooks/calc/flow/use-mount.ts +97 -0
- package/src/hooks/calc/flow/use-nodes.ts +260 -0
- package/src/hooks/calc/flow/use-pickers.ts +57 -0
- package/src/hooks/calc/flow/use-viewport.ts +141 -0
- package/src/hooks/calc/flow/use-window.ts +87 -0
- package/src/hooks/calc/use-actions.ts +355 -0
- package/src/hooks/calc/use-amounts.ts +64 -0
- package/src/hooks/calc/use-data.ts +203 -0
- package/src/hooks/calc/use-defaults.ts +40 -0
- package/src/hooks/calc/use-far-mode.ts +37 -0
- package/src/hooks/calc/use-focus.ts +31 -0
- package/src/hooks/calc/use-maps.ts +76 -0
- package/src/hooks/calc/use-reset.ts +15 -0
- package/src/hooks/calc/use-resolver.ts +70 -0
- package/src/hooks/calc/use-session.ts +13 -0
- package/src/hooks/calc/use-share.ts +64 -0
- package/src/hooks/calc/use-storage.ts +126 -0
- package/src/hooks/calc/use-tier.ts +13 -0
- package/src/hooks/calc/use-view-mode.ts +24 -0
- package/src/hooks/calc/use-worker.ts +204 -0
- package/src/hooks/forge/use-anvil-gui.ts +16 -0
- package/src/hooks/forge/use-forge-state.ts +135 -0
- package/src/hooks/forge/use-ruler.ts +100 -0
- package/src/hooks/use-add-to-calc.ts +51 -0
- package/src/hooks/use-categories-by-id.ts +18 -0
- package/src/hooks/use-favorite-hotkey.ts +39 -0
- package/src/hooks/use-favorites.ts +135 -0
- package/src/hooks/use-group-outlines.ts +65 -0
- package/src/hooks/use-hide-unused.ts +12 -0
- package/src/hooks/use-index.ts +72 -0
- package/src/hooks/use-item-feeds.ts +46 -0
- package/src/hooks/use-item-pane.ts +106 -0
- package/src/hooks/use-item-press.ts +89 -0
- package/src/hooks/use-item-tag-groups.ts +54 -0
- package/src/hooks/use-item-tooltips.ts +18 -0
- package/src/hooks/use-left-sidebar-tree.ts +34 -0
- package/src/hooks/use-mod-names.ts +17 -0
- package/src/hooks/use-mount-limit.ts +22 -0
- package/src/hooks/use-panel-cells.ts +117 -0
- package/src/hooks/use-panel-page.ts +54 -0
- package/src/hooks/use-panel-tabs.ts +43 -0
- package/src/hooks/use-query.ts +186 -0
- package/src/hooks/use-session.ts +88 -0
- package/src/hooks/use-sidebar-group.ts +16 -0
- package/src/hooks/use-tag-members.ts +16 -0
- package/src/hooks/use-tool-recipes.ts +26 -0
- package/src/hooks/use-type-filter.ts +73 -0
- package/src/lib/alloy/mix.ts +210 -0
- package/src/lib/alloy/parse.ts +37 -0
- package/src/lib/calc/defaults.ts +47 -0
- package/src/lib/calc/flow.ts +315 -0
- package/src/lib/calc/focus.ts +15 -0
- package/src/lib/calc/meta.ts +17 -0
- package/src/lib/calc/pack.ts +77 -0
- package/src/lib/calc/ports.ts +43 -0
- package/src/lib/calc/resolve.ts +198 -0
- package/src/lib/calc/route/buckets.ts +49 -0
- package/src/lib/calc/route/geometry.ts +51 -0
- package/src/lib/calc/route/index.ts +3 -0
- package/src/lib/calc/route/polyline.ts +103 -0
- package/src/lib/calc/route/router.ts +394 -0
- package/src/lib/calc/scheme.ts +226 -0
- package/src/lib/calc/storage/entry.ts +97 -0
- package/src/lib/calc/storage/index.ts +20 -0
- package/src/lib/calc/storage/keys.ts +38 -0
- package/src/lib/calc/storage/store.ts +198 -0
- package/src/lib/calc/tree/index.ts +4 -0
- package/src/lib/calc/tree/materials.ts +29 -0
- package/src/lib/calc/tree/recipe.ts +104 -0
- package/src/lib/calc/tree/share.ts +135 -0
- package/src/lib/calc/worker/api.ts +25 -0
- package/src/lib/calc/worker/fetch.ts +66 -0
- package/src/lib/calc/worker/flush.ts +39 -0
- package/src/lib/calc/worker/index.ts +8 -0
- package/src/lib/calc/worker/protocol.ts +35 -0
- package/src/lib/calc/worker/resolve.ts +49 -0
- package/src/lib/calc/worker/state.ts +48 -0
- package/src/lib/card-model.ts +65 -0
- package/src/lib/client/recipe-categories.ts +14 -0
- package/src/lib/client/recipe.ts +85 -0
- package/src/lib/client-index/catalog.ts +91 -0
- package/src/lib/client-index/chrome.ts +180 -0
- package/src/lib/client-index/index.ts +20 -0
- package/src/lib/client-index/registry.ts +121 -0
- package/src/lib/client-index/rows.ts +260 -0
- package/src/lib/client-index/tooltips.ts +74 -0
- package/src/lib/config.ts +18 -0
- package/src/lib/data/category/dto.ts +25 -0
- package/src/lib/data/category/load.ts +47 -0
- package/src/lib/data/category/parse.ts +71 -0
- package/src/lib/data/dto.ts +152 -0
- package/src/lib/data/grid.ts +40 -0
- package/src/lib/data/parse/entry.ts +85 -0
- package/src/lib/data/parse/index.ts +3 -0
- package/src/lib/data/parse/layout.ts +138 -0
- package/src/lib/data/parse/slots.ts +85 -0
- package/src/lib/data/parse/widgets.ts +81 -0
- package/src/lib/data/scene.ts +103 -0
- package/src/lib/data/slot-io.ts +44 -0
- package/src/lib/dump.ts +6 -0
- package/src/lib/embed.ts +22 -0
- package/src/lib/favorite-hover.ts +13 -0
- package/src/lib/fluid-outputs.ts +70 -0
- package/src/lib/forge/actions.ts +59 -0
- package/src/lib/forge/data.ts +51 -0
- package/src/lib/forge/solve.ts +80 -0
- package/src/lib/group.ts +23 -0
- package/src/lib/index-store.ts +70 -0
- package/src/lib/links.ts +131 -0
- package/src/lib/lookup.ts +119 -0
- package/src/lib/panel-outline.ts +86 -0
- package/src/lib/panel.ts +105 -0
- package/src/lib/preview.ts +32 -0
- package/src/lib/recipe-slots.ts +8 -0
- package/src/lib/search.ts +139 -0
- package/src/lib/sidebar.ts +47 -0
- package/src/lib/used-items.ts +25 -0
- package/src/locales/en_us.json +172 -0
- package/src/locales/ru_ru.json +172 -0
- package/src/locales.ts +6 -0
- package/src/types/alloy.ts +20 -0
- package/src/types/calc-flow-props.ts +44 -0
- package/src/types/calc.ts +92 -0
- package/src/types/forge.ts +21 -0
- package/src/types/index.ts +136 -0
- package/styles/calc.css +308 -0
- package/styles/strip.css +7 -0
- package/styles.css +2 -0
- package/README.md +0 -3
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { DatasetRef } from '@terrafirmagreg-team/sites/location';
|
|
2
|
+
import type { Lang } from '@terrafirmagreg-team/translate/types/locale';
|
|
3
|
+
import type { DatasetLanding } from '@terrafirmagreg-team/kit/types';
|
|
4
|
+
import type { DumpCreativeTab } from '@terrafirmagreg-team/dump/lib/dump/data/tab/dto';
|
|
5
|
+
import type { DumpRecipeCategory } from '@terrafirmagreg-team/recipe/lib/data/category/dto';
|
|
6
|
+
import type { Recipe } from '@terrafirmagreg-team/recipe/lib/data/dto';
|
|
7
|
+
|
|
8
|
+
export type { Recipe };
|
|
9
|
+
|
|
10
|
+
export type RecipeCategory = DumpRecipeCategory;
|
|
11
|
+
|
|
12
|
+
export type RecipeTool = 'calc' | 'forge' | 'alloy';
|
|
13
|
+
|
|
14
|
+
export type RecipePlace = { kind: 'type'; id: string } | { kind: RecipeTool };
|
|
15
|
+
|
|
16
|
+
export type RecipeRelation = 'uses' | 'tags';
|
|
17
|
+
|
|
18
|
+
export type RecipeHrefOpts = {
|
|
19
|
+
item?: string;
|
|
20
|
+
fluid?: string;
|
|
21
|
+
id?: string;
|
|
22
|
+
solo?: string;
|
|
23
|
+
tab?: string;
|
|
24
|
+
search?: string;
|
|
25
|
+
rpage?: number;
|
|
26
|
+
type?: string;
|
|
27
|
+
relation?: RecipeRelation;
|
|
28
|
+
tool?: RecipeTool;
|
|
29
|
+
|
|
30
|
+
unit?: 'mb' | 'ingot';
|
|
31
|
+
|
|
32
|
+
mix?: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type RecipeStackGroup = {
|
|
36
|
+
id: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
members: string[];
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type RecipeFavorite = { id: string; type: string; icon?: string };
|
|
42
|
+
|
|
43
|
+
export type FavoriteEntry =
|
|
44
|
+
| { kind: 'stack'; id: string; ref?: 'item' | 'fluid' }
|
|
45
|
+
| ({ kind: 'recipe' } & RecipeFavorite);
|
|
46
|
+
|
|
47
|
+
export type ItemPanelCell =
|
|
48
|
+
| { kind: 'stack'; id: string; ref?: 'item' | 'fluid'; groupId?: string }
|
|
49
|
+
| {
|
|
50
|
+
kind: 'group';
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
members: string[];
|
|
54
|
+
expanded: boolean;
|
|
55
|
+
}
|
|
56
|
+
| { kind: 'recipe'; fav: RecipeFavorite };
|
|
57
|
+
|
|
58
|
+
export type RecipeCompactIndex = {
|
|
59
|
+
types: string[];
|
|
60
|
+
typeCounts?: Record<string, number>;
|
|
61
|
+
items: string[];
|
|
62
|
+
fluids?: string[];
|
|
63
|
+
usedIds?: string[];
|
|
64
|
+
groups?: RecipeStackGroup[];
|
|
65
|
+
names: Record<string, Record<string, string>>;
|
|
66
|
+
tabs?: DumpCreativeTab[];
|
|
67
|
+
tabItems?: Record<string, string[]>;
|
|
68
|
+
mods?: Record<string, string>;
|
|
69
|
+
categories?: DumpRecipeCategory[];
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type RecipeCompactRow = {
|
|
73
|
+
id: string;
|
|
74
|
+
type: number;
|
|
75
|
+
|
|
76
|
+
cat?: string;
|
|
77
|
+
o?: number;
|
|
78
|
+
in: string[];
|
|
79
|
+
out: string[];
|
|
80
|
+
bodyUrl?: string;
|
|
81
|
+
image?: string;
|
|
82
|
+
bucket?: string;
|
|
83
|
+
d?: { w: number; h: number };
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export type UsedItems = {
|
|
87
|
+
ids: Set<string>;
|
|
88
|
+
bases: Set<string>;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type RecipeSidebarGroup = 'flat' | 'mod';
|
|
92
|
+
|
|
93
|
+
export type RecipePageData = DatasetLanding;
|
|
94
|
+
|
|
95
|
+
export type RecipeChrome = Pick<
|
|
96
|
+
RecipeCompactIndex,
|
|
97
|
+
| 'items'
|
|
98
|
+
| 'fluids'
|
|
99
|
+
| 'tabs'
|
|
100
|
+
| 'tabItems'
|
|
101
|
+
| 'categories'
|
|
102
|
+
| 'names'
|
|
103
|
+
| 'mods'
|
|
104
|
+
| 'groups'
|
|
105
|
+
| 'usedIds'
|
|
106
|
+
>;
|
|
107
|
+
|
|
108
|
+
export type CategoryGroup = { category: string; rows: RecipeCompactRow[] };
|
|
109
|
+
|
|
110
|
+
export type RecipeSession = {
|
|
111
|
+
page: RecipePageData;
|
|
112
|
+
dataset: DatasetRef;
|
|
113
|
+
lang: Lang;
|
|
114
|
+
place?: RecipePlace;
|
|
115
|
+
placeOpts: Pick<RecipeHrefOpts, 'type' | 'tool'>;
|
|
116
|
+
item?: string;
|
|
117
|
+
fluid?: string;
|
|
118
|
+
recipeId?: string;
|
|
119
|
+
|
|
120
|
+
alloyUnit?: 'mb' | 'ingot';
|
|
121
|
+
alloyMix?: string;
|
|
122
|
+
solo?: string;
|
|
123
|
+
relation?: RecipeRelation;
|
|
124
|
+
tab?: string;
|
|
125
|
+
tree?: string;
|
|
126
|
+
query: string;
|
|
127
|
+
setQuery: (query: string) => void;
|
|
128
|
+
rpage: number;
|
|
129
|
+
nav: RecipeHrefOpts;
|
|
130
|
+
index: RecipeCompactIndex | null;
|
|
131
|
+
indexLoading: boolean;
|
|
132
|
+
names: Record<string, Record<string, string>>;
|
|
133
|
+
langMap: Record<string, string>;
|
|
134
|
+
used: UsedItems;
|
|
135
|
+
};
|
|
136
|
+
|
package/styles/calc.css
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
.calc-edge--link .chevron-edge__base {
|
|
2
|
+
stroke-dasharray: 5 4;
|
|
3
|
+
stroke: color-mix(
|
|
4
|
+
in oklab,
|
|
5
|
+
var(--color-primary) 65%,
|
|
6
|
+
var(--color-muted-foreground)
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.calc-flow .react-flow__node {
|
|
11
|
+
cursor: default;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.calc-flow .react-flow__node.dragging {
|
|
15
|
+
cursor: grabbing;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.calc-rail {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 2px;
|
|
21
|
+
bottom: 2px;
|
|
22
|
+
z-index: 25;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
flex-wrap: nowrap;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
gap: 2px;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
width: 20px;
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.calc-rail .calc-port {
|
|
34
|
+
pointer-events: auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.calc-rail--in {
|
|
38
|
+
right: calc(100% - 10px);
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.calc-rail--out {
|
|
43
|
+
left: calc(100% - 10px);
|
|
44
|
+
align-items: flex-end;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.calc-port {
|
|
48
|
+
position: absolute;
|
|
49
|
+
display: grid;
|
|
50
|
+
width: 20px;
|
|
51
|
+
height: 20px;
|
|
52
|
+
place-items: center;
|
|
53
|
+
border-radius: 3px;
|
|
54
|
+
border: 1px solid;
|
|
55
|
+
background: var(--color-card);
|
|
56
|
+
padding: 0;
|
|
57
|
+
z-index: 25;
|
|
58
|
+
cursor: default;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.calc-rail .calc-port {
|
|
62
|
+
position: relative;
|
|
63
|
+
flex: none;
|
|
64
|
+
inset: auto;
|
|
65
|
+
transform: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.calc-port--ghost {
|
|
69
|
+
opacity: 0;
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
border-color: transparent;
|
|
72
|
+
background: transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.calc-port-inner {
|
|
76
|
+
position: relative;
|
|
77
|
+
display: grid;
|
|
78
|
+
place-items: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.calc-port.connectionindicator {
|
|
82
|
+
cursor: default;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.calc-port--in.connectionindicator {
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.calc-port--out.connectionindicator {
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.calc-port--out {
|
|
94
|
+
border-color: var(--color-red-400, #f87171);
|
|
95
|
+
background: color-mix(in oklab, var(--color-red-400, #f87171) 14%, var(--color-card));
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.calc-port--out:hover,
|
|
100
|
+
.calc-port--out.connectablestart {
|
|
101
|
+
background: color-mix(in oklab, var(--color-red-400, #f87171) 30%, var(--color-card));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.calc-port--over {
|
|
105
|
+
border-color: var(--color-red-500, #ef4444);
|
|
106
|
+
box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--color-red-500, #ef4444) 55%, transparent);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.calc-port--in {
|
|
110
|
+
border-color: var(--color-emerald-500, #10b981);
|
|
111
|
+
background: color-mix(in oklab, var(--color-emerald-500, #10b981) 10%, var(--color-card));
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.calc-port--in:hover,
|
|
116
|
+
.calc-port--in.connectableend:hover {
|
|
117
|
+
background: color-mix(in oklab, var(--color-emerald-500, #10b981) 28%, var(--color-card));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.calc-port--open {
|
|
121
|
+
border-style: dashed;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.calc-port--open .calc-port-inner {
|
|
125
|
+
opacity: 0.55;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.calc-port--partial {
|
|
129
|
+
border-color: var(--color-amber-400, #fbbf24);
|
|
130
|
+
background: color-mix(in oklab, var(--color-amber-400, #fbbf24) 12%, var(--color-card));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.calc-port--full {
|
|
134
|
+
border-color: var(--color-emerald-500, #10b981);
|
|
135
|
+
background: color-mix(in oklab, var(--color-emerald-500, #10b981) 16%, var(--color-card));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.calc-port--cat {
|
|
139
|
+
border-style: dotted;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.calc-port--more {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
align-items: center;
|
|
146
|
+
justify-content: center;
|
|
147
|
+
gap: 0;
|
|
148
|
+
height: 20px;
|
|
149
|
+
border: 1px dashed color-mix(in oklab, var(--color-muted-foreground) 45%, transparent);
|
|
150
|
+
background: var(--color-card);
|
|
151
|
+
color: var(--color-muted-foreground);
|
|
152
|
+
font-size: 7px;
|
|
153
|
+
line-height: 1;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.calc-port--more:hover {
|
|
158
|
+
color: var(--color-foreground);
|
|
159
|
+
border-color: var(--color-muted-foreground);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.calc-port-count {
|
|
163
|
+
position: absolute;
|
|
164
|
+
left: 50%;
|
|
165
|
+
bottom: 0;
|
|
166
|
+
transform: translateX(-50%);
|
|
167
|
+
z-index: 1;
|
|
168
|
+
pointer-events: none;
|
|
169
|
+
white-space: nowrap;
|
|
170
|
+
font-size: 8px;
|
|
171
|
+
font-weight: 600;
|
|
172
|
+
line-height: 1;
|
|
173
|
+
padding-bottom: 0.5px;
|
|
174
|
+
color: var(--color-foreground);
|
|
175
|
+
text-shadow:
|
|
176
|
+
0 0 2px var(--color-card),
|
|
177
|
+
0 1px 1px var(--color-card),
|
|
178
|
+
1px 0 1px var(--color-card),
|
|
179
|
+
-1px 0 1px var(--color-card),
|
|
180
|
+
0 -1px 1px var(--color-card);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.calc-port-count[data-len='l'] {
|
|
184
|
+
font-size: 7px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.calc-port-count[data-len='xl'] {
|
|
188
|
+
font-size: 6px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.calc-edge--wire.selected .chevron-edge__base,
|
|
192
|
+
.react-flow__edge.selected .chevron-edge__base {
|
|
193
|
+
stroke: var(--color-primary);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.calc-flow .react-flow__node:not(.dragging) {
|
|
197
|
+
transition: transform 240ms ease;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.calc-flow .react-flow__node-calcMaterial[style*='--calc-delay'] {
|
|
201
|
+
animation: calc-node-in 200ms ease-out both;
|
|
202
|
+
animation-delay: var(--calc-delay, 0ms);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.calc-flow
|
|
206
|
+
.react-flow__node-calcMaterial[style*='--calc-delay']
|
|
207
|
+
[data-calc-card] {
|
|
208
|
+
animation: calc-card-in 200ms ease-out both;
|
|
209
|
+
animation-delay: var(--calc-delay, 0ms);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
@keyframes calc-node-in {
|
|
213
|
+
from {
|
|
214
|
+
opacity: 0;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@keyframes calc-card-in {
|
|
219
|
+
from {
|
|
220
|
+
transform: translateY(6px) scale(0.92);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.react-flow__node.calc-node--focus [data-calc-card] {
|
|
225
|
+
box-shadow: 0 0 0 2px var(--color-primary);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.calc-flow--dots .react-flow__edges {
|
|
229
|
+
display: none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.calc-edge-label {
|
|
233
|
+
display: inline-flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
gap: 2px;
|
|
236
|
+
border-radius: 4px;
|
|
237
|
+
border: 1px solid var(--color-border);
|
|
238
|
+
background: var(--color-card);
|
|
239
|
+
padding: 1px 4px;
|
|
240
|
+
font-size: 9px;
|
|
241
|
+
line-height: 1.3;
|
|
242
|
+
color: var(--color-muted-foreground);
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
pointer-events: all;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.calc-edge-label > span:first-child {
|
|
248
|
+
line-height: 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.calc-edge-label:hover {
|
|
252
|
+
color: var(--color-foreground);
|
|
253
|
+
border-color: var(--color-muted-foreground);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.calc-edge-label__name {
|
|
257
|
+
max-width: 90px;
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
text-overflow: ellipsis;
|
|
260
|
+
white-space: nowrap;
|
|
261
|
+
color: var(--color-foreground);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.calc-edge-label__cut {
|
|
265
|
+
display: none;
|
|
266
|
+
color: var(--color-red-500, #ef4444);
|
|
267
|
+
font-size: 11px;
|
|
268
|
+
font-weight: 600;
|
|
269
|
+
line-height: 1;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.calc-edge-label__input {
|
|
273
|
+
width: 56px;
|
|
274
|
+
border-radius: 4px;
|
|
275
|
+
border: 1px solid var(--color-primary);
|
|
276
|
+
background: var(--color-card);
|
|
277
|
+
padding: 1px 4px;
|
|
278
|
+
font-size: 10px;
|
|
279
|
+
outline: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.calc-flow--shift .react-flow__edge {
|
|
283
|
+
cursor: pointer;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.calc-flow--shift
|
|
287
|
+
.react-flow__edge:hover
|
|
288
|
+
.calc-edge-label
|
|
289
|
+
.calc-edge-label__amount {
|
|
290
|
+
display: none;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.calc-flow--shift .react-flow__edge:hover .calc-edge-label .calc-edge-label__cut {
|
|
294
|
+
display: inline;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.calc-flow--shift .react-flow__edge:hover .chevron-edge__base {
|
|
298
|
+
stroke: var(--color-red-500, #ef4444);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.react-flow__node.calc-node--dim {
|
|
302
|
+
opacity: 0.35;
|
|
303
|
+
transition: opacity 160ms ease;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.react-flow__node.calc-node--chain [data-calc-card] {
|
|
307
|
+
box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--color-primary) 65%, transparent);
|
|
308
|
+
}
|
package/styles/strip.css
ADDED
package/styles.css
ADDED
package/README.md
DELETED