@cnrai/pave 0.11.107 → 0.11.109

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.
Files changed (80) hide show
  1. package/package.json +1 -1
  2. package/pave.js +2 -1
  3. package/web/apple-touch-icon.png +0 -0
  4. package/web/assets/abnfDiagram-VCTEODGH-CC-xFYNg.js +1 -0
  5. package/web/assets/arc-BcCUbsSP.js +1 -0
  6. package/web/assets/architectureDiagram-5GKGNRK7-CyQSqHig.js +36 -0
  7. package/web/assets/blockDiagram-I7D4REHJ-CJ91dcD6.js +129 -0
  8. package/web/assets/c4Diagram-7LVT6UL2-D_-X7Yjr.js +38 -0
  9. package/web/assets/channel-CEjU4fDa.js +1 -0
  10. package/web/assets/chunk-2Q5K7J3B-C6gOro1m.js +1 -0
  11. package/web/assets/chunk-5VM5RSS4-CGRJglaM.js +15 -0
  12. package/web/assets/chunk-F27PBJKO-UOTghLZP.js +1 -0
  13. package/web/assets/chunk-IMKFNOWR-C0b-G0_V.js +231 -0
  14. package/web/assets/chunk-JWPE2WC7-Di_kgSVz.js +1 -0
  15. package/web/assets/chunk-POPQ4Y6H-C4nqNNN7.js +1 -0
  16. package/web/assets/chunk-SVP7TREG-DU6uDevm.js +88 -0
  17. package/web/assets/chunk-TICWLB2K-4vOTFWBb.js +206 -0
  18. package/web/assets/chunk-XXDRQBXY-DTOcYtq8.js +1 -0
  19. package/web/assets/classDiagram-ZZMXUADV-E-NgWlu-.js +1 -0
  20. package/web/assets/classDiagram-v2-VYDZK3BY-E-NgWlu-.js +1 -0
  21. package/web/assets/cose-bilkent-JH36ORCC-CdWw2GLP.js +1 -0
  22. package/web/assets/cynefin-OW5HDTMX-Blt6fqKS.js +178 -0
  23. package/web/assets/cynefinDiagram-5FMLGOSQ-D9qoRKTN.js +62 -0
  24. package/web/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
  25. package/web/assets/dagre-GXQ25YYZ-CC-1na9O.js +4 -0
  26. package/web/assets/defaultLocale-DX6XiGOO.js +1 -0
  27. package/web/assets/diagram-S7CK7UJ4-Df-CWY8A.js +30 -0
  28. package/web/assets/diagram-UQ7AKVKN-aW8Ek_JV.js +41 -0
  29. package/web/assets/diagram-VSXAHHWV-B6xr9JII.js +3 -0
  30. package/web/assets/diagram-VX7I27RA-DWIu_d6p.js +24 -0
  31. package/web/assets/diagram-Z3DM3KII-EXgUmMTe.js +24 -0
  32. package/web/assets/ebnfDiagram-PWID7BFC-CBOMqJHL.js +1 -0
  33. package/web/assets/erDiagram-RLTQ6QDP-BF3gbnFL.js +99 -0
  34. package/web/assets/flowDiagram-HODETNUW-7J0X-4Nv.js +168 -0
  35. package/web/assets/ganttDiagram-EL5Y4UJY-BpmyN_um.js +292 -0
  36. package/web/assets/gitGraphDiagram-WWUBYQGX-DIRj87w-.js +106 -0
  37. package/web/assets/index-CXCEwDUr.js +130 -0
  38. package/web/assets/index-Dnk1ymJh.css +10 -0
  39. package/web/assets/infoDiagram-27XIBGKW-DtRkk-vx.js +2 -0
  40. package/web/assets/init-Gi6I4Gst.js +1 -0
  41. package/web/assets/ishikawaDiagram-5VMMS53U-BIgfj1dB.js +70 -0
  42. package/web/assets/journeyDiagram-3NMN7TZE-DMq06vMx.js +139 -0
  43. package/web/assets/kanban-definition-UXKFOSKX-BkqsW8j9.js +89 -0
  44. package/web/assets/katex-C5jXJg4s.js +257 -0
  45. package/web/assets/layout-981Tzerw.js +1 -0
  46. package/web/assets/linear-4S4e-iAF.js +1 -0
  47. package/web/assets/mermaid.core-DMFcbM4K.js +310 -0
  48. package/web/assets/mindmap-definition-YA3MSWOX-D8ZZIE_M.js +96 -0
  49. package/web/assets/ordinal-Cboi1Yqb.js +1 -0
  50. package/web/assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm +0 -0
  51. package/web/assets/pegDiagram-XKGWAZYB-B8laLHQf.js +1 -0
  52. package/web/assets/pieDiagram-E7YTZNPT-BRvCWlLN.js +39 -0
  53. package/web/assets/quadrantDiagram-AXDQQJYC-CN57k84W.js +7 -0
  54. package/web/assets/railroadDiagram-O6MQD6OU-DlW8247Y.js +1 -0
  55. package/web/assets/requirementDiagram-BXWQKSXE-lt5wlCYl.js +84 -0
  56. package/web/assets/sankeyDiagram-P5KCCOFB-C_RfLG0h.js +40 -0
  57. package/web/assets/sequenceDiagram-WJ2MYXX4-xYFGXmlV.js +162 -0
  58. package/web/assets/sizeCapture-INFHLROL-ClbfSNGT.js +1 -0
  59. package/web/assets/stateDiagram-D77RDMKH-D-js6COB.js +1 -0
  60. package/web/assets/stateDiagram-v2-MP3YSRHH-DGfvbiyu.js +1 -0
  61. package/web/assets/swimlanes-42K2YHIH-DFWAuiLv.js +1 -0
  62. package/web/assets/swimlanesDiagram-VR7AAH4N-B0BGIkSi.js +8 -0
  63. package/web/assets/timeline-definition-24CTP7MA-BxiETTFR.js +120 -0
  64. package/web/assets/transformers.web-DbavpRy-.js +2896 -0
  65. package/web/assets/vennDiagram-4TSXK5OY-DH4jDRVe.js +34 -0
  66. package/web/assets/wardleyDiagram-VM6X3IG4-Dnf37haz.js +78 -0
  67. package/web/assets/whisper-worker-g42TWo_4.js +1 -0
  68. package/web/assets/xychartDiagram-S5SC5T6Z-JHevdcLS.js +7 -0
  69. package/web/assets/zh-TW-BuoM8LhP.js +1 -0
  70. package/web/favicon-32x32.png +0 -0
  71. package/web/fonts/OFL.txt +92 -0
  72. package/web/fonts/inter-var-latin.woff2 +0 -0
  73. package/web/icon-192x192.png +0 -0
  74. package/web/icon-512x512.png +0 -0
  75. package/web/icon-maskable-512x512.png +0 -0
  76. package/web/index.html +16 -0
  77. package/web/manifest.json +27 -0
  78. package/web/pave-logo-dark.png +0 -0
  79. package/web/pave-logo-light.png +0 -0
  80. package/web/sw.js +164 -0
@@ -0,0 +1,92 @@
1
+ Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+ -----------------------------------------------------------
8
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9
+ -----------------------------------------------------------
10
+
11
+ PREAMBLE
12
+ The goals of the Open Font License (OFL) are to stimulate worldwide
13
+ development of collaborative font projects, to support the font creation
14
+ efforts of academic and linguistic communities, and to provide a free and
15
+ open framework in which fonts may be shared and improved in partnership
16
+ with others.
17
+
18
+ The OFL allows the licensed fonts to be used, studied, modified and
19
+ redistributed freely as long as they are not sold by themselves. The
20
+ fonts, including any derivative works, can be bundled, embedded,
21
+ redistributed and/or sold with any software provided that any reserved
22
+ names are not used by derivative works. The fonts and derivatives,
23
+ however, cannot be released under any other type of license. The
24
+ requirement for fonts to remain under this license does not apply
25
+ to any document created using the fonts or their derivatives.
26
+
27
+ DEFINITIONS
28
+ "Font Software" refers to the set of files released by the Copyright
29
+ Holder(s) under this license and clearly marked as such. This may
30
+ include source files, build scripts and documentation.
31
+
32
+ "Reserved Font Name" refers to any names specified as such after the
33
+ copyright statement(s).
34
+
35
+ "Original Version" refers to the collection of Font Software components as
36
+ distributed by the Copyright Holder(s).
37
+
38
+ "Modified Version" refers to any derivative made by adding to, deleting,
39
+ or substituting -- in part or in whole -- any of the components of the
40
+ Original Version, by changing formats or by porting the Font Software to a
41
+ new environment.
42
+
43
+ "Author" refers to any designer, engineer, programmer, technical
44
+ writer or other person who contributed to the Font Software.
45
+
46
+ PERMISSION AND CONDITIONS
47
+ Permission is hereby granted, free of charge, to any person obtaining
48
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
49
+ redistribute, and sell modified and unmodified copies of the Font
50
+ Software, subject to the following conditions:
51
+
52
+ 1) Neither the Font Software nor any of its individual components,
53
+ in Original or Modified Versions, may be sold by itself.
54
+
55
+ 2) Original or Modified Versions of the Font Software may be bundled,
56
+ redistributed and/or sold with any software, provided that each copy
57
+ contains the above copyright notice and this license. These can be
58
+ included either as stand-alone text files, human-readable headers or
59
+ in the appropriate machine-readable metadata fields within text or
60
+ binary files as long as those fields can be easily viewed by the user.
61
+
62
+ 3) No Modified Version of the Font Software may use the Reserved Font
63
+ Name(s) unless explicit written permission is granted by the corresponding
64
+ Copyright Holder. This restriction only applies to the primary font name as
65
+ presented to the users.
66
+
67
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
68
+ Software shall not be used to promote, endorse or advertise any
69
+ Modified Version, except to acknowledge the contribution(s) of the
70
+ Copyright Holder(s) and the Author(s) or with their explicit written
71
+ permission.
72
+
73
+ 5) The Font Software, modified or unmodified, in part or in whole,
74
+ must be distributed entirely under this license, and must not be
75
+ distributed under any other license. The requirement for fonts to
76
+ remain under this license does not apply to any document created
77
+ using the Font Software.
78
+
79
+ TERMINATION
80
+ This license becomes null and void if any of the above conditions are
81
+ not met.
82
+
83
+ DISCLAIMER
84
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
85
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
86
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
87
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
88
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
89
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
90
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
91
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
92
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
Binary file
Binary file
Binary file
package/web/index.html ADDED
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
6
+ <title>PAVE</title>
7
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
8
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
9
+ <link rel="manifest" href="/manifest.json" />
10
+ <script type="module" crossorigin src="/assets/index-CXCEwDUr.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-Dnk1ymJh.css">
12
+ </head>
13
+ <body class="bg-white dark:bg-gray-950 text-gray-900 dark:text-gray-100">
14
+ <div id="root"></div>
15
+ </body>
16
+ </html>
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "PAVE",
3
+ "short_name": "PAVE",
4
+ "description": "Personal AI Virtual Environment",
5
+ "start_url": "/",
6
+ "display": "standalone",
7
+ "background_color": "#111827",
8
+ "theme_color": "#4f46e5",
9
+ "icons": [
10
+ {
11
+ "src": "/icon-192x192.png",
12
+ "sizes": "192x192",
13
+ "type": "image/png"
14
+ },
15
+ {
16
+ "src": "/icon-512x512.png",
17
+ "sizes": "512x512",
18
+ "type": "image/png"
19
+ },
20
+ {
21
+ "src": "/icon-maskable-512x512.png",
22
+ "sizes": "512x512",
23
+ "type": "image/png",
24
+ "purpose": "maskable"
25
+ }
26
+ ]
27
+ }
Binary file
Binary file
package/web/sw.js ADDED
@@ -0,0 +1,164 @@
1
+ /* eslint-env serviceworker */
2
+ /**
3
+ * PAVE Service Worker — Web Push Notifications
4
+ *
5
+ * Handles push events for iOS Safari PWA and desktop browsers.
6
+ * When the app is in the background or the device is locked, the Service
7
+ * Worker receives the push and displays a system notification.
8
+ *
9
+ * On notification click, focuses or opens the PWA and navigates to the
10
+ * relevant session.
11
+ */
12
+
13
+ // ─── Push Event ───────────────────────────────────────────────────
14
+
15
+ self.addEventListener('push', (event) => {
16
+ let payload;
17
+ try {
18
+ payload = event.data ? event.data.json() : {};
19
+ } catch (e) {
20
+ payload = { title: 'PAVE', body: event.data ? event.data.text() : 'New notification' };
21
+ }
22
+
23
+ const title = payload.title || 'PAVE';
24
+ const options = {
25
+ body: payload.body || '',
26
+ icon: payload.icon || '/pave-logo-light.png',
27
+ badge: '/pave-logo-light.png',
28
+ tag: payload.tag || 'pave-notification',
29
+ data: {
30
+ url: payload.url || '/',
31
+ sessionId: payload.sessionId || null,
32
+ },
33
+ // vibrate on mobile if supported
34
+ vibrate: [100],
35
+ };
36
+
37
+ event.waitUntil(
38
+ self.registration.showNotification(title, options),
39
+ );
40
+ });
41
+
42
+ // ─── Notification Click ───────────────────────────────────────────
43
+
44
+ /**
45
+ * Write sessionId to IndexedDB as a backup communication channel.
46
+ * On iOS PWA, postMessage to a backgrounded client is lost — the page's
47
+ * JS thread is suspended. IndexedDB is available from the SW and persists
48
+ * until the page reads and clears it on visibilitychange. (#1375)
49
+ */
50
+ function writePendingNav(sessionId) {
51
+ return new Promise((resolve) => {
52
+ if (!sessionId) return resolve();
53
+ try {
54
+ const req = indexedDB.open('pave-sw', 1);
55
+ req.onupgradeneeded = function () {
56
+ req.result.createObjectStore('pave-pending-nav');
57
+ };
58
+ req.onsuccess = function () {
59
+ const db = req.result;
60
+ const tx = db.transaction('pave-pending-nav', 'readwrite');
61
+ tx.objectStore('pave-pending-nav').put(sessionId, 'sessionId');
62
+ tx.oncomplete = function () { db.close(); resolve(); };
63
+ tx.onerror = function () { db.close(); resolve(); };
64
+ };
65
+ req.onerror = function () { resolve(); };
66
+ } catch (e) {
67
+ resolve(); // non-fatal
68
+ }
69
+ });
70
+ }
71
+
72
+ self.addEventListener('notificationclick', (event) => {
73
+ event.notification.close();
74
+
75
+ const notifData = (event.notification && event.notification.data) || {};
76
+ let targetUrl = notifData.url || '/';
77
+ const sessionId = notifData.sessionId || null;
78
+
79
+ // Issue #1208: If sessionId is present, ensure the URL targets that session.
80
+ // The server already includes the session in the url, but this provides
81
+ // a fallback in case the url was overridden or missing.
82
+ if (sessionId && targetUrl.indexOf('session=') === -1) {
83
+ targetUrl = '/?session=' + sessionId;
84
+ }
85
+
86
+ // Resolve URL relative to the SW scope
87
+ if (targetUrl.charAt(0) === '/') {
88
+ targetUrl = self.registration.scope + targetUrl.replace(/^\//, '');
89
+ }
90
+
91
+ // Issue #1217: Build a relaxed origin+path for matching existing clients.
92
+ // The exact targetUrl includes ?session= which existing client URLs won't have.
93
+ let targetPath;
94
+ try {
95
+ targetPath = new URL(targetUrl).pathname;
96
+ } catch {
97
+ targetPath = '/';
98
+ }
99
+
100
+ event.waitUntil(
101
+ // #1375: Write to IndexedDB FIRST — this is the reliable backup channel
102
+ // for iOS PWA where postMessage is lost on suspended pages.
103
+ writePendingNav(sessionId).then(() =>
104
+ self.clients.matchAll({ type: 'window', includeUncontrolled: true }).then((clientList) => {
105
+ // Issue #1217: Use relaxed URL matching — compare origin+path, not the
106
+ // full URL with query params. Existing client URLs rarely have ?session=.
107
+ for (let i = 0; i < clientList.length; i++) {
108
+ const client = clientList[i];
109
+ try {
110
+ const clientUrl = new URL(client.url);
111
+ if (clientUrl.pathname === targetPath && 'focus' in client) {
112
+ // Issue #1377: postMessage unconditionally — when the PWA is already
113
+ // foregrounded, focus() rejects (already focused) and .catch()
114
+ // swallows it, so postMessage inside .then() never executes.
115
+ // The IndexedDB path (#1375) handles the backgrounded case.
116
+ if (sessionId) {
117
+ client.postMessage({ type: 'navigate-session', sessionId });
118
+ }
119
+ return client.focus().catch(() => {});
120
+ }
121
+ } catch {
122
+ // URL parse failure — skip this client
123
+ }
124
+ }
125
+ // Try to find any PAVE window and navigate it
126
+ for (let j = 0; j < clientList.length; j++) {
127
+ const c = clientList[j];
128
+ if ('focus' in c && 'navigate' in c) {
129
+ c.navigate(targetUrl);
130
+ return c.focus().catch(() => {});
131
+ }
132
+ }
133
+ // Issue #1217: iOS Safari PWA fallback — navigate() is unavailable.
134
+ // postMessage the first available window to switch sessions.
135
+ if (sessionId && clientList.length > 0) {
136
+ for (let k = 0; k < clientList.length; k++) {
137
+ if ('focus' in clientList[k]) {
138
+ // Issue #1377: postMessage unconditionally (see above).
139
+ if (sessionId) {
140
+ clientList[k].postMessage({ type: 'navigate-session', sessionId });
141
+ }
142
+ return clientList[k].focus().catch(() => {});
143
+ }
144
+ }
145
+ }
146
+ // No existing window — open a new one
147
+ if (self.clients.openWindow) {
148
+ return self.clients.openWindow(targetUrl);
149
+ }
150
+ })),
151
+ );
152
+ });
153
+
154
+ // ─── Install / Activate ───────────────────────────────────────────
155
+
156
+ self.addEventListener('install', (event) => {
157
+ // Skip waiting so the SW activates immediately on first install
158
+ self.skipWaiting();
159
+ });
160
+
161
+ self.addEventListener('activate', (event) => {
162
+ // Take control of all clients immediately
163
+ event.waitUntil(self.clients.claim());
164
+ });