py2max 0.2.1__py3-none-any.whl
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.
- py2max/__init__.py +67 -0
- py2max/__main__.py +6 -0
- py2max/cli.py +1251 -0
- py2max/core/__init__.py +39 -0
- py2max/core/abstract.py +146 -0
- py2max/core/box.py +231 -0
- py2max/core/common.py +19 -0
- py2max/core/patcher.py +1658 -0
- py2max/core/patchline.py +68 -0
- py2max/exceptions.py +385 -0
- py2max/export/__init__.py +20 -0
- py2max/export/converters.py +345 -0
- py2max/export/svg.py +393 -0
- py2max/layout/__init__.py +26 -0
- py2max/layout/base.py +463 -0
- py2max/layout/flow.py +405 -0
- py2max/layout/grid.py +374 -0
- py2max/layout/matrix.py +628 -0
- py2max/log.py +338 -0
- py2max/maxref/__init__.py +78 -0
- py2max/maxref/category.py +163 -0
- py2max/maxref/db.py +1082 -0
- py2max/maxref/legacy.py +324 -0
- py2max/maxref/parser.py +703 -0
- py2max/py.typed +0 -0
- py2max/server/__init__.py +54 -0
- py2max/server/client.py +295 -0
- py2max/server/inline.py +312 -0
- py2max/server/repl.py +561 -0
- py2max/server/rpc.py +240 -0
- py2max/server/websocket.py +997 -0
- py2max/static/cola.min.js +4 -0
- py2max/static/d3.v7.min.js +2 -0
- py2max/static/dagre-bundle.js +328 -0
- py2max/static/elk.bundled.js +6663 -0
- py2max/static/index.html +168 -0
- py2max/static/interactive.html +589 -0
- py2max/static/interactive.js +2111 -0
- py2max/static/live-preview.js +324 -0
- py2max/static/svg.min.js +13 -0
- py2max/static/svg.min.js.map +1 -0
- py2max/transformers.py +168 -0
- py2max/utils.py +83 -0
- py2max-0.2.1.dist-info/METADATA +390 -0
- py2max-0.2.1.dist-info/RECORD +48 -0
- py2max-0.2.1.dist-info/WHEEL +4 -0
- py2max-0.2.1.dist-info/entry_points.txt +3 -0
- py2max-0.2.1.dist-info/licenses/LICENSE +19 -0
py2max/static/index.html
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>py2max Live Preview</title>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;">
|
|
8
|
+
<style>
|
|
9
|
+
* {
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Monaco', 'Courier New', monospace;
|
|
17
|
+
background: #1e1e1e;
|
|
18
|
+
color: #d4d4d4;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
#header {
|
|
23
|
+
background: linear-gradient(135deg, #2d2d2d 0%, #1e1e1e 100%);
|
|
24
|
+
padding: 12px 20px;
|
|
25
|
+
border-bottom: 2px solid #4080ff;
|
|
26
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
h1 {
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
color: #4080ff;
|
|
36
|
+
letter-spacing: 0.5px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
#status {
|
|
40
|
+
padding: 6px 12px;
|
|
41
|
+
background: rgba(255,255,255,0.05);
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
font-size: 11px;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: 8px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#status::before {
|
|
51
|
+
content: '';
|
|
52
|
+
width: 8px;
|
|
53
|
+
height: 8px;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
display: inline-block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
#status.connected::before {
|
|
59
|
+
background: #0f0;
|
|
60
|
+
box-shadow: 0 0 8px #0f0;
|
|
61
|
+
animation: pulse 2s ease-in-out infinite;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#status.disconnected::before {
|
|
65
|
+
background: #f00;
|
|
66
|
+
box-shadow: 0 0 8px #f00;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes pulse {
|
|
70
|
+
0%, 100% { opacity: 1; }
|
|
71
|
+
50% { opacity: 0.5; }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.connected { color: #0f0; }
|
|
75
|
+
.disconnected { color: #f00; }
|
|
76
|
+
|
|
77
|
+
#canvas {
|
|
78
|
+
padding: 20px;
|
|
79
|
+
overflow: auto;
|
|
80
|
+
height: calc(100vh - 100px);
|
|
81
|
+
background: #252525;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
svg {
|
|
85
|
+
background: white;
|
|
86
|
+
border-radius: 8px;
|
|
87
|
+
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
|
|
88
|
+
display: block;
|
|
89
|
+
margin: 0 auto;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.box rect {
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
transition: stroke 0.15s ease;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.box:hover rect {
|
|
98
|
+
stroke: #4080ff;
|
|
99
|
+
stroke-width: 2;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.box text {
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
user-select: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
#info {
|
|
108
|
+
position: fixed;
|
|
109
|
+
bottom: 0;
|
|
110
|
+
left: 0;
|
|
111
|
+
right: 0;
|
|
112
|
+
padding: 12px 20px;
|
|
113
|
+
background: linear-gradient(180deg, transparent 0%, #1e1e1e 30%);
|
|
114
|
+
font-size: 11px;
|
|
115
|
+
color: #888;
|
|
116
|
+
text-align: center;
|
|
117
|
+
pointer-events: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
#info span {
|
|
121
|
+
background: rgba(0,0,0,0.6);
|
|
122
|
+
padding: 4px 12px;
|
|
123
|
+
border-radius: 4px;
|
|
124
|
+
backdrop-filter: blur(10px);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Tooltip for box hover */
|
|
128
|
+
.box {
|
|
129
|
+
position: relative;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.box title {
|
|
133
|
+
font-size: 12px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Loading animation */
|
|
137
|
+
@keyframes spin {
|
|
138
|
+
to { transform: rotate(360deg); }
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.loading {
|
|
142
|
+
display: inline-block;
|
|
143
|
+
width: 12px;
|
|
144
|
+
height: 12px;
|
|
145
|
+
border: 2px solid rgba(255,255,255,0.1);
|
|
146
|
+
border-top-color: #4080ff;
|
|
147
|
+
border-radius: 50%;
|
|
148
|
+
animation: spin 0.8s linear infinite;
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
151
|
+
</head>
|
|
152
|
+
<body>
|
|
153
|
+
<div id="header">
|
|
154
|
+
<h1 id="title">py2max Live Preview</h1>
|
|
155
|
+
<div id="status" class="disconnected">
|
|
156
|
+
<span class="status-text">Connecting...</span>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<div id="canvas"></div>
|
|
161
|
+
|
|
162
|
+
<div id="info">
|
|
163
|
+
<span id="info-text">Initializing...</span>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<script src="live-preview.js"></script>
|
|
167
|
+
</body>
|
|
168
|
+
</html>
|