@hattoriai/poney-diagrams 0.3.0-stage.0 → 0.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.
- package/dist/icons.d.ts +2 -0
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/scene.d.ts +8 -0
- package/package.json +3 -3
package/dist/icons.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { Fragment, LocalContext, createContext, createElement, isElement, localS
|
|
|
3
3
|
import { clip, labelPoint, measure, roundedPath, ERD, trimEnd, endAngle, startAngle, wrap, union, bezier } from '@hattoriai/poney-layout';
|
|
4
4
|
import { walkthroughsShowing, marksOf, fragmentLabel, refKey, parseRef, indexOf } from '@hattoriai/poney-core';
|
|
5
5
|
export { indexOf, marksOf } from '@hattoriai/poney-core';
|
|
6
|
-
import { Zap, UserRound, UserCog, Timer, Store, ShoppingCart, Server, Send, Route, Receipt, Radio, Plug, Package, Mail, Library, Landmark, Globe, FileText, Database, CreditCard, ClipboardList, Boxes, Box, BookOpen, AppWindow, Waypoints, UsersRound, Users, Table2, Network, Map as Map$1, ListOrdered, Link2, KeyRound, GitBranch, CircleDot, ChevronsUpDown, ChevronsDownUp, Blocks } from 'lucide';
|
|
6
|
+
import { Zap, UserRound, UserCog, Timer, Store, ShoppingCart, Server, Send, Route, Receipt, Radio, Plug, Package, Mail, Library, Landmark, Globe, FileText, Database, CreditCard, ClipboardList, Boxes, Box, BookOpen, AppWindow, Waypoints, UsersRound, Users, Table2, Plus, Network, Minus, Map as Map$1, ListOrdered, Link2, KeyRound, GitBranch, CircleDot, ChevronsUpDown, ChevronsDownUp, Blocks } from 'lucide';
|
|
7
7
|
|
|
8
8
|
// src/runtime/markup.ts
|
|
9
9
|
var CAMEL = /* @__PURE__ */ new Set([
|
|
@@ -396,6 +396,16 @@ function fit(frame, W, H, pad, maxScale) {
|
|
|
396
396
|
else h = w / aspect;
|
|
397
397
|
return { x: f.x + f.w / 2 - w / 2, y: f.y + f.h / 2 - h / 2, w, h };
|
|
398
398
|
}
|
|
399
|
+
function zoomViewBox(current, base, factor, fx = 0.5, fy = 0.5) {
|
|
400
|
+
const w = Math.min(base.w * 4, Math.max(base.w / 6, current.w / factor));
|
|
401
|
+
const h = w * (current.h / current.w);
|
|
402
|
+
const x = current.x + fx * current.w;
|
|
403
|
+
const y = current.y + fy * current.h;
|
|
404
|
+
return { x: x - fx * w, y: y - fy * h, w, h };
|
|
405
|
+
}
|
|
406
|
+
function panViewBox(current, dx, dy, width, height) {
|
|
407
|
+
return { ...current, x: current.x - dx * current.w / Math.max(width, 1), y: current.y - dy * current.h / Math.max(height, 1) };
|
|
408
|
+
}
|
|
399
409
|
function storyState(input) {
|
|
400
410
|
const keys = expandFocus(input.focus, input.idx, input.walkthrough);
|
|
401
411
|
const group = (items = []) => {
|
|
@@ -551,7 +561,9 @@ var LUCIDE = {
|
|
|
551
561
|
link2: icon("link-2", Link2),
|
|
552
562
|
listOrdered: icon("list-ordered", ListOrdered),
|
|
553
563
|
map: icon("map", Map$1),
|
|
564
|
+
minus: icon("minus", Minus),
|
|
554
565
|
network: icon("network", Network),
|
|
566
|
+
plus: icon("plus", Plus),
|
|
555
567
|
table2: icon("table-2", Table2),
|
|
556
568
|
users: icon("users", Users),
|
|
557
569
|
usersRound: icon("users-round", UsersRound),
|
|
@@ -2630,6 +2642,6 @@ function diagramByKey(key) {
|
|
|
2630
2642
|
return modules.get(key);
|
|
2631
2643
|
}
|
|
2632
2644
|
|
|
2633
|
-
export { BUILT_IN_DIAGRAMS, CalloutBadge, EdgeLabel2 as EdgeLabel, EdgeLine, EmphasisOver, EmphasisUnder, EntityNode, FONTS, Glyph, Head, ICONS, Icon, LUCIDE, LegendRow, LegendShape, MapStory, RenderProvider, Rings, STATE_LABEL, STORY_TYPES, SceneStory, SequenceStory, StateStory, StateTag, StoryProvider, THEMES, ZoomProvider, attributeName, attributeValue, diagramByKey, diagramFor, drawInto, escape, expandFocus, findScene, findTarget, fit, followFrame, iconFor, lookClass, lookOf, mount, registerDiagram, sceneFrame, sceneLayoutOptions, sceneLines, stateFill, stateStroke, stepLetter, storyState, styleText, toMarkup, toneColor, toneWash, useLook, useLookAny, useReadableSize, useRenderBind, useRenderIndex, useRenderStill, useRenderSubject, useRenderZoom, useStory, useViewState, viewKey };
|
|
2645
|
+
export { BUILT_IN_DIAGRAMS, CalloutBadge, EdgeLabel2 as EdgeLabel, EdgeLine, EmphasisOver, EmphasisUnder, EntityNode, FONTS, Glyph, Head, ICONS, Icon, LUCIDE, LegendRow, LegendShape, MapStory, RenderProvider, Rings, STATE_LABEL, STORY_TYPES, SceneStory, SequenceStory, StateStory, StateTag, StoryProvider, THEMES, ZoomProvider, attributeName, attributeValue, diagramByKey, diagramFor, drawInto, escape, expandFocus, findScene, findTarget, fit, followFrame, iconFor, lookClass, lookOf, mount, panViewBox, registerDiagram, sceneFrame, sceneLayoutOptions, sceneLines, stateFill, stateStroke, stepLetter, storyState, styleText, toMarkup, toneColor, toneWash, useLook, useLookAny, useReadableSize, useRenderBind, useRenderIndex, useRenderStill, useRenderSubject, useRenderZoom, useStory, useViewState, viewKey, zoomViewBox };
|
|
2634
2646
|
//# sourceMappingURL=index.js.map
|
|
2635
2647
|
//# sourceMappingURL=index.js.map
|