@codrihub/memora 1.3.7 → 2.0.0
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/LICENSE +661 -21
- package/NOTICE +23 -0
- package/README.md +3 -2
- package/assets/app.js +6069 -3887
- package/assets/index.html +68 -51
- package/assets/login.html +113 -66
- package/assets/offline.html +72 -21
- package/assets/style.css +1 -1
- package/assets/sw.js +29 -6
- package/package.json +8 -7
package/assets/offline.html
CHANGED
|
@@ -1,39 +1,90 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<!-- Generated by web/scripts/build-pages.mjs. Do not edit. -->
|
|
3
|
-
<html lang="en">
|
|
3
|
+
<html lang="en" data-theme="dark">
|
|
4
4
|
<head>
|
|
5
|
+
<script>(function(){var d=document.documentElement,p='system',q=null;
|
|
6
|
+
try{q=new URLSearchParams(location.search).get('theme')}catch(e){}
|
|
7
|
+
try{var v=localStorage.getItem('memora.theme');if(v==='dark'||v==='light'||v==='system')p=v}catch(e){}
|
|
8
|
+
if(q==='dark'||q==='light'||q==='system')p=q;
|
|
9
|
+
var m=window.matchMedia?matchMedia('(prefers-color-scheme: light)'):null;
|
|
10
|
+
function a(){var t=p==='system'?(m&&m.matches?'light':'dark'):p;d.setAttribute('data-theme',t);d.style.colorScheme=t;
|
|
11
|
+
var c=document.querySelector('meta[name=theme-color]');if(c)c.setAttribute('content',t==='light'?'#f3f5f9':'#0b0e14')}
|
|
12
|
+
a();document.addEventListener('DOMContentLoaded',a);if(p==='system'&&m){try{m.addEventListener('change',a)}catch(e){m.addListener&&m.addListener(a)}}})();</script>
|
|
5
13
|
<meta charset="utf-8">
|
|
6
14
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
-
<meta name="color-scheme" content="dark">
|
|
15
|
+
<meta name="color-scheme" content="dark light">
|
|
8
16
|
<meta name="theme-color" content="#0b0e14">
|
|
9
17
|
<meta name="robots" content="noindex,nofollow,noarchive,nosnippet,noimageindex">
|
|
10
|
-
<meta http-equiv="refresh" content="
|
|
18
|
+
<noscript><meta http-equiv="refresh" content="15"></noscript>
|
|
11
19
|
<title>Offline · Memora</title>
|
|
12
20
|
<link rel="manifest" href="/manifest.webmanifest">
|
|
13
21
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
|
14
22
|
<style>
|
|
15
|
-
:root{ --bg:#
|
|
23
|
+
:root{ --bg:#07090e; --panel:#0d1118; --line:#1f2633; --fg:#e6e9ef; --muted:#8b98ad; --primary:#22d3ee; --on-primary:#04221e; --dotc:rgba(148,163,184,.10) }
|
|
24
|
+
:root[data-theme="light"]{ --bg:#f4f6fa; --panel:#ffffff; --line:#e1e6ee; --fg:#111827; --muted:#5b6678; --primary:#0e7490; --on-primary:#ffffff; --dotc:rgba(15,23,42,.07) }
|
|
16
25
|
*{box-sizing:border-box}
|
|
17
|
-
body{margin:0;min-height:100vh;display:grid;place-items:center;
|
|
18
|
-
font:15px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
body{margin:0;min-height:100vh;min-height:100dvh;display:grid;place-items:center;color:var(--fg);padding:24px 16px;
|
|
27
|
+
font:15px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
|
|
28
|
+
background:radial-gradient(var(--dotc) 1px,transparent 1.2px) 0 0/22px 22px,var(--bg)}
|
|
29
|
+
.card{max-width:440px;width:100%;text-align:center}
|
|
30
|
+
.beacon{position:relative;width:88px;height:88px;margin:0 auto 26px;display:grid;place-items:center}
|
|
31
|
+
.beacon::before,.beacon::after{content:"";position:absolute;inset:0;border-radius:26px;border:1px solid rgba(94,234,212,.45);animation:ripple 2.4s ease-out infinite}
|
|
32
|
+
.beacon::after{animation-delay:1.2s}
|
|
33
|
+
.mark{position:relative;width:64px;height:64px;display:block}
|
|
34
|
+
@keyframes ripple{from{transform:scale(1);opacity:.8}to{transform:scale(1.7);opacity:0}}
|
|
35
|
+
h1{font-size:26px;font-weight:650;letter-spacing:-.02em;margin:0 0 10px}
|
|
36
|
+
p{margin:0 auto 22px;max-width:380px;color:var(--muted);font-size:15px}
|
|
37
|
+
.status{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 14px;margin:0 0 22px;border-radius:99px;font-size:13px;
|
|
38
|
+
background:var(--panel);border:1px solid var(--line);color:var(--fg);font-variant-numeric:tabular-nums}
|
|
39
|
+
.status i{width:7px;height:7px;border-radius:50%;background:#f59e0b;animation:pulse 1.6s ease-in-out infinite}
|
|
40
|
+
@keyframes pulse{50%{opacity:.35}}
|
|
41
|
+
.acts{display:flex;justify-content:center}
|
|
42
|
+
button{appearance:none;border:0;background:var(--primary);color:var(--on-primary);font:inherit;font-weight:600;min-height:46px;min-width:180px;
|
|
43
|
+
padding:10px 22px;border-radius:12px;cursor:pointer;transition:filter .15s,transform .1s}
|
|
44
|
+
button:hover:not(:disabled){filter:brightness(1.07)}
|
|
45
|
+
button:active:not(:disabled){transform:scale(.98)}
|
|
46
|
+
button:disabled{opacity:.6;cursor:default}
|
|
47
|
+
button:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
|
|
48
|
+
.hint{margin-top:28px;font-size:12px;color:var(--muted)}
|
|
49
|
+
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
|
|
50
|
+
@media (prefers-reduced-motion:reduce){.status i,.beacon::before,.beacon::after{animation:none}}
|
|
28
51
|
</style>
|
|
29
52
|
</head>
|
|
30
53
|
<body>
|
|
31
|
-
<
|
|
32
|
-
<svg class="mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="
|
|
33
|
-
<h1>
|
|
34
|
-
<p>
|
|
35
|
-
<
|
|
54
|
+
<main class="card">
|
|
55
|
+
<div class="beacon"><svg class="mark" viewBox="0 0 24 24" aria-hidden="true"><defs><linearGradient id="mmgs7" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#5eead4"/><stop offset="1" stop-color="#22d3ee"/></linearGradient><linearGradient id="mmts7" x1="0" y1="0" x2="0" y2="24" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#17202e"/><stop offset="1" stop-color="#0b0f17"/></linearGradient><radialGradient id="mmcs7" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#ffffff"/><stop offset=".55" stop-color="#a5f3fc"/><stop offset="1" stop-color="#22d3ee"/></radialGradient></defs><g fill="none" stroke="none"><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="url(#mmts7)"/><rect x="1.5" y="1.5" width="21" height="21" rx="6.2" fill="none" stroke="url(#mmgs7)" stroke-opacity=".55" stroke-width=".8"/><path d="M7.2 16.8V7.4l4.8 5.1 4.8-5.1v9.4" fill="none" stroke="url(#mmgs7)" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/><circle cx="7.2" cy="16.8" r="1.7" fill="#5eead4"/><circle cx="7.2" cy="7.4" r="1.7" fill="#5eead4"/><circle cx="16.8" cy="7.4" r="1.7" fill="#22d3ee"/><circle cx="16.8" cy="16.8" r="1.7" fill="#22d3ee"/><circle cx="12" cy="12.5" r="3" fill="#22d3ee" opacity=".22"/><circle cx="12" cy="12.5" r="2" fill="url(#mmcs7)"/></g></svg></div>
|
|
56
|
+
<h1>Can't reach Memora</h1>
|
|
57
|
+
<p>Your internet connection or the Memora server is down. Your notes are safe on the server; this page opens again by itself once it can reach it.</p>
|
|
58
|
+
<div class="status" aria-hidden="true"><i></i><span id="msg">Trying again shortly…</span></div>
|
|
59
|
+
<div class="sr" id="sr" role="status"></div>
|
|
60
|
+
<div class="acts"><button type="button" id="retry">Try now</button></div>
|
|
36
61
|
<div class="hint">Memora by Codrihub Tech</div>
|
|
37
|
-
</
|
|
62
|
+
</main>
|
|
63
|
+
<script>(function(){
|
|
64
|
+
var steps=[5,10,20,30],n=0,left=0,timer=null,busy=false;
|
|
65
|
+
var msg=document.getElementById('msg'),sr=document.getElementById('sr'),btn=document.getElementById('retry');
|
|
66
|
+
function show(t,a){msg.textContent=t;if(a)sr.textContent=a===true?t:a}
|
|
67
|
+
function wait(){
|
|
68
|
+
left=steps[Math.min(n,steps.length-1)];n++;
|
|
69
|
+
show('Trying again in '+left+' seconds','Still offline. Trying again in '+left+' seconds.');
|
|
70
|
+
clearInterval(timer);timer=setInterval(tick,1000);
|
|
71
|
+
}
|
|
72
|
+
function tick(){
|
|
73
|
+
left--;
|
|
74
|
+
if(left<=0)return check();
|
|
75
|
+
show('Trying again in '+left+(left===1?' second':' seconds'));
|
|
76
|
+
}
|
|
77
|
+
function check(){
|
|
78
|
+
if(busy)return;busy=true;clearInterval(timer);btn.disabled=true;
|
|
79
|
+
show('Checking the connection…',false);
|
|
80
|
+
fetch('/healthz',{cache:'no-store'}).then(function(r){
|
|
81
|
+
if(r.status>=500)throw 0;
|
|
82
|
+
show('Back online. Opening…',true);location.reload();
|
|
83
|
+
}).catch(function(){busy=false;btn.disabled=false;wait()});
|
|
84
|
+
}
|
|
85
|
+
btn.addEventListener('click',function(){n=0;check()});
|
|
86
|
+
window.addEventListener('online',function(){n=0;check()});
|
|
87
|
+
wait();
|
|
88
|
+
})();</script>
|
|
38
89
|
</body>
|
|
39
90
|
</html>
|
package/assets/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--shadow-sm:0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\@container{container-type:inline-size}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.shrink{flex-shrink:1}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.zoom-100{zoom:100%}.resize{resize:both}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.lowercase{text-transform:lowercase}.italic{font-style:italic}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--shadow-sm:0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\@container{container-type:inline-size}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.block{display:block}.contents{display:contents}.grid{display:grid}.hidden{display:none}.inline{display:inline}.table{display:table}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.zoom-100{zoom:100%}.resize{resize:both}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.lowercase{text-transform:lowercase}.italic{font-style:italic}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
package/assets/sw.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const BUILD = "memora-build:9f9e01fca37b".slice("memora-build:".length);
|
|
3
|
+
const APP_JS = "/app.js?v=1e891249ade2";
|
|
4
|
+
const VERSION = BUILD;
|
|
5
|
+
const SHELL = "memora-" + BUILD;
|
|
4
6
|
const sw = self;
|
|
5
|
-
const
|
|
7
|
+
const BUILD_FILES = [
|
|
8
|
+
APP_JS,
|
|
9
|
+
"/offline.html",
|
|
10
|
+
"/manifest.webmanifest",
|
|
11
|
+
"/favicon.svg",
|
|
12
|
+
"/apple-touch-icon.png",
|
|
13
|
+
"/icon-192.png",
|
|
14
|
+
"/icon-512.png"
|
|
15
|
+
];
|
|
16
|
+
const CACHED = new Set(BUILD_FILES);
|
|
6
17
|
const NEVER_CACHE = [
|
|
7
18
|
"/api/",
|
|
8
19
|
"/mcp",
|
|
@@ -19,7 +30,7 @@
|
|
|
19
30
|
(async () => {
|
|
20
31
|
const cache = await caches.open(SHELL);
|
|
21
32
|
await Promise.all(
|
|
22
|
-
|
|
33
|
+
BUILD_FILES.map((u) => cache.add(new Request(u, { cache: "reload" })).catch(() => null))
|
|
23
34
|
);
|
|
24
35
|
await sw.skipWaiting();
|
|
25
36
|
})()
|
|
@@ -29,7 +40,7 @@
|
|
|
29
40
|
event.waitUntil(
|
|
30
41
|
(async () => {
|
|
31
42
|
const names = await caches.keys();
|
|
32
|
-
const older = names.filter((n) => n !== SHELL);
|
|
43
|
+
const older = names.filter((n) => n !== SHELL && (n.startsWith("memora-") || n.startsWith("shell-")));
|
|
33
44
|
await Promise.all(older.map((n) => caches.delete(n)));
|
|
34
45
|
if (sw.registration.navigationPreload) {
|
|
35
46
|
await sw.registration.navigationPreload.disable().catch(() => null);
|
|
@@ -68,11 +79,23 @@
|
|
|
68
79
|
return NEVER_CACHE.some((p) => pathname === p || pathname.startsWith(p));
|
|
69
80
|
}
|
|
70
81
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
82
|
+
async function fromBuild(req) {
|
|
83
|
+
const cache = await caches.open(SHELL);
|
|
84
|
+
const hit = await cache.match(req, { ignoreVary: true });
|
|
85
|
+
if (hit) return hit;
|
|
86
|
+
const res = await fetch(req);
|
|
87
|
+
if (res.ok) await cache.put(req, res.clone()).catch(() => null);
|
|
88
|
+
return res;
|
|
89
|
+
}
|
|
71
90
|
sw.addEventListener("fetch", ((event) => {
|
|
72
91
|
const req = event.request;
|
|
73
|
-
if (req.method !== "GET"
|
|
92
|
+
if (req.method !== "GET") return;
|
|
74
93
|
const url = new URL(req.url);
|
|
75
94
|
if (url.origin !== sw.location.origin) return;
|
|
95
|
+
if (req.mode !== "navigate") {
|
|
96
|
+
if (CACHED.has(url.pathname + url.search)) event.respondWith(fromBuild(req));
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
76
99
|
if (isNever(url.pathname)) return;
|
|
77
100
|
event.respondWith(
|
|
78
101
|
(async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codrihub/memora",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Self-hosted memory vault for AI agents: the Memora server (HTTP, MCP, web UI) and the memora-cli console",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"memora",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"markdown",
|
|
13
13
|
"self-hosted"
|
|
14
14
|
],
|
|
15
|
-
"license": "
|
|
15
|
+
"license": "AGPL-3.0-or-later",
|
|
16
16
|
"author": "Codrihub",
|
|
17
17
|
"homepage": "https://github.com/Codrihub/memora#readme",
|
|
18
18
|
"bugs": {
|
|
@@ -31,14 +31,15 @@
|
|
|
31
31
|
"files": [
|
|
32
32
|
"bin",
|
|
33
33
|
"lib",
|
|
34
|
-
"assets"
|
|
34
|
+
"assets",
|
|
35
|
+
"NOTICE"
|
|
35
36
|
],
|
|
36
37
|
"engines": {
|
|
37
|
-
"node": ">=
|
|
38
|
+
"node": ">=22"
|
|
38
39
|
},
|
|
39
40
|
"optionalDependencies": {
|
|
40
|
-
"@codrihub/memora-linux-x64": "
|
|
41
|
-
"@codrihub/memora-linux-arm64": "
|
|
42
|
-
"@codrihub/memora-win32-x64": "
|
|
41
|
+
"@codrihub/memora-linux-x64": "2.0.0",
|
|
42
|
+
"@codrihub/memora-linux-arm64": "2.0.0",
|
|
43
|
+
"@codrihub/memora-win32-x64": "2.0.0"
|
|
43
44
|
}
|
|
44
45
|
}
|