normalized-schema-generator 0.1.0__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.
@@ -0,0 +1,6 @@
1
+ """Normalized Schema Generator — anywidget for Microsoft Fabric Process Mining."""
2
+
3
+ from .widget import NormalizedSchemaWidget
4
+
5
+ __all__ = ["NormalizedSchemaWidget"]
6
+ __version__ = "0.1.0"
@@ -0,0 +1,125 @@
1
+ /* ── Fluent 2 tokens ── */
2
+ .nsw { --f-font: "Segoe UI Variable","Segoe UI",-apple-system,Helvetica,Arial,sans-serif; --f-mono: "Cascadia Code","Cascadia Mono","Consolas","SF Mono","Menlo","Courier New",monospace; --f-bg: #fff; --f-surface: #fafafa; --f-border: #e0e0e0; --f-border-strong: #d1d1d1; --f-text: #242424; --f-text2: #616161; --f-text3: #8a8a8a; --f-brand: #0F6CBD; --f-brand-hover: #115EA3; --f-brand-bg: #EBF3FC; --f-danger: #C4314B; --f-danger-bg: #FDF3F4; --f-success: #0E7A0D; --f-success-bg: #F1FAF1; --f-warn: #F7630C; --f-warn-bg: #FFF9F5; --f-shadow4: 0 2px 4px rgba(0,0,0,.06); --f-shadow8: 0 2px 8px rgba(0,0,0,.1); --f-radius: 8px; --f-radius-sm: 4px; }
3
+ .nsw { font-family: var(--f-font); max-width: 900px; color: var(--f-text); font-size: 13px; line-height: 1.5; }
4
+ .nsw *, .nsw *::before, .nsw *::after { box-sizing: border-box; }
5
+
6
+ /* Header */
7
+ .nsw-header { margin-bottom: 16px; }
8
+ .nsw-header h2 { font-size: 20px; font-weight: 600; margin: 0 0 2px; color: var(--f-text); }
9
+ .nsw-header p { font-size: 12px; color: var(--f-text2); margin: 0; }
10
+
11
+ /* Cards */
12
+ .nsw-card { border: 1px solid var(--f-border); border-radius: var(--f-radius); padding: 16px; margin-bottom: 12px; background: var(--f-bg); box-shadow: var(--f-shadow4); }
13
+ .nsw-card.events { border-left: 3px solid var(--f-brand); }
14
+ .nsw-card.cases { border-left: 3px solid #E8AB02; }
15
+ .nsw-card.output { border-left: 3px solid var(--f-text3); }
16
+ .nsw-card-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
17
+ .nsw-card-title .badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--f-radius-sm); text-transform: uppercase; letter-spacing: 0.04em; }
18
+ .nsw-card.events .badge { background: var(--f-brand-bg); color: var(--f-brand); }
19
+ .nsw-card.cases .badge { background: #FFF8E1; color: #7A6200; }
20
+
21
+ /* Form rows */
22
+ .nsw-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
23
+ .nsw-label { font-size: 12px; font-weight: 600; color: var(--f-text2); min-width: 90px; flex-shrink: 0; }
24
+ .nsw-label.sm { min-width: 70px; }
25
+
26
+ /* Fluent 2 select / input */
27
+ .nsw-select { font-family: var(--f-font); font-size: 13px; padding: 5px 28px 5px 8px; border: 1px solid var(--f-border-strong); border-bottom: 2px solid var(--f-border-strong); border-radius: var(--f-radius-sm); background: var(--f-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23616161'/%3E%3C/svg%3E") no-repeat right 8px center; appearance: none; cursor: pointer; min-width: 170px; color: var(--f-text); transition: border-color 0.15s; }
28
+ .nsw-select:focus { outline: none; border-bottom-color: var(--f-brand); }
29
+ .nsw-select:disabled { background-color: var(--f-surface); color: var(--f-text3); cursor: default; border-color: var(--f-border); }
30
+ .nsw-input { font-family: var(--f-font); font-size: 13px; padding: 5px 8px; border: 1px solid var(--f-border-strong); border-bottom: 2px solid var(--f-border-strong); border-radius: var(--f-radius-sm); min-width: 170px; color: var(--f-text); transition: border-color 0.15s; background: var(--f-bg); }
31
+ .nsw-input:focus { outline: none; border-bottom-color: var(--f-brand); }
32
+
33
+ /* Fluent 2 toggle group (segmented) */
34
+ .nsw-toggle { display: inline-flex; background: #e8e8e8; border-radius: var(--f-radius-sm); padding: 2px; gap: 2px; }
35
+ .nsw-toggle button { font-family: var(--f-font); font-size: 13px; padding: 5px 18px; border: none; background: transparent; color: var(--f-text2); cursor: pointer; transition: all 0.15s; border-radius: 3px; font-weight: 400; }
36
+ .nsw-toggle button.active { background: var(--f-brand); color: #fff; font-weight: 600; }
37
+ .nsw-toggle button:not(.active):hover { background: rgba(0,0,0,.06); color: var(--f-text); }
38
+
39
+ /* Column list */
40
+ .nsw-col-list { border: 1px solid var(--f-border); border-radius: var(--f-radius-sm); max-height: 240px; overflow-y: auto; margin: 4px 0 8px; }
41
+ .nsw-col-row { display: flex; align-items: center; padding: 6px 12px; gap: 10px; border-bottom: 1px solid #f2f2f2; min-height: 32px; }
42
+ .nsw-col-row:last-child { border-bottom: none; }
43
+ .nsw-col-row:hover { background: var(--f-surface); }
44
+ .nsw-col-name { font-family: var(--f-mono); font-size: 13px; flex: 1; color: var(--f-text); letter-spacing: -0.01em; }
45
+ .nsw-col-dtype { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.03em; flex-shrink: 0; }
46
+ .nsw-col-dtype.int { background: var(--f-success-bg); color: var(--f-success); }
47
+ .nsw-col-dtype.double { background: var(--f-warn-bg); color: var(--f-warn); }
48
+ .nsw-col-dtype.string { background: var(--f-brand-bg); color: var(--f-brand); }
49
+ .nsw-col-dtype.timestamp { background: #F3E5F5; color: #7B1FA2; }
50
+ .nsw-col-dtype.boolean { background: var(--f-danger-bg); color: var(--f-danger); }
51
+ .nsw-col-dtype.other { background: var(--f-surface); color: var(--f-text2); }
52
+
53
+ /* Fluent 2 toggle switch */
54
+ .nsw-toggle-cb { position: relative; width: 40px; height: 20px; flex-shrink: 0; }
55
+ .nsw-toggle-cb input { opacity: 0; width: 0; height: 0; position: absolute; }
56
+ .nsw-toggle-cb .slider { position: absolute; inset: 0; background: var(--f-border-strong); border-radius: 10px; cursor: pointer; transition: 0.15s; border: 1px solid transparent; }
57
+ .nsw-toggle-cb .slider::before { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
58
+ .nsw-toggle-cb input:checked + .slider { background: var(--f-brand); }
59
+ .nsw-toggle-cb input:checked + .slider::before { transform: translateX(20px); }
60
+
61
+ /* Cases relationship */
62
+ .nsw-rel-form { border: 1px solid #E8AB02; border-radius: var(--f-radius-sm); padding: 10px 12px; margin: 8px 0; background: #FFFDF5; }
63
+ .nsw-rel-form .nsw-row { margin-bottom: 6px; }
64
+ .nsw-rel-form .rel-title { font-size: 12px; font-weight: 600; color: #7A6200; margin-bottom: 6px; }
65
+ .nsw-rel-status { font-size: 11px; padding: 4px 10px; border-radius: var(--f-radius-sm); }
66
+ .nsw-rel-status.configured { background: var(--f-success-bg); color: var(--f-success); }
67
+ .nsw-rel-status.missing { background: var(--f-warn-bg); color: var(--f-warn); }
68
+
69
+ /* Joins / References */
70
+ .nsw-joins-title { font-size: 12px; font-weight: 600; color: var(--f-text2); margin-bottom: 4px; }
71
+ .nsw-join-item { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: var(--f-surface); border: 1px solid var(--f-border); border-radius: var(--f-radius-sm); margin-bottom: 4px; font-size: 12px; }
72
+ .nsw-join-item .join-desc { flex: 1; font-family: var(--f-mono); font-size: 11px; }
73
+ .nsw-join-item .join-type { font-size: 10px; padding: 1px 6px; background: var(--f-brand-bg); color: var(--f-brand); border-radius: 3px; font-weight: 600; }
74
+
75
+ /* Fluent 2 buttons — three appearances: subtle (default), outline, primary */
76
+ .nsw-btn { font-family: var(--f-font); font-size: 14px; min-height: 32px; padding: 0 12px; border: none; border-radius: var(--f-radius-sm); background: transparent; color: var(--f-brand); cursor: pointer; transition: background 0.1s; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
77
+ .nsw-btn:hover { background: var(--f-brand-bg); }
78
+ .nsw-btn.outline { border: 1px solid var(--f-border-strong); background: var(--f-bg); color: var(--f-text); font-weight: 400; }
79
+ .nsw-btn.outline:hover { background: var(--f-surface); }
80
+ .nsw-btn.primary { background: var(--f-brand); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
81
+ .nsw-btn.primary:hover { background: var(--f-brand-hover); box-shadow: 0 2px 4px rgba(0,0,0,.18); }
82
+ .nsw-btn.danger { color: var(--f-danger); font-weight: 400; }
83
+ .nsw-btn.danger:hover { background: var(--f-danger-bg); }
84
+ .nsw-btn.sm { font-size: 12px; min-height: 28px; padding: 0 10px; }
85
+ .nsw-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
86
+
87
+ /* Add Reference form */
88
+ .nsw-ref-form { border: 1px solid var(--f-border); border-radius: var(--f-radius-sm); padding: 10px 12px; margin: 8px 0; background: var(--f-surface); }
89
+ .nsw-ref-form .nsw-row { margin-bottom: 6px; }
90
+ .nsw-ref-form .form-actions { display: flex; gap: 8px; margin-top: 8px; }
91
+
92
+ /* Pair row for FK/PK side-by-side */
93
+ .nsw-pair-row { display: flex; gap: 16px; margin-bottom: 6px; flex-wrap: wrap; }
94
+ .nsw-pair-row .nsw-pair { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; }
95
+
96
+ /* JSON output */
97
+ .nsw-json-wrap { position: relative; }
98
+ .nsw-json { font-family: var(--f-mono); font-size: 11.5px; background: var(--f-surface); border: 1px solid var(--f-border); border-radius: var(--f-radius-sm); padding: 12px; max-height: 400px; overflow: auto; white-space: pre; line-height: 1.45; color: var(--f-text); }
99
+ .nsw-copy-btn { position: absolute; top: 8px; right: 8px; }
100
+ .nsw-copied { font-size: 11px; color: var(--f-success); font-weight: 600; padding: 3px 10px; }
101
+
102
+ /* Collapse toggle */
103
+ .nsw-collapse-btn { background: none; border: none; font-family: var(--f-font); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; color: var(--f-text); display: flex; align-items: center; gap: 6px; }
104
+ .nsw-collapse-btn:hover { color: var(--f-brand); }
105
+ .nsw-collapse-btn .arrow { display: inline-block; transition: transform 0.15s; font-size: 10px; }
106
+ .nsw-collapse-btn .arrow.open { transform: rotate(90deg); }
107
+
108
+ /* Loading spinner (inline) */
109
+ .nsw-loading-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--f-text2); font-size: 12px; margin-left: 8px; }
110
+ .nsw-loading-inline::before { content: ""; display: inline-block; width: 14px; height: 14px; border: 2px solid var(--f-border); border-top-color: var(--f-brand); border-radius: 50%; animation: nsw-spin 0.6s linear infinite; }
111
+ @keyframes nsw-spin { to { transform: rotate(360deg); } }
112
+
113
+ /* Error / empty */
114
+ .nsw-error { color: var(--f-danger); font-size: 12px; padding: 4px 0; }
115
+ .nsw-empty { color: var(--f-text3); font-size: 12px; font-style: italic; padding: 6px 10px; }
116
+
117
+ /* Divider */
118
+ .nsw-divider { border: none; border-top: 1px solid var(--f-border); margin: 10px 0; }
119
+
120
+ /* Cases placeholder */
121
+ .nsw-cases-placeholder { display: flex; align-items: center; justify-content: center; padding: 16px; border: 1.5px dashed #E8AB02; border-radius: var(--f-radius); margin-bottom: 12px; }
122
+
123
+ /* Scrollbar */
124
+ .nsw-col-list::-webkit-scrollbar, .nsw-json::-webkit-scrollbar { width: 6px; }
125
+ .nsw-col-list::-webkit-scrollbar-thumb, .nsw-json::-webkit-scrollbar-thumb { background: var(--f-border-strong); border-radius: 3px; }