comark-time 0.10.0 → 0.10.1
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/dist/client.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as css } from "./styles-
|
|
2
|
-
import { t as addStyles } from "./client-
|
|
1
|
+
import { t as css } from "./styles-S5sUeFoK.mjs";
|
|
2
|
+
import { t as addStyles } from "./client-BwyjREMY.mjs";
|
|
3
3
|
export { addStyles, css };
|
package/dist/html.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as src_default, r as rawText, t as TIME_TAG } from "./src-ukyJ5xwD.mjs";
|
|
2
|
-
import { t as css } from "./styles-
|
|
2
|
+
import { t as css } from "./styles-S5sUeFoK.mjs";
|
|
3
3
|
import { escapeHtml } from "comark/utils";
|
|
4
4
|
//#region ../../shared/html.ts
|
|
5
5
|
/** A value as the inside of a double-quoted HTML attribute. */
|
package/dist/react.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as src_default, t as TIME_TAG } from "./src-ukyJ5xwD.mjs";
|
|
2
|
-
import { t as addStyles } from "./client-
|
|
2
|
+
import { t as addStyles } from "./client-BwyjREMY.mjs";
|
|
3
3
|
import { createElement, useEffect } from "react";
|
|
4
4
|
//#region src/react.ts
|
|
5
5
|
/** `:time` for `@comark/react`. */
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer comark{:where(.ctm){--_comark-background:var(--comark-background,var(--ui-bg,var(--background,#fff)));--_comark-foreground:var(--comark-foreground,var(--ui-text-highlighted,var(--foreground,#0a0a0a)));--_comark-muted:var(--comark-muted,var(--ui-text-muted,var(--muted-foreground,#737373)));--_comark-border:var(--comark-border,var(--ui-border,var(--border,#e5e5e5)));--_comark-accent:var(--comark-accent,var(--ui-bg-elevated,var(--accent,#f5f5f5)));--_comark-ring:var(--comark-ring,var(--ui-primary,var(--ring,#a1a1a1)));--_comark-shadow:var(--comark-shadow,0 4px 12px rgb(0 0 0/.12));--_comark-radius:var(--comark-radius,calc(var(--ui-radius,
|
|
1
|
+
@layer comark{:where(.ctm){--_comark-background:var(--comark-background,var(--ui-bg,var(--background,#fff)));--_comark-foreground:var(--comark-foreground,var(--ui-text-highlighted,var(--foreground,#0a0a0a)));--_comark-muted:var(--comark-muted,var(--ui-text-muted,var(--muted-foreground,#737373)));--_comark-border:var(--comark-border,var(--ui-border,var(--border,#e5e5e5)));--_comark-accent:var(--comark-accent,var(--ui-bg-elevated,var(--accent,#f5f5f5)));--_comark-ring:var(--comark-ring,var(--ui-primary,var(--ring,#a1a1a1)));--_comark-shadow:var(--comark-shadow,0 4px 12px rgb(0 0 0/.12));--_comark-radius:var(--comark-radius,calc(var(--ui-radius,var(--radius,.625rem)/2)*2));--_comark-font:var(--comark-font,var(--font-sans,ui-sans-serif,system-ui,sans-serif))}@media (prefers-color-scheme:dark){:where(:not(.light,.light *)):is(:where(.ctm)){--_comark-background:var(--comark-background,var(--ui-bg,var(--background,#0a0a0a)));--_comark-foreground:var(--comark-foreground,var(--ui-text-highlighted,var(--foreground,#fafafa)));--_comark-muted:var(--comark-muted,var(--ui-text-muted,var(--muted-foreground,#a1a1a1)));--_comark-border:var(--comark-border,var(--ui-border,var(--border,rgb(255 255 255/.1))));--_comark-accent:var(--comark-accent,var(--ui-bg-elevated,var(--accent,#262626)));--_comark-ring:var(--comark-ring,var(--ui-primary,var(--ring,#737373)));--_comark-shadow:var(--comark-shadow,0 4px 12px rgb(0 0 0/.5))}}:where(.dark,.dark *):is(:where(.ctm)){--_comark-background:var(--comark-background,var(--ui-bg,var(--background,#0a0a0a)));--_comark-foreground:var(--comark-foreground,var(--ui-text-highlighted,var(--foreground,#fafafa)));--_comark-muted:var(--comark-muted,var(--ui-text-muted,var(--muted-foreground,#a1a1a1)));--_comark-border:var(--comark-border,var(--ui-border,var(--border,rgb(255 255 255/.1))));--_comark-accent:var(--comark-accent,var(--ui-bg-elevated,var(--accent,#262626)));--_comark-ring:var(--comark-ring,var(--ui-primary,var(--ring,#737373)));--_comark-shadow:var(--comark-shadow,0 4px 12px rgb(0 0 0/.5))}:where(.ctm){--ctm-enter:140ms;--ctm-exit:100ms}.ctm{display:inline;margin:0 -.125rem;padding:0 .125rem;border-radius:calc(var(--_comark-radius) / 2);font-variant-numeric:tabular-nums;white-space:nowrap;cursor:default;transition:background-color 150ms ease-out}.ctm:focus{outline:2px solid var(--_comark-ring);outline-offset:1px}.ctm:focus:not(:focus-visible){outline:0}.ctm:focus{background:var(--_comark-accent)}@media (hover:hover) and (pointer:fine){.ctm:hover{background:var(--_comark-accent)}}.ctm-tip{position:fixed;z-index:10;display:block;width:max-content;max-width:min(24rem,calc(100vw - 1rem));margin:0;padding:0;visibility:hidden;pointer-events:none;white-space:normal;transition:visibility 0s linear var(--ctm-exit)}.ctm-pill{display:block;padding:.25rem .5rem;border:1px solid var(--_comark-border);border-radius:calc(var(--_comark-radius) - 2px);background:var(--_comark-background);box-shadow:var(--_comark-shadow);color:var(--_comark-foreground);font:400 .8125rem/1.4 var(--_comark-font);text-align:center;opacity:0;scale:.97;translate:0 calc(var(--ctm-dir,1) * 4px);transform-origin:50% 100%;transition:opacity var(--ctm-exit) ease-in,scale var(--ctm-exit) ease-in,translate var(--ctm-exit) ease-in}.ctm:focus .ctm-tip{visibility:visible;transition-delay:0s}.ctm:focus .ctm-pill{opacity:1;scale:1;translate:0 0;transition:opacity var(--ctm-enter) cubic-bezier(.32,.72,0,1),scale var(--ctm-enter) cubic-bezier(.32,.72,0,1),translate var(--ctm-enter) cubic-bezier(.32,.72,0,1)}@media (hover:hover) and (pointer:fine){.ctm:hover .ctm-tip{visibility:visible;transition-delay:0s}.ctm:hover .ctm-pill{opacity:1;scale:1;translate:0 0;transition:opacity var(--ctm-enter) cubic-bezier(.32,.72,0,1) 300ms,scale var(--ctm-enter) cubic-bezier(.32,.72,0,1) 300ms,translate var(--ctm-enter) cubic-bezier(.32,.72,0,1) 300ms}.ctm:focus .ctm-pill{transition-delay:0s}}@supports (anchor-scope:all){.ctm{anchor-name:--ctm;anchor-scope:--ctm}.ctm-tip{position-anchor:--ctm;position-area:top;justify-self:anchor-center;position-try-fallbacks:--ctm-end,--ctm-start,--ctm-below,--ctm-below-end,--ctm-below-start;margin:.375rem .25rem;container-type:anchored}@position-try --ctm-end{position-area:top span-left;justify-self:end}@position-try --ctm-start{position-area:top span-right;justify-self:start}@position-try --ctm-below{position-area:bottom;justify-self:anchor-center}@position-try --ctm-below-end{position-area:bottom span-left;justify-self:end}@position-try --ctm-below-start{position-area:bottom span-right;justify-self:start}@container anchored(fallback:--ctm-below) or anchored(fallback:--ctm-below-end) or anchored(fallback:--ctm-below-start){.ctm-pill{--ctm-dir:-1;transform-origin:50% 0}}}@supports not (anchor-scope:all){.ctm{position:relative}.ctm-tip{position:absolute;bottom:100%;left:0;margin-bottom:.375rem}}@media (prefers-reduced-motion:reduce){.ctm,.ctm-tip,.ctm-pill{transition:none!important}.ctm-pill{scale:1;translate:none}}}
|
|
@@ -120,7 +120,9 @@ function dark(selector, declarations) {
|
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* Resolves the `--comark-*` tokens on `selector`, falling back to Nuxt UI's variables, then shadcn/ui's, then shadcn's
|
|
123
|
-
* neutral theme. Nuxt UI's corners are twice its `--ui-radius`, so the radius halves shadcn's to double it back.
|
|
123
|
+
* neutral theme. Nuxt UI's corners are twice its `--ui-radius`, so the radius halves shadcn's to double it back. The
|
|
124
|
+
* halving sits in the `var()` fallback without a `calc()` of its own, which reads the same once the fallback is
|
|
125
|
+
* substituted, because postcss-calc, which cssnano runs, can't parse a `calc()` there.
|
|
124
126
|
* They resolve on the component rather than `:root`, so a `--comark-*` set on any ancestor still inherits down.
|
|
125
127
|
* `:where()` keeps them at zero specificity. The neutral theme follows the system's color mode, and a `.light` or
|
|
126
128
|
* `.dark` class on the component or above it pins one (see `dark()`).
|
|
@@ -132,7 +134,7 @@ function dark(selector, declarations) {
|
|
|
132
134
|
function theme(selector, ...extras) {
|
|
133
135
|
const where = `:where(${selector})`;
|
|
134
136
|
const list = [...tokens, ...extras.flatMap((name) => groups[name])];
|
|
135
|
-
return `${where}{${resolve(list, 3)};--_comark-radius:var(--comark-radius,calc(var(--ui-radius,
|
|
137
|
+
return `${where}{${resolve(list, 3)};--_comark-radius:var(--comark-radius,calc(var(--ui-radius,var(--radius,.625rem)/2)*2));--_comark-font:var(--comark-font,var(--font-sans,ui-sans-serif,system-ui,sans-serif))}` + dark(where, resolve(list, 4));
|
|
136
138
|
}
|
|
137
139
|
//#endregion
|
|
138
140
|
//#region src/styles.ts
|
package/dist/vue.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as src_default, t as TIME_TAG } from "./src-ukyJ5xwD.mjs";
|
|
2
|
-
import { t as addStyles } from "./client-
|
|
2
|
+
import { t as addStyles } from "./client-BwyjREMY.mjs";
|
|
3
3
|
import { defineComponent, h, onMounted } from "vue";
|
|
4
4
|
//#region src/vue.ts
|
|
5
5
|
/** `:time` for `@comark/vue`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comark-time",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Dates as relative time that turn into a date past a threshold, with the full date in a tooltip. A Comark plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ago",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"react-dom": "^19.3.1",
|
|
59
59
|
"svelte": "^5.57.2",
|
|
60
60
|
"vue": "^3.5.44",
|
|
61
|
-
"comark-zoom": "0.10.
|
|
61
|
+
"comark-zoom": "0.10.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@comark/html": "^0.9.0",
|