create-workframe 0.1.20 → 0.1.22
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 +1 -1
- package/package.json +1 -1
- package/scripts/bundle-workframe-ui.mjs +11 -1
- package/workframe-api/test_user_theme_prefs.py +65 -0
- package/workframe-api/user_prefs.py +7 -1
- package/workframe-api/zk_auth.py +7 -1
- package/workframe-ui/public/assets/{arc-BkATcoqt.js → arc-DyGMwYpT.js} +1 -1
- package/workframe-ui/public/assets/architecture-7EHR7CIX-0w2NFyAM.js +1 -0
- package/workframe-ui/public/assets/{architectureDiagram-3BPJPVTR-31_yAiUS.js → architectureDiagram-3BPJPVTR-oA8n1u7Y.js} +1 -1
- package/workframe-ui/public/assets/{blockDiagram-GPEHLZMM-ClM6Si9T.js → blockDiagram-GPEHLZMM-L5HMfcG3.js} +1 -1
- package/workframe-ui/public/assets/{c4Diagram-AAUBKEIU-DJzEktF3.js → c4Diagram-AAUBKEIU-BY8vFkR5.js} +1 -1
- package/workframe-ui/public/assets/channel-CgHXCHX8.js +1 -0
- package/workframe-ui/public/assets/{chunk-2J33WTMH-DPFiyb5O.js → chunk-2J33WTMH-Cb1hi069.js} +1 -1
- package/workframe-ui/public/assets/{chunk-3OPIFGDE-DXNJzuCn.js → chunk-3OPIFGDE-hIV3xbkm.js} +1 -1
- package/workframe-ui/public/assets/{chunk-4BX2VUAB-DDNibGdr.js → chunk-4BX2VUAB-C06L51yj.js} +1 -1
- package/workframe-ui/public/assets/{chunk-55IACEB6-Co3_ulwA.js → chunk-55IACEB6-D1xlF9cC.js} +1 -1
- package/workframe-ui/public/assets/{chunk-5ZQYHXKU-Cmxz8o4d.js → chunk-5ZQYHXKU-l9y_nMPT.js} +1 -1
- package/workframe-ui/public/assets/{chunk-727SXJPM-CDAQGesU.js → chunk-727SXJPM-Lewe5v0b.js} +1 -1
- package/workframe-ui/public/assets/{chunk-AQP2D5EJ-x-swy3kc.js → chunk-AQP2D5EJ-kiUBibpX.js} +1 -1
- package/workframe-ui/public/assets/{chunk-BSJP7CBP-28nU0JOE.js → chunk-BSJP7CBP-LOcOOcCj.js} +1 -1
- package/workframe-ui/public/assets/{chunk-CSCIHK7Q-FUURFika.js → chunk-CSCIHK7Q-D4bt9zo-.js} +1 -1
- package/workframe-ui/public/assets/{chunk-FMBD7UC4-B4RgRO2R.js → chunk-FMBD7UC4-64D_nhHP.js} +1 -1
- package/workframe-ui/public/assets/{chunk-KSCS5N6A-CkuppW3T.js → chunk-KSCS5N6A-D_0N8w0T.js} +1 -1
- package/workframe-ui/public/assets/{chunk-L5ZTLDWV-DyrPSaz3.js → chunk-L5ZTLDWV-DbHDk6Xh.js} +1 -1
- package/workframe-ui/public/assets/{chunk-LZXEDZCA-DFaZSDNV.js → chunk-LZXEDZCA-DRcpQ1-y.js} +2 -2
- package/workframe-ui/public/assets/{chunk-ND2GUHAM-DXI0OJxg.js → chunk-ND2GUHAM-9Tp4VRis.js} +1 -1
- package/workframe-ui/public/assets/{chunk-NZK2D7GU-CyOp1ZG2.js → chunk-NZK2D7GU-chom-hjC.js} +1 -1
- package/workframe-ui/public/assets/{chunk-O5CBEL6O-tZZMCfbx.js → chunk-O5CBEL6O-BWYChZCW.js} +1 -1
- package/workframe-ui/public/assets/chunk-QZHKN3VN-BPO6Xcyh.js +1 -0
- package/workframe-ui/public/assets/chunk-WU5MYG2G-BKbB12sq.js +1 -0
- package/workframe-ui/public/assets/{chunk-XPW4576I-B7_2gS3x.js → chunk-XPW4576I-BphWXYO-.js} +1 -1
- package/workframe-ui/public/assets/classDiagram-4FO5ZUOK-pFnWAsFT.js +1 -0
- package/workframe-ui/public/assets/classDiagram-v2-Q7XG4LA2-pFnWAsFT.js +1 -0
- package/workframe-ui/public/assets/{cose-bilkent-S5V4N54A-BWJaHw_L.js → cose-bilkent-S5V4N54A-BVQ1rGQi.js} +1 -1
- package/workframe-ui/public/assets/{dagre-BM42HDAG-Bu5MadGV.js → dagre-BM42HDAG-hpdHsPta.js} +1 -1
- package/workframe-ui/public/assets/{diagram-2AECGRRQ-ckLZkDFD.js → diagram-2AECGRRQ-DKf5aPiP.js} +1 -1
- package/workframe-ui/public/assets/{diagram-5GNKFQAL-Cf6Abx1Y.js → diagram-5GNKFQAL-D14i6Q6s.js} +1 -1
- package/workframe-ui/public/assets/{diagram-KO2AKTUF-TLk7_5mJ.js → diagram-KO2AKTUF-C6Wcz_hD.js} +1 -1
- package/workframe-ui/public/assets/{diagram-LMA3HP47-ouNxsAb0.js → diagram-LMA3HP47-B5zHTucp.js} +1 -1
- package/workframe-ui/public/assets/{diagram-OG6HWLK6-BMCBQ35D.js → diagram-OG6HWLK6--oeIqoMW.js} +1 -1
- package/workframe-ui/public/assets/{dist-C9bxMexz.js → dist-CEi6Abzf.js} +1 -1
- package/workframe-ui/public/assets/{erDiagram-TEJ5UH35-BN3e6jb1.js → erDiagram-TEJ5UH35-DIUrfd7h.js} +1 -1
- package/workframe-ui/public/assets/eventmodeling-FCH6USID-Ce0EDkZj.js +1 -0
- package/workframe-ui/public/assets/{flowDiagram-I6XJVG4X-BiinzZrd.js → flowDiagram-I6XJVG4X-CAVx-2MC.js} +1 -1
- package/workframe-ui/public/assets/{ganttDiagram-6RSMTGT7-AYE8oBBG.js → ganttDiagram-6RSMTGT7-rE2Q9kWJ.js} +1 -1
- package/workframe-ui/public/assets/{gitGraph-WXDBUCRP-mIq_E2vs.js → gitGraph-WXDBUCRP-uBqM4cWd.js} +1 -1
- package/workframe-ui/public/assets/{gitGraphDiagram-PVQCEYII-Cf8IFEcO.js → gitGraphDiagram-PVQCEYII-CsG7TlcO.js} +1 -1
- package/workframe-ui/public/assets/index-BJmEmCS9.js +133 -0
- package/workframe-ui/public/assets/index-oroScenI.css +1 -0
- package/workframe-ui/public/assets/{info-J43DQDTF--_3kCaIQ.js → info-J43DQDTF-Bo7evJI_.js} +1 -1
- package/workframe-ui/public/assets/{infoDiagram-5YYISTIA-BuIOyYMu.js → infoDiagram-5YYISTIA-qxj6qb2w.js} +1 -1
- package/workframe-ui/public/assets/{ishikawaDiagram-YF4QCWOH-D3bbsXQ8.js → ishikawaDiagram-YF4QCWOH-A6ajmrby.js} +1 -1
- package/workframe-ui/public/assets/{journeyDiagram-JHISSGLW-BrZ26C8L.js → journeyDiagram-JHISSGLW-CdTjkIwW.js} +1 -1
- package/workframe-ui/public/assets/{kanban-definition-UN3LZRKU-CJiUyUOr.js → kanban-definition-UN3LZRKU-muHd3Ffo.js} +1 -1
- package/workframe-ui/public/assets/{line-Bee1snmU.js → line-CAg89X09.js} +1 -1
- package/workframe-ui/public/assets/{linear-dfD-zlI7.js → linear-CnCEZNU5.js} +1 -1
- package/workframe-ui/public/assets/{mermaid-parser.core-D6IqqDSH.js → mermaid-parser.core-yrKuATMA.js} +2 -2
- package/workframe-ui/public/assets/{mermaid.core-CuuxYt2r.js → mermaid.core-MBGt-xiR.js} +3 -3
- package/workframe-ui/public/assets/{mindmap-definition-RKZ34NQL-T7W2fkwA.js → mindmap-definition-RKZ34NQL-B52FFCFS.js} +1 -1
- package/workframe-ui/public/assets/{packet-YPE3B663-CiXMDasj.js → packet-YPE3B663-Cqeg6U6P.js} +1 -1
- package/workframe-ui/public/assets/{pie-LRSECV5Y-CUx1_96f.js → pie-LRSECV5Y-BSge41qR.js} +1 -1
- package/workframe-ui/public/assets/{pieDiagram-4H26LBE5-DfR96FUO.js → pieDiagram-4H26LBE5-E35HYWJs.js} +1 -1
- package/workframe-ui/public/assets/{quadrantDiagram-W4KKPZXB-Dj6mqgQE.js → quadrantDiagram-W4KKPZXB-Cm2C43vo.js} +1 -1
- package/workframe-ui/public/assets/{radar-GUYGQ44K-DKT2q98y.js → radar-GUYGQ44K-r9_sDbJ3.js} +1 -1
- package/workframe-ui/public/assets/{requirementDiagram-4Y6WPE33-DYDnBVw9.js → requirementDiagram-4Y6WPE33-CrUajpp-.js} +1 -1
- package/workframe-ui/public/assets/{sankeyDiagram-5OEKKPKP-BSkxpjjO.js → sankeyDiagram-5OEKKPKP-DiiUU2le.js} +1 -1
- package/workframe-ui/public/assets/{sequenceDiagram-3UESZ5HK-Dz6SNH9S.js → sequenceDiagram-3UESZ5HK-DhrpRdS9.js} +1 -1
- package/workframe-ui/public/assets/{src-DC521nE_.js → src-BhhUU6lx.js} +1 -1
- package/workframe-ui/public/assets/{stateDiagram-AJRCARHV-D4ZoF5NP.js → stateDiagram-AJRCARHV-BtC4QcCc.js} +1 -1
- package/workframe-ui/public/assets/stateDiagram-v2-BHNVJYJU-PqUsXPf3.js +1 -0
- package/workframe-ui/public/assets/{timeline-definition-PNZ67QCA-d0ezg1Hu.js → timeline-definition-PNZ67QCA-zlqOke6C.js} +1 -1
- package/workframe-ui/public/assets/{treeView-BLDUP644-kXyaqwIy.js → treeView-BLDUP644-CoSJaLnH.js} +1 -1
- package/workframe-ui/public/assets/{treemap-LRROVOQU-g168p7-O.js → treemap-LRROVOQU-fOoCGThO.js} +1 -1
- package/workframe-ui/public/assets/{vennDiagram-CIIHVFJN-C0_QsmRl.js → vennDiagram-CIIHVFJN-_WFzLoYS.js} +1 -1
- package/workframe-ui/public/assets/{wardley-L42UT6IY-BNFCdzxQ.js → wardley-L42UT6IY-vr89kPeR.js} +1 -1
- package/workframe-ui/public/assets/{wardleyDiagram-YWT4CUSO-BOwUS9sY.js → wardleyDiagram-YWT4CUSO-B_1ddHYb.js} +1 -1
- package/workframe-ui/public/assets/{xychartDiagram-2RQKCTM6-Cxr1ZiKh.js → xychartDiagram-2RQKCTM6-KvCIAFlm.js} +1 -1
- package/workframe-ui/public/index.html +23 -12
- package/workframe-ui/public/workframe-build.json +4 -3
- package/workframe-ui/public/assets/architecture-7EHR7CIX-yusDFKmK.js +0 -1
- package/workframe-ui/public/assets/channel-Nb_UjZ3O.js +0 -1
- package/workframe-ui/public/assets/chunk-QZHKN3VN-C_TtOXi5.js +0 -1
- package/workframe-ui/public/assets/chunk-WU5MYG2G-BjSJQEIY.js +0 -1
- package/workframe-ui/public/assets/classDiagram-4FO5ZUOK-JD6iZUGh.js +0 -1
- package/workframe-ui/public/assets/classDiagram-v2-Q7XG4LA2-JD6iZUGh.js +0 -1
- package/workframe-ui/public/assets/eventmodeling-FCH6USID-Bqd_sTz0.js +0 -1
- package/workframe-ui/public/assets/index-BnfFRGR3.js +0 -133
- package/workframe-ui/public/assets/index-COshPjF3.css +0 -1
- package/workframe-ui/public/assets/stateDiagram-v2-BHNVJYJU-DknveEiR.js +0 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -61,9 +61,19 @@ copyTree(dist, UI_DEST);
|
|
|
61
61
|
|
|
62
62
|
const pkgVersion = JSON.parse(fs.readFileSync(path.join(PKG_ROOT, 'package.json'), 'utf8')).version;
|
|
63
63
|
const gitRef = spawnSync('git', ['rev-parse', '--short', 'HEAD'], { encoding: 'utf8', cwd: REPO_ROOT });
|
|
64
|
+
const bundledAt = new Date().toISOString();
|
|
65
|
+
const assetRevision = `${pkgVersion}-${Date.parse(bundledAt).toString(36)}`;
|
|
66
|
+
const bundledIndexPath = path.join(UI_DEST, 'index.html');
|
|
67
|
+
const bundledIndex = fs.readFileSync(bundledIndexPath, 'utf8').replace(
|
|
68
|
+
/((?:src|href)=["']\/assets\/[^"'?]+)(["'])/g,
|
|
69
|
+
`$1?v=${assetRevision}$2`,
|
|
70
|
+
);
|
|
71
|
+
fs.writeFileSync(bundledIndexPath, bundledIndex);
|
|
72
|
+
|
|
64
73
|
const buildStamp = {
|
|
65
74
|
package_version: pkgVersion,
|
|
66
|
-
bundled_at:
|
|
75
|
+
bundled_at: bundledAt,
|
|
76
|
+
asset_revision: assetRevision,
|
|
67
77
|
git_ref: gitRef.status === 0 ? gitRef.stdout.trim() : '',
|
|
68
78
|
};
|
|
69
79
|
fs.writeFileSync(path.join(UI_DEST, 'workframe-build.json'), `${JSON.stringify(buildStamp, null, 2)}\n`);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""Personal appearance preference persists in the authenticated profile."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sqlite3
|
|
6
|
+
import sys
|
|
7
|
+
import tempfile
|
|
8
|
+
from datetime import datetime, timezone
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
import pytest
|
|
12
|
+
|
|
13
|
+
API_DIR = Path(__file__).resolve().parent
|
|
14
|
+
if str(API_DIR) not in sys.path:
|
|
15
|
+
sys.path.insert(0, str(API_DIR))
|
|
16
|
+
|
|
17
|
+
import zk_auth # noqa: E402
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_theme_profile_round_trip_and_legacy_migration(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
21
|
+
with tempfile.TemporaryDirectory(prefix="wf-theme-prefs-") as tmp:
|
|
22
|
+
data_dir = Path(tmp)
|
|
23
|
+
db_path = data_dir / "zk_auth.db"
|
|
24
|
+
data_dir.mkdir(parents=True, exist_ok=True)
|
|
25
|
+
|
|
26
|
+
legacy = sqlite3.connect(db_path)
|
|
27
|
+
legacy.executescript(
|
|
28
|
+
"""
|
|
29
|
+
CREATE TABLE users (
|
|
30
|
+
id TEXT PRIMARY KEY,
|
|
31
|
+
status TEXT NOT NULL,
|
|
32
|
+
created_at TEXT NOT NULL,
|
|
33
|
+
updated_at TEXT NOT NULL
|
|
34
|
+
);
|
|
35
|
+
CREATE TABLE profiles (
|
|
36
|
+
user_id TEXT PRIMARY KEY,
|
|
37
|
+
display_name TEXT,
|
|
38
|
+
avatar_url TEXT,
|
|
39
|
+
tagline TEXT,
|
|
40
|
+
bio TEXT,
|
|
41
|
+
created_at TEXT NOT NULL,
|
|
42
|
+
updated_at TEXT NOT NULL
|
|
43
|
+
);
|
|
44
|
+
"""
|
|
45
|
+
)
|
|
46
|
+
now = datetime.now(timezone.utc).isoformat()
|
|
47
|
+
legacy.execute("INSERT INTO users VALUES (?, 'active', ?, ?)", ("user-theme", now, now))
|
|
48
|
+
legacy.commit()
|
|
49
|
+
legacy.close()
|
|
50
|
+
|
|
51
|
+
monkeypatch.setenv("WORKFRAME_API_DATA_DIR", str(data_dir))
|
|
52
|
+
profile = zk_auth.update_profile("user-theme", {"theme": "blueprint"})
|
|
53
|
+
|
|
54
|
+
assert profile is not None
|
|
55
|
+
assert profile["theme"] == "blueprint"
|
|
56
|
+
conn = zk_auth._zk_db()
|
|
57
|
+
try:
|
|
58
|
+
columns = {row[1] for row in conn.execute("PRAGMA table_info(profiles)").fetchall()}
|
|
59
|
+
finally:
|
|
60
|
+
conn.close()
|
|
61
|
+
assert "theme" in columns
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
if __name__ == "__main__":
|
|
65
|
+
raise SystemExit(pytest.main([__file__, "-q"]))
|
|
@@ -182,8 +182,13 @@ def validate_me_profile_updates(updates: dict[str, Any]) -> None:
|
|
|
182
182
|
|
|
183
183
|
def apply_me_profile_updates(user_id: str, body: dict[str, Any]) -> dict[str, Any]:
|
|
184
184
|
user_id = str(user_id or "").strip()
|
|
185
|
-
allowed = {"display_name", "avatar_url", "tagline", "bio"}
|
|
185
|
+
allowed = {"display_name", "avatar_url", "tagline", "bio", "theme"}
|
|
186
186
|
updates = {k: v for k, v in body.items() if k in allowed}
|
|
187
|
+
if "theme" in updates:
|
|
188
|
+
theme = str(updates.get("theme") or "").strip()
|
|
189
|
+
if not theme or len(theme) > 64 or any(char not in "abcdefghijklmnopqrstuvwxyz0123456789-" for char in theme):
|
|
190
|
+
raise ValueError("invalid_theme")
|
|
191
|
+
updates["theme"] = theme
|
|
187
192
|
validate_me_profile_updates(updates)
|
|
188
193
|
if "avatar_url" in updates:
|
|
189
194
|
updates["avatar_url"] = _srv()._normalize_user_avatar_url(str(updates.get("avatar_url") or ""))
|
|
@@ -414,6 +419,7 @@ def session_profile_payload(user_id: str) -> dict[str, Any] | None:
|
|
|
414
419
|
"avatar_url": avatar_url,
|
|
415
420
|
"tagline": (profile or {}).get("tagline"),
|
|
416
421
|
"bio": (profile or {}).get("bio"),
|
|
422
|
+
"theme": (profile or {}).get("theme"),
|
|
417
423
|
"platform_ids": platform_ids,
|
|
418
424
|
},
|
|
419
425
|
"workspaces": workspaces,
|
package/workframe-api/zk_auth.py
CHANGED
|
@@ -226,6 +226,7 @@ def _zk_init_db(conn: sqlite3.Connection) -> None:
|
|
|
226
226
|
avatar_url TEXT,
|
|
227
227
|
tagline TEXT,
|
|
228
228
|
bio TEXT,
|
|
229
|
+
theme TEXT,
|
|
229
230
|
created_at TEXT NOT NULL,
|
|
230
231
|
updated_at TEXT NOT NULL
|
|
231
232
|
);
|
|
@@ -237,6 +238,10 @@ def _zk_init_db(conn: sqlite3.Connection) -> None:
|
|
|
237
238
|
CREATE INDEX IF NOT EXISTS idx_sessions_family ON sessions(token_family_id);
|
|
238
239
|
CREATE INDEX IF NOT EXISTS idx_sessions_refresh ON sessions(refresh_token_hash);
|
|
239
240
|
""")
|
|
241
|
+
profile_columns = {str(row[1]) for row in conn.execute("PRAGMA table_info(profiles)").fetchall()}
|
|
242
|
+
if "theme" not in profile_columns:
|
|
243
|
+
conn.execute("ALTER TABLE profiles ADD COLUMN theme TEXT")
|
|
244
|
+
conn.commit()
|
|
240
245
|
|
|
241
246
|
|
|
242
247
|
# ---------------------------------------------------------------------------
|
|
@@ -566,13 +571,14 @@ def get_profile(user_id: str) -> dict | None:
|
|
|
566
571
|
"avatar_url": row["avatar_url"],
|
|
567
572
|
"tagline": row["tagline"],
|
|
568
573
|
"bio": row["bio"],
|
|
574
|
+
"theme": row["theme"],
|
|
569
575
|
}
|
|
570
576
|
finally:
|
|
571
577
|
conn.close()
|
|
572
578
|
|
|
573
579
|
|
|
574
580
|
def update_profile(user_id: str, updates: dict) -> dict:
|
|
575
|
-
allowed = {"display_name", "avatar_url", "tagline", "bio"}
|
|
581
|
+
allowed = {"display_name", "avatar_url", "tagline", "bio", "theme"}
|
|
576
582
|
fields = {k: v for k, v in updates.items() if k in allowed and v is not None}
|
|
577
583
|
if not fields:
|
|
578
584
|
return get_profile(user_id)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-BWPyau1x.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-
|
|
1
|
+
import{n as e,t}from"./path-BWPyau1x.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-CEi6Abzf.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-NNHCCRGN-DlpIbxXb.js";import{x as e}from"./mermaid-parser.core-yrKuATMA.js";export{e as createArchitectureServices};
|