lutaml 0.10.7 → 0.10.8

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.
@@ -1,134 +1,114 @@
1
- <header class="app-header" role="banner">
2
- <div class="header-content">
3
- <div class="header-left">
4
- <button
5
- @click="sidebarVisible = !sidebarVisible"
6
- class="sidebar-toggle"
7
- aria-label="Toggle sidebar"
8
- >
9
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
10
- <line x1="3" y1="12" x2="21" y2="12"></line>
11
- <line x1="3" y1="6" x2="21" y2="6"></line>
12
- <line x1="3" y1="18" x2="21" y2="18"></line>
13
- </svg>
14
- </button>
15
-
16
- <h1 class="app-title">
17
- <a href="#/" @click.prevent="showWelcome()">{{ config.title }}</a>
18
- </h1>
19
- </div>
1
+ <header class="app-header">
2
+ <div class="header-left">
3
+ <button @click="$store.app.sidebarVisible = !$store.app.sidebarVisible" class="sidebar-toggle icon-btn" aria-label="Toggle sidebar">
4
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
5
+ <path d="M3 5h14M3 10h14M3 15h14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
6
+ </svg>
7
+ </button>
8
+ <button class="home-btn icon-btn" @click="showWelcome()" title="Overview">
9
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
10
+ <path d="M2 7.5L8 2.5L14 7.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <path d="M3 7.5V13.5C3 13.5 3 14 4 14H12C12 14 13 14 13 13.5V7.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
12
+ </svg>
13
+ </button>
14
+ <span class="header-breadcrumb">
15
+ <span x-text="JSON.parse(config).title || 'UML Model Browser'"></span>
16
+ </span>
17
+ </div>
20
18
 
21
- <div class="header-center" x-data="searchComponent">
22
- <div class="search-wrapper">
23
- <svg class="search-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
24
- <circle cx="11" cy="11" r="8"></circle>
25
- <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
26
- </svg>
19
+ <div class="header-center" x-data="searchComponent">
20
+ <button class="search-trigger" @click="$refs.searchInput.focus()">
21
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
22
+ <circle cx="7" cy="7" r="5" stroke="currentColor" stroke-width="1.5"/>
23
+ <path d="M11 11l3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
24
+ </svg>
25
+ <span class="search-placeholder">Search packages, classes...</span>
26
+ <kbd>/</kbd>
27
+ </button>
27
28
 
28
- <input
29
- type="search"
30
- x-model="query"
31
- @input.debounce.300ms="performSearch()"
32
- @keydown.arrow-down.prevent="selectNext()"
33
- @keydown.arrow-up.prevent="selectPrevious()"
34
- @keydown.enter.prevent="openSelected()"
35
- @keydown.escape="closeSearch()"
36
- @focus="showResults = query.length >= 2"
37
- placeholder="Search... (Press / or Ctrl+K)"
38
- class="search-input"
39
- x-ref="searchInput"
40
- aria-label="Search UML model"
41
- >
29
+ <!-- Hidden functional input -->
30
+ <input type="search" x-model="query" x-ref="searchInput"
31
+ @input.debounce.300ms="performSearch()"
32
+ @keydown.arrow-down.prevent="selectNext()"
33
+ @keydown.arrow-up.prevent="selectPrevious()"
34
+ @keydown.enter.prevent="openSelected()"
35
+ @keydown.escape="closeSearch()"
36
+ @blur="showResults = false"
37
+ style="position:absolute;opacity:0;pointer-events:none;width:0;height:0;"
38
+ aria-label="Search">
42
39
 
43
- <button
44
- x-show="query.length > 0"
45
- @click="clearSearch()"
46
- class="search-clear"
47
- aria-label="Clear search"
48
- >
49
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
50
- <line x1="18" y1="6" x2="6" y2="18"></line>
51
- <line x1="6" y1="6" x2="18" y2="18"></line>
40
+ <!-- Search Modal Overlay -->
41
+ <div x-show="showResults && query.length >= 2"
42
+ @click.away="showResults = false"
43
+ x-transition
44
+ class="search-modal-overlay"
45
+ @mousedown.prevent style="padding-top: 5vh;">
46
+ <div class="search-modal" @click.stop>
47
+ <div class="search-input-wrapper">
48
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" style="color: var(--text-muted); flex-shrink: 0;">
49
+ <circle cx="8" cy="8" r="5.5" stroke="currentColor" stroke-width="1.5"/>
50
+ <path d="M12 12l4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
52
51
  </svg>
53
- </button>
54
-
55
- <kbd class="search-hint">Ctrl+K</kbd>
56
- </div>
57
-
58
- <!-- Search Results Overlay -->
59
- <div
60
- x-show="showResults && query.length >= 2"
61
- @click.away="showResults = false"
62
- x-transition:enter="transition ease-out duration-200"
63
- x-transition:enter-start="opacity-0 transform scale-95"
64
- x-transition:enter-end="opacity-100 transform scale-100"
65
- class="search-results-overlay"
66
- role="listbox"
67
- >
68
- <div class="search-results-header">
69
- <span x-text="`${results.length} result${results.length !== 1 ? 's' : ''}`"></span>
70
- <span class="search-hint-text">Use ↑↓ to navigate, Enter to open, Esc to close</span>
52
+ <input type="text" x-model="query"
53
+ @input.debounce.300ms="performSearch()"
54
+ @keydown.arrow-down.prevent="selectNext()"
55
+ @keydown.arrow-up.prevent="selectPrevious()"
56
+ @keydown.enter.prevent="openSelected()"
57
+ @keydown.escape="closeSearch()"
58
+ class="search-input"
59
+ placeholder="Search packages, classes, attributes...">
60
+ <button x-show="query.length > 0" @click="clearSearch()" style="padding: var(--space-1); color: var(--text-muted);">
61
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none">
62
+ <path d="M4 4l6 6M10 4l-6 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
63
+ </svg>
64
+ </button>
71
65
  </div>
72
66
 
73
- <!-- Results list -->
74
- <div class="search-results-list" x-show="results.length > 0">
75
- <template x-for="(result, index) in results" :key="result.id">
76
- <div
77
- @click="openResult(result)"
78
- @mouseenter="selectedIndex = index"
79
- :class="{ 'selected': selectedIndex === index }"
80
- class="search-result-item"
81
- role="option"
82
- :aria-selected="selectedIndex === index"
83
- >
84
- <div class="result-icon" :data-type="result.type">
85
- <span x-text="getTypeIcon(result.type)"></span>
86
- </div>
87
-
88
- <div class="result-info">
89
- <div class="result-name">
90
- <span x-html="highlightMatches(result.name, query)"></span>
91
- <span class="result-type-badge" x-text="result.entityType"></span>
67
+ <div class="search-results">
68
+ <div x-show="results.length === 0" class="search-empty">
69
+ No results for "<span x-text="query"></span>"
70
+ </div>
71
+ <div class="search-results-list" x-show="results.length > 0">
72
+ <template x-for="(result, index) in results" :key="result.id">
73
+ <div class="search-result"
74
+ @click="openResult(result)"
75
+ @mouseenter="selectedIndex = index"
76
+ :class="{ focused: selectedIndex === index }">
77
+ <span class="result-icon">
78
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
79
+ <rect x="3" y="3" width="10" height="10" rx="1.5" stroke="currentColor" stroke-width="1.3"/>
80
+ </svg>
81
+ </span>
82
+ <div class="result-content">
83
+ <span class="result-name" x-html="highlightMatches(result.name, query)"></span>
84
+ <span class="result-path" x-text="result.qualifiedName || result.package"></span>
92
85
  </div>
93
- <div class="result-path" x-text="result.qualifiedName || result.package"></div>
94
- </div>
95
-
96
- <div class="result-score">
97
- <div class="score-bar" :style="`width: ${Math.min((result.score / maxScore) * 100, 100)}%`"></div>
98
86
  </div>
99
- </div>
100
- </template>
87
+ </template>
88
+ </div>
101
89
  </div>
102
90
 
103
- <!-- No Results Message INSIDE overlay -->
104
- <div class="search-no-results" x-show="results.length === 0">
105
- <p>No results found for "<span x-text="query"></span>"</p>
106
- <p class="search-suggestion">Try different keywords or check spelling</p>
91
+ <div class="search-footer">
92
+ <div class="search-hints">
93
+ <span><kbd>↑</kbd><kbd>↓</kbd> Navigate</span>
94
+ <span><kbd>↵</kbd> Select</span>
95
+ <span><kbd>Esc</kbd> Close</span>
96
+ </div>
107
97
  </div>
108
98
  </div>
109
99
  </div>
100
+ </div>
110
101
 
111
- <div class="header-right">
112
- <button
113
- @click="toggleTheme()"
114
- class="theme-toggle"
115
- :aria-label="darkMode ? 'Switch to light mode' : 'Switch to dark mode'"
116
- >
117
- <svg x-show="!darkMode" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
118
- <circle cx="12" cy="12" r="5"></circle>
119
- <line x1="12" y1="1" x2="12" y2="3"></line>
120
- <line x1="12" y1="21" x2="12" y2="23"></line>
121
- <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
122
- <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
123
- <line x1="1" y1="12" x2="3" y2="12"></line>
124
- <line x1="21" y1="12" x2="23" y2="12"></line>
125
- <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
126
- <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
127
- </svg>
128
- <svg x-show="darkMode" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
129
- <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
130
- </svg>
131
- </button>
132
- </div>
102
+ <div class="header-right">
103
+ <button class="icon-btn" @click="toggleTheme()" :title="darkMode ? 'Light mode' : 'Dark mode'">
104
+ <svg x-show="!darkMode" width="18" height="18" viewBox="0 0 18 18" fill="none">
105
+ <circle cx="9" cy="9" r="4" stroke="currentColor" stroke-width="1.4"/>
106
+ <path d="M9 2v1.5M9 14.5V16M2 9h1.5M14.5 9H16M4.22 4.22l1.06 1.06M12.72 12.72l1.06 1.06M4.22 13.78l1.06-1.06M12.72 5.28l1.06-1.06" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
107
+ </svg>
108
+ <svg x-show="darkMode" width="18" height="18" viewBox="0 0 18 18" fill="none">
109
+ <path d="M9 3V2M9 16v-1M3 9H2M16 9h-1M4.22 4.22l-.7-.7M14.48 14.48l-.7-.7M4.22 13.78l-.7.7M14.48 3.52l-.7.7" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/>
110
+ <circle cx="9" cy="9" r="3.5" stroke="currentColor" stroke-width="1.3"/>
111
+ </svg>
112
+ </button>
133
113
  </div>
134
- </header>
114
+ </header>
@@ -1,46 +1,76 @@
1
- <aside
2
- class="sidebar"
3
- x-show="sidebarVisible"
4
- x-transition
5
- :aria-hidden="!sidebarVisible"
6
- role="navigation"
7
- aria-label="Package navigation"
8
- >
9
- <div class="sidebar-header">
10
- <h2>Packages</h2>
11
- <div class="sidebar-actions">
12
- <button
13
- @click="expandAll()"
14
- class="icon-button"
15
- title="Expand all packages"
16
- aria-label="Expand all packages"
17
- >
18
- <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
19
- <polyline points="7 13 12 18 17 13"></polyline>
20
- <polyline points="7 6 12 11 17 6"></polyline>
21
- </svg>
22
- </button>
23
- <button
24
- @click="collapseAll()"
25
- class="icon-button"
26
- title="Collapse all packages"
27
- aria-label="Collapse all packages"
28
- >
29
- <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
30
- <polyline points="17 11 12 6 7 11"></polyline>
31
- <polyline points="17 18 12 13 7 18"></polyline>
1
+ <aside class="sidebar" :class="{ collapsed: !$store.app.sidebarVisible }">
2
+ <div class="sidebar-content">
3
+ <!-- Branding Header -->
4
+ <div class="sidebar-branding">
5
+ <span class="branding-logo">{{ lutamlIcon }}</span>
6
+ <div class="branding-text">
7
+ <span class="branding-title" x-text="JSON.parse(config).title || 'UML Model'"></span>
8
+ <span class="branding-subtitle">LutaML Browser</span>
9
+ </div>
10
+ </div>
11
+
12
+ <!-- Overview -->
13
+ <div class="sidebar-section" style="padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border-light);">
14
+ <button class="overview-btn" :class="{ active: currentView === 'welcome' }" @click="showWelcome()">
15
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
16
+ <path d="M2 7.5L8 2.5L14 7.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
17
+ <path d="M3 7.5V13.5C3 13.5 3 14 4 14H12C12 14 13 14 13 13.5V7.5" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
32
18
  </svg>
19
+ <span>Overview</span>
33
20
  </button>
34
21
  </div>
35
- </div>
36
22
 
37
- <div class="sidebar-content" x-data="packageTree">
38
- <template x-if="data && data.packageTree">
39
- <div x-data="renderTree(data.packageTree)" x-html="treeHtml"></div>
40
- </template>
23
+ <!-- Package Tree -->
24
+ <div class="sidebar-section" style="flex: 1; overflow: auto; padding: var(--space-3); border-bottom: none;">
25
+ <div class="section-header">
26
+ <span class="section-title">Packages</span>
27
+ <div style="display: flex; gap: 2px;">
28
+ <button @click="expandAll()" class="icon-btn" style="width: 22px; height: 22px;" title="Expand all">
29
+ <svg width="11" height="11" viewBox="0 0 12 12" fill="none"><path d="M2 4l4 4 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
30
+ </button>
31
+ <button @click="collapseAll()" class="icon-btn" style="width: 22px; height: 22px;" title="Collapse all">
32
+ <svg width="11" height="11" viewBox="0 0 12 12" fill="none"><path d="M2 8l4-4 4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
33
+ </button>
34
+ </div>
35
+ </div>
36
+
37
+ <div x-data="packageTree">
38
+ <template x-if="data && data.packageTree">
39
+ <div x-data="renderTree(data.packageTree)" x-html="treeHtml"></div>
40
+ </template>
41
+ <div x-show="!data" style="padding: var(--space-4); text-align: center; color: var(--text-muted); font-size: var(--text-sm);">
42
+ Loading...
43
+ </div>
44
+ </div>
45
+ </div>
46
+
47
+ <!-- Stats Grid -->
48
+ <div class="sidebar-section" style="background: var(--bg-primary); padding: var(--space-3) var(--space-4);">
49
+ <div class="stats-grid" x-show="data && data.metadata">
50
+ <div class="stat-item">
51
+ <span class="stat-value" x-text="data.metadata.statistics.packages"></span>
52
+ <span class="stat-label">Packages</span>
53
+ </div>
54
+ <div class="stat-item">
55
+ <span class="stat-value" x-text="data.metadata.statistics.classes"></span>
56
+ <span class="stat-label">Classes</span>
57
+ </div>
58
+ <div class="stat-item">
59
+ <span class="stat-value" x-text="data.metadata.statistics.associations"></span>
60
+ <span class="stat-label">Assoc</span>
61
+ </div>
62
+ </div>
63
+ </div>
41
64
 
42
- <div x-show="!data" class="sidebar-loading">
43
- <p>Loading packages...</p>
65
+ <!-- Footer -->
66
+ <div class="sidebar-footer">
67
+ <span class="lutaml-logo">{{ lutamlFullLogo }}</span>
68
+ <div style="display: flex; flex-direction: column; gap: 1px; min-width: 0;">
69
+ <span class="footer-text" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
70
+ Generated with <a href="https://github.com/lutaml/lutaml" target="_blank" rel="noopener">LutaML</a>
71
+ </span>
72
+ <span class="footer-text" x-show="data && data.metadata && data.metadata.generatedAt" x-text="data.metadata.generatedAt"></span>
73
+ </div>
44
74
  </div>
45
75
  </div>
46
- </aside>
76
+ </aside>
@@ -7,15 +7,20 @@
7
7
  <meta name="description" content="{{ config.description }}">
8
8
  <meta name="generator" content="{{ buildInfo.generator }}">
9
9
 
10
+ <!-- Google Fonts — Inter + JetBrains Mono -->
11
+ <link rel="preconnect" href="https://fonts.googleapis.com">
12
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
14
+
10
15
  <!-- Styles (external) -->
11
16
  <link rel="stylesheet" href="assets/styles.css">
12
17
  </head>
13
18
  <body>
14
19
  <div id="app" x-data="app" x-init="init()" :class="{ 'dark': darkMode }">
15
- {% include 'components/header' %}
20
+ {% include 'components/sidebar' %}
16
21
 
17
- <div class="main-layout">
18
- {% include 'components/sidebar' %}
22
+ <div class="main-content">
23
+ {% include 'components/header' %}
19
24
  {% include 'components/content' %}
20
25
  </div>
21
26
  </div>
@@ -23,11 +28,9 @@
23
28
  <!-- Data URLs (external JSON files{% if config.apiMode %} or API endpoints{% endif %}) -->
24
29
  <script>
25
30
  {% if config.apiMode %}
26
- // API mode: fetch from server endpoints
27
31
  window.UML_DATA_URL = '/api/data';
28
32
  window.SEARCH_INDEX_URL = '/api/search/index';
29
33
  {% else %}
30
- // Static mode: load from JSON files
31
34
  window.UML_DATA_URL = 'data/model.json';
32
35
  window.SEARCH_INDEX_URL = 'data/search.json';
33
36
  {% endif %}
@@ -43,4 +46,4 @@
43
46
  <!-- Application Scripts (external) -->
44
47
  <script src="assets/app.js"></script>
45
48
  </body>
46
- </html>
49
+ </html>
@@ -7,6 +7,11 @@
7
7
  <meta name="description" content="{{ config.description }}">
8
8
  <meta name="generator" content="{{ buildInfo.generator }}">
9
9
 
10
+ <!-- Google Fonts — Inter + JetBrains Mono -->
11
+ <link rel="preconnect" href="https://fonts.googleapis.com">
12
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
14
+
10
15
  <!-- Styles (embedded) -->
11
16
  <style>
12
17
  {{ styles }}
@@ -14,10 +19,10 @@
14
19
  </head>
15
20
  <body>
16
21
  <div id="app" x-data="app" x-init="init()" :class="{ 'dark': darkMode }">
17
- {{ header }}
22
+ {{ sidebar }}
18
23
 
19
- <div class="main-layout">
20
- {{ sidebar }}
24
+ <div class="main-content">
25
+ {{ header }}
21
26
  {{ content }}
22
27
  </div>
23
28
  </div>
@@ -49,4 +54,4 @@
49
54
  {{ scripts }}
50
55
  </script>
51
56
  </body>
52
- </html>
57
+ </html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.7
4
+ version: 0.10.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -948,6 +948,8 @@ files:
948
948
  - lib/lutaml/xml/parsers/xml.rb
949
949
  - lutaml.gemspec
950
950
  - plateau_all_packages.lur
951
+ - templates/static_site/assets/images/lutaml-full.svg
952
+ - templates/static_site/assets/images/lutaml-icon.svg
951
953
  - templates/static_site/assets/scripts/app.js
952
954
  - templates/static_site/assets/scripts/core/state.js
953
955
  - templates/static_site/assets/scripts/core/utils.js