triiiceratops 0.12.0 → 0.12.2

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.
@@ -4,16 +4,20 @@ export function tooltip(node, params) {
4
4
  if (tip)
5
5
  return;
6
6
  tip = document.createElement('div');
7
- // Mimic DaisyUI tooltip style
8
- // tooltip: --tooltip-color: #e5e7eb; --tooltip-text-color: #000000; ...
9
- // We'll use standard utility classes that match the theme roughly
10
- // bg-neutral text-neutral-content is usually closest to daisyui tooltip default
11
7
  tip.className =
12
- 'fixed z-[9999] px-2 py-1 text-xs rounded bg-neutral text-neutral-content shadow-sm pointer-events-none opacity-0 transition-opacity duration-150 whitespace-nowrap max-w-xs';
8
+ 'fixed z-[9999] px-2 py-1 text-xs rounded shadow-sm pointer-events-none opacity-0 transition-opacity duration-150 whitespace-nowrap max-w-xs';
13
9
  tip.textContent = params.content;
10
+ const computedStyle = getComputedStyle(node);
11
+ const bgColor = computedStyle.getPropertyValue('--color-base-200').trim() ||
12
+ computedStyle.getPropertyValue('--color-neutral').trim() ||
13
+ 'oklch(0.95 0 0)';
14
+ const textColor = computedStyle.getPropertyValue('--color-base-content').trim() ||
15
+ computedStyle.getPropertyValue('--color-neutral-content').trim() ||
16
+ 'oklch(0.2 0 0)';
17
+ tip.style.backgroundColor = bgColor;
18
+ tip.style.color = textColor;
14
19
  document.body.appendChild(tip);
15
20
  updatePosition();
16
- // Trigger reflow/paint for transition
17
21
  requestAnimationFrame(() => {
18
22
  if (tip)
19
23
  tip.style.opacity = '1';
@@ -103,20 +103,20 @@
103
103
  </div>
104
104
  {/if}
105
105
 
106
- <dl class="grid grid-cols-1 md:grid-cols-[200px_1fr]">
106
+ <dl>
107
107
  {#if attribution}
108
108
  <dt class="font-bold text-lg opacity-70 mt-6">
109
109
  {m.attribution()}
110
110
  </dt>
111
111
  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
112
- <dd class="text-sm ps-2">{@html attribution}</dd>
112
+ <dd class="text-sm ps-4">{@html attribution}</dd>
113
113
  {/if}
114
114
 
115
115
  {#if license}
116
116
  <dt class="font-bold text-lg opacity-70 mt-6">
117
117
  {m.license()}
118
118
  </dt>
119
- <dd class="text-sm ps-2">
119
+ <dd class="text-sm ps-4">
120
120
  <a
121
121
  href={license}
122
122
  target="_blank"
@@ -131,8 +131,24 @@
131
131
  {item.label}
132
132
  </dt>
133
133
  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
134
- <dd class="text-sm ps-2">{@html item.value}</dd>
134
+ <dd class="text-sm ps-4">{@html item.value}</dd>
135
135
  {/each}
136
+
137
+ {#if viewerState.manifestId}
138
+ <dt class="font-bold text-lg opacity-70 mt-6">
139
+ {m.iiif_manifest_label()}
140
+ </dt>
141
+ <dd class="text-sm ps-4">
142
+ <a
143
+ href={viewerState.manifestId}
144
+ target="_blank"
145
+ rel="noreferrer"
146
+ class="link link-primary break-all"
147
+ >
148
+ {viewerState.manifestId}
149
+ </a>
150
+ </dd>
151
+ {/if}
136
152
  </dl>
137
153
  </div>
138
154