@qaecy/cue-ui 0.0.3 → 0.0.4

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 CHANGED
@@ -1,16 +1,16 @@
1
- # @qaecy/ui
1
+ # @qaecy/cue-ui
2
2
 
3
3
  Framework-agnostic web components for the [QAECY Cue platform](https://qaecy.com).
4
4
  Drop them into any HTML page — no build step required.
5
5
 
6
6
  ## Components
7
7
 
8
- | Custom element | Import path | Description |
9
- | ------------------------ | --------------------------- | --------------------------------------------------------------------------------- |
10
- | `<cue-card>` | `@qaecy/ui/card` | Reusable card container with variants, padding, and optional shadow |
11
- | `<cue-logo>` | `@qaecy/ui/logo` | Animated QAECY logo |
12
- | `<cue-document-list-wc>` | `@qaecy/ui/document-list` | Lazy document list that fetches metadata internally from Cue SDK state |
13
- | `<cue-document-viewer>` | `@qaecy/ui/document-viewer` | Document viewer with Cue SDK integration (PDF, BIM, CAD, images, spreadsheets, …) |
8
+ | Custom element | Import path | Description |
9
+ | ----------------------- | ------------------------------- | --------------------------------------------------------------------------------- |
10
+ | `<cue-card>` | `@qaecy/cue-ui/card` | Reusable card container with variants, padding, and optional shadow |
11
+ | `<cue-logo>` | `@qaecy/cue-ui/logo` | Animated QAECY logo |
12
+ | `<cue-document-list>` | `@qaecy/cue-ui/document-list` | Lazy document list that fetches metadata internally from Cue SDK state |
13
+ | `<cue-document-viewer>` | `@qaecy/cue-ui/document-viewer` | Document viewer with Cue SDK integration (PDF, BIM, CAD, images, spreadsheets, …) |
14
14
 
15
15
  ---
16
16
 
@@ -48,7 +48,7 @@ Both components and the Cue SDK are available on [jsDelivr](https://www.jsdelivr
48
48
  <div id="viewer-host" style="flex:1; display:contents;"></div>
49
49
 
50
50
  <!-- 1. Zone.js (Angular runtime requirement) -->
51
- <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/document-viewer/polyfills.js"></script>
51
+ <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/document-viewer/polyfills.js"></script>
52
52
 
53
53
  <!-- 2. Cue SDK -->
54
54
  <script type="module">
@@ -60,16 +60,16 @@ Both components and the Cue SDK are available on [jsDelivr](https://www.jsdelivr
60
60
 
61
61
  // 4. Mount the logo web component
62
62
  const logoPolyfills = document.createElement('script');
63
- logoPolyfills.src = 'https://cdn.jsdelivr.net/npm/@qaecy/ui/logo/polyfills.js';
63
+ logoPolyfills.src = 'https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/logo/polyfills.js';
64
64
  document.head.appendChild(logoPolyfills);
65
65
 
66
66
  const logoScript = document.createElement('script');
67
- logoScript.src = 'https://cdn.jsdelivr.net/npm/@qaecy/ui/logo/main.js';
67
+ logoScript.src = 'https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/logo/main.js';
68
68
  document.head.appendChild(logoScript);
69
69
 
70
70
  // 5. Mount the document viewer
71
71
  const dvScript = document.createElement('script');
72
- dvScript.src = 'https://cdn.jsdelivr.net/npm/@qaecy/ui/document-viewer/main.js';
72
+ dvScript.src = 'https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/document-viewer/main.js';
73
73
  dvScript.onload = () => {
74
74
  customElements.whenDefined('cue-document-viewer').then(() => {
75
75
  const viewer = document.createElement('cue-document-viewer');
@@ -114,8 +114,8 @@ Renders the animated QAECY logo. Adapts automatically to light/dark mode.
114
114
  > **Script tags needed**
115
115
  >
116
116
  > ```html
117
- > <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/logo/polyfills.js"></script>
118
- > <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/logo/main.js"></script>
117
+ > <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/logo/polyfills.js"></script>
118
+ > <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/logo/main.js"></script>
119
119
  > ```
120
120
 
121
121
  ---
@@ -142,9 +142,9 @@ Renders the core Cue card container as a standalone web component.
142
142
  > **Script tags needed**
143
143
  >
144
144
  > ```html
145
- > <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/card/polyfills.js"></script>
146
- > <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/card/main.js"></script>
147
- > <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@qaecy/ui/card/styles.css" />
145
+ > <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/card/polyfills.js"></script>
146
+ > <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/card/main.js"></script>
147
+ > <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/card/styles.css" />
148
148
  > ```
149
149
 
150
150
  ---
@@ -167,14 +167,17 @@ Supported file types: PDF, IFC/BIM, DXF/CAD, images (PNG, JPG, SVG, …), Markdo
167
167
  > **Script tags needed**
168
168
  >
169
169
  > ```html
170
- > <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/document-viewer/polyfills.js"></script>
171
- > <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/document-viewer/main.js"></script>
172
- > <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@qaecy/ui/document-viewer/styles.css" />
170
+ > <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/document-viewer/polyfills.js"></script>
171
+ > <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/document-viewer/main.js"></script>
172
+ > <link
173
+ > rel="stylesheet"
174
+ > href="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/document-viewer/styles.css"
175
+ > />
173
176
  > ```
174
177
 
175
178
  ---
176
179
 
177
- ## `<cue-document-list-wc>`
180
+ ## `<cue-document-list>`
178
181
 
179
182
  Renders a lazy-loaded document table. Pass a `projectId`, `uuids`, and `sdkState`; the component requests metadata and categories internally.
180
183
 
@@ -199,7 +202,7 @@ The component emits the same row click outputs as the internal document list (`c
199
202
  Custom menu items are appended after the standard ones:
200
203
 
201
204
  ```js
202
- const list = document.querySelector('cue-document-list-wc');
205
+ const list = document.querySelector('cue-document-list');
203
206
 
204
207
  list.customMenuItems = [
205
208
  {
@@ -222,9 +225,12 @@ list.customMenuItems = [
222
225
  > **Script tags needed**
223
226
  >
224
227
  > ```html
225
- > <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/document-list/polyfills.js"></script>
226
- > <script src="https://cdn.jsdelivr.net/npm/@qaecy/ui/document-list/main.js"></script>
227
- > <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@qaecy/ui/document-list/styles.css" />
228
+ > <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/document-list/polyfills.js"></script>
229
+ > <script src="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/document-list/main.js"></script>
230
+ > <link
231
+ > rel="stylesheet"
232
+ > href="https://cdn.jsdelivr.net/npm/@qaecy/cue-ui/document-list/styles.css"
233
+ > />
228
234
  > ```
229
235
 
230
236
  ---
@@ -243,14 +249,14 @@ await cue.auth.signIn('google'); // or 'microsoft', 'email', etc.
243
249
  When using npm:
244
250
 
245
251
  ```bash
246
- npm install @qaecy/cue-sdk @qaecy/ui
252
+ npm install @qaecy/cue-sdk @qaecy/cue-ui
247
253
  ```
248
254
 
249
255
  ```js
250
256
  import { Cue } from '@qaecy/cue-sdk';
251
- import '@qaecy/ui/card';
252
- import '@qaecy/ui/document-viewer';
253
- import '@qaecy/ui/logo';
257
+ import '@qaecy/cue-ui/card';
258
+ import '@qaecy/cue-ui/document-viewer';
259
+ import '@qaecy/cue-ui/logo';
254
260
  ```
255
261
 
256
262
  ---
@@ -273,7 +273,7 @@
273
273
  overflow: auto;
274
274
  }
275
275
 
276
- cue-document-list-wc {
276
+ cue-document-list {
277
277
  display: block;
278
278
  width: 100%;
279
279
  min-height: 480px;
@@ -350,7 +350,7 @@
350
350
  <main id="list-area">
351
351
  <div id="toolbar">Select a project to load documents.</div>
352
352
  <div id="list-wrapper">
353
- <cue-document-list-wc id="doc-list"></cue-document-list-wc>
353
+ <cue-document-list id="doc-list"></cue-document-list>
354
354
  </div>
355
355
  </main>
356
356
  </div>
@@ -358,11 +358,11 @@
358
358
  <script type="module">
359
359
  window.addEventListener('load', () => {
360
360
  setTimeout(() => {
361
- if (customElements.get('cue-document-list-wc')) {
362
- console.log('[demo] cue-document-list-wc registered OK');
361
+ if (customElements.get('cue-document-list')) {
362
+ console.log('[demo] cue-document-list registered OK');
363
363
  } else {
364
364
  console.error(
365
- '[demo] cue-document-list-wc NOT registered after 4 s. Check runtime.js/polyfills.js/main.js loads.'
365
+ '[demo] cue-document-list NOT registered after 4 s. Check runtime.js/polyfills.js/main.js loads.'
366
366
  );
367
367
  }
368
368
  }, 4000);
@@ -423,7 +423,7 @@
423
423
  const list = $('doc-list');
424
424
  if (!list || !activeProjectId) return;
425
425
 
426
- await customElements.whenDefined('cue-document-list-wc');
426
+ await customElements.whenDefined('cue-document-list');
427
427
  list.projectId = activeProjectId;
428
428
  list.uuids = shownDocs.map((doc) => doc.uuid);
429
429
  list.sdkState = { cue, language: cue.api.language || 'en' };