origam 2.20.0 → 2.22.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/CHANGELOG.md +99 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +8 -16
- package/dist/src/assets/css/tokens/light.css +3 -8
- package/dist/src/assets/scss/tokens/_dark.scss +8 -16
- package/dist/src/assets/scss/tokens/_light.scss +3 -8
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +15 -65
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +8 -2
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +1 -1
- package/dist/src/components/Dialog/OrigamDialog.vue +1 -1
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +1 -1
- package/dist/src/components/Drawer/OrigamDrawer.vue +12 -2
- package/dist/src/components/Menu/OrigamMenu.vue +1 -1
- package/dist/src/components/Overlay/OrigamOverlay.vue +2 -2
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +1 -1
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +8 -2
- package/dist/src/components/Tooltip/OrigamTooltip.vue +1 -1
- package/dist/src/composables/Commons/hydration.composable.cjs +8 -3
- package/dist/src/composables/Commons/hydration.composable.d.ts +13 -5
- package/dist/src/composables/Commons/hydration.composable.js +6 -1
- package/dist/src/composables/Commons/teleport.composable.cjs +3 -0
- package/dist/src/composables/Commons/teleport.composable.d.ts +56 -0
- package/dist/src/composables/Commons/teleport.composable.js +3 -0
- package/dist/src/consts/Blockquote/blockquote.const.cjs +38 -1
- package/dist/src/consts/Blockquote/blockquote.const.d.ts +113 -0
- package/dist/src/consts/Blockquote/blockquote.const.js +37 -0
- package/dist/src/consts/Commons/variant-preset.const.cjs +2 -0
- package/dist/src/consts/Commons/variant-preset.const.d.ts +19 -8
- package/dist/src/consts/Commons/variant-preset.const.js +2 -0
- package/dist/src/interfaces/Blockquote/blockquote.interface.d.ts +59 -4
- package/dist/src/interfaces/CommandPalette/command-palette.interface.d.ts +2 -1
- package/dist/src/interfaces/Commons/attach.interface.cjs +1 -0
- package/dist/src/interfaces/Commons/attach.interface.d.ts +30 -0
- package/dist/src/interfaces/Commons/attach.interface.js +0 -0
- package/dist/src/interfaces/Drawer/drawer.interface.d.ts +24 -1
- package/dist/src/interfaces/Overlay/overlay.interface.d.ts +2 -2
- package/dist/src/interfaces/Snackbar/snackbar-group.interface.d.ts +2 -1
- package/dist/src/interfaces/index.cjs +11 -0
- package/dist/src/interfaces/index.d.ts +1 -0
- package/dist/src/interfaces/index.js +1 -0
- package/dist/src/themes/origam.theme.cjs +10 -1
- package/dist/src/themes/origam.theme.js +10 -1
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -182,6 +182,11 @@
|
|
|
182
182
|
--origam-color__surface---inverse: var(--origam-color__neutral---0);
|
|
183
183
|
--origam-color__text---primary: var(--origam-color__neutral---50);
|
|
184
184
|
--origam-color__text---secondary: var(--origam-color__neutral---400);
|
|
185
|
+
/* #1044 — `neutral---500` échoue AA ici (4.18:1 sur #0a0a0a, sous 4.5:1) ;
|
|
186
|
+
aucun rung n'existe entre 400 et 500 (300/400/500 = d4d4d4/a3a3a3/737373).
|
|
187
|
+
`tertiary` s'aplatit donc sur la même valeur que `secondary` en sombre —
|
|
188
|
+
assumé, pas un oubli : préféré à une violation AA. */
|
|
189
|
+
--origam-color__text---tertiary: var(--origam-color__neutral---400);
|
|
185
190
|
--origam-color__text---disabled: var(--origam-color__neutral---600);
|
|
186
191
|
--origam-color__text---inverse: var(--origam-color__neutral---950); /* #615 — voir light.css : le bloc runtime de `origamDarkTheme` pose #0a0a0a */
|
|
187
192
|
--origam-color__text---onColor: var(--origam-color__neutral---0);
|
|
@@ -2718,18 +2723,10 @@
|
|
|
2718
2723
|
--origam-blockquote--quoted---glyph-offset-top: -0.1em;
|
|
2719
2724
|
--origam-blockquote--quoted---glyph-offset-left: -0.05em;
|
|
2720
2725
|
--origam-blockquote--quoted---glyph-padding-extra: 1rem;
|
|
2721
|
-
--origam-blockquote__elegant---font-family: var(--origam-font__family---serif);
|
|
2722
|
-
--origam-blockquote__elegant---font-size: var(--origam-font__size---xl);
|
|
2723
2726
|
--origam-blockquote__elegant---font-style: italic;
|
|
2724
|
-
--origam-blockquote__elegant---line-height: var(--origam-font__lineHeight---loose);
|
|
2725
2727
|
--origam-blockquote__elegant---padding-block: var(--origam-space---6);
|
|
2726
|
-
--origam-blockquote__minimal---font-size: var(--origam-font__size---md);
|
|
2727
2728
|
--origam-blockquote__minimal---font-style: italic;
|
|
2728
2729
|
--origam-blockquote__minimal---padding-inline: var(--origam-space---3);
|
|
2729
|
-
--origam-blockquote__pull---font-family: var(--origam-font__family---serif);
|
|
2730
|
-
--origam-blockquote__pull---font-size: var(--origam-font__size---3xl);
|
|
2731
|
-
--origam-blockquote__pull---font-weight: var(--origam-font__weight---medium);
|
|
2732
|
-
--origam-blockquote__pull---line-height: var(--origam-font__lineHeight---snug);
|
|
2733
2730
|
--origam-blockquote__pull---padding-block: var(--origam-space---6);
|
|
2734
2731
|
--origam-blockquote__pull---rule-width: 2px;
|
|
2735
2732
|
--origam-video---background-color: var(--origam-color---black);
|
|
@@ -3200,6 +3197,9 @@
|
|
|
3200
3197
|
--origam-color__surface---inverse: var(--origam-color__neutral---0);
|
|
3201
3198
|
--origam-color__text---primary: var(--origam-color__neutral---50);
|
|
3202
3199
|
--origam-color__text---secondary: var(--origam-color__neutral---400);
|
|
3200
|
+
/* #1044 — meme aplatissement que le bloc explicite ci-dessus : voir sa
|
|
3201
|
+
note, cette feuille doit rester le miroir exact de ce bloc. */
|
|
3202
|
+
--origam-color__text---tertiary: var(--origam-color__neutral---400);
|
|
3203
3203
|
--origam-color__text---disabled: var(--origam-color__neutral---600);
|
|
3204
3204
|
--origam-color__text---inverse: var(--origam-color__neutral---950); /* #615 — voir light.css : le bloc runtime de `origamDarkTheme` pose #0a0a0a */
|
|
3205
3205
|
--origam-color__text---onColor: var(--origam-color__neutral---0);
|
|
@@ -5735,18 +5735,10 @@
|
|
|
5735
5735
|
--origam-blockquote--quoted---glyph-offset-top: -0.1em;
|
|
5736
5736
|
--origam-blockquote--quoted---glyph-offset-left: -0.05em;
|
|
5737
5737
|
--origam-blockquote--quoted---glyph-padding-extra: 1rem;
|
|
5738
|
-
--origam-blockquote__elegant---font-family: var(--origam-font__family---serif);
|
|
5739
|
-
--origam-blockquote__elegant---font-size: var(--origam-font__size---xl);
|
|
5740
5738
|
--origam-blockquote__elegant---font-style: italic;
|
|
5741
|
-
--origam-blockquote__elegant---line-height: var(--origam-font__lineHeight---loose);
|
|
5742
5739
|
--origam-blockquote__elegant---padding-block: var(--origam-space---6);
|
|
5743
|
-
--origam-blockquote__minimal---font-size: var(--origam-font__size---md);
|
|
5744
5740
|
--origam-blockquote__minimal---font-style: italic;
|
|
5745
5741
|
--origam-blockquote__minimal---padding-inline: var(--origam-space---3);
|
|
5746
|
-
--origam-blockquote__pull---font-family: var(--origam-font__family---serif);
|
|
5747
|
-
--origam-blockquote__pull---font-size: var(--origam-font__size---3xl);
|
|
5748
|
-
--origam-blockquote__pull---font-weight: var(--origam-font__weight---medium);
|
|
5749
|
-
--origam-blockquote__pull---line-height: var(--origam-font__lineHeight---snug);
|
|
5750
5742
|
--origam-blockquote__pull---padding-block: var(--origam-space---6);
|
|
5751
5743
|
--origam-blockquote__pull---rule-width: 2px;
|
|
5752
5744
|
--origam-video---background-color: var(--origam-color---black);
|
|
@@ -84,6 +84,9 @@
|
|
|
84
84
|
`origam.theme.ts` qu'il faut changer AVEC, sinon la divergence revient. */
|
|
85
85
|
--origam-color__text---primary: var(--origam-color__neutral---950);
|
|
86
86
|
--origam-color__text---secondary: var(--origam-color__neutral---600);
|
|
87
|
+
/* #1044 — un niveau sous `secondary`, mesuré 4.74:1 sur `surface---default`
|
|
88
|
+
(#ffffff), AA. Voir dark.css pour la contrainte qui a fixé ce rung. */
|
|
89
|
+
--origam-color__text---tertiary: var(--origam-color__neutral---500);
|
|
87
90
|
--origam-color__text---disabled: var(--origam-color__neutral---400);
|
|
88
91
|
--origam-color__text---inverse: var(--origam-color__neutral---0);
|
|
89
92
|
--origam-color__text---onColor: var(--origam-color__neutral---0);
|
|
@@ -2634,18 +2637,10 @@
|
|
|
2634
2637
|
--origam-blockquote--quoted---glyph-offset-top: -0.1em;
|
|
2635
2638
|
--origam-blockquote--quoted---glyph-offset-left: -0.05em;
|
|
2636
2639
|
--origam-blockquote--quoted---glyph-padding-extra: 1rem;
|
|
2637
|
-
--origam-blockquote__elegant---font-family: var(--origam-font__family---serif);
|
|
2638
|
-
--origam-blockquote__elegant---font-size: var(--origam-font__size---xl);
|
|
2639
2640
|
--origam-blockquote__elegant---font-style: italic;
|
|
2640
|
-
--origam-blockquote__elegant---line-height: var(--origam-font__lineHeight---loose);
|
|
2641
2641
|
--origam-blockquote__elegant---padding-block: var(--origam-space---6);
|
|
2642
|
-
--origam-blockquote__minimal---font-size: var(--origam-font__size---md);
|
|
2643
2642
|
--origam-blockquote__minimal---font-style: italic;
|
|
2644
2643
|
--origam-blockquote__minimal---padding-inline: var(--origam-space---3);
|
|
2645
|
-
--origam-blockquote__pull---font-family: var(--origam-font__family---serif);
|
|
2646
|
-
--origam-blockquote__pull---font-size: var(--origam-font__size---3xl);
|
|
2647
|
-
--origam-blockquote__pull---font-weight: var(--origam-font__weight---medium);
|
|
2648
|
-
--origam-blockquote__pull---line-height: var(--origam-font__lineHeight---snug);
|
|
2649
2644
|
--origam-blockquote__pull---padding-block: var(--origam-space---6);
|
|
2650
2645
|
--origam-blockquote__pull---rule-width: 2px;
|
|
2651
2646
|
--origam-video---background-color: var(--origam-color---black);
|
|
@@ -182,6 +182,11 @@
|
|
|
182
182
|
--origam-color__surface---inverse: var(--origam-color__neutral---0);
|
|
183
183
|
--origam-color__text---primary: var(--origam-color__neutral---50);
|
|
184
184
|
--origam-color__text---secondary: var(--origam-color__neutral---400);
|
|
185
|
+
/* #1044 — `neutral---500` échoue AA ici (4.18:1 sur #0a0a0a, sous 4.5:1) ;
|
|
186
|
+
aucun rung n'existe entre 400 et 500 (300/400/500 = d4d4d4/a3a3a3/737373).
|
|
187
|
+
`tertiary` s'aplatit donc sur la même valeur que `secondary` en sombre —
|
|
188
|
+
assumé, pas un oubli : préféré à une violation AA. */
|
|
189
|
+
--origam-color__text---tertiary: var(--origam-color__neutral---400);
|
|
185
190
|
--origam-color__text---disabled: var(--origam-color__neutral---600);
|
|
186
191
|
--origam-color__text---inverse: var(--origam-color__neutral---950); /* #615 — voir light.css : le bloc runtime de `origamDarkTheme` pose #0a0a0a */
|
|
187
192
|
--origam-color__text---onColor: var(--origam-color__neutral---0);
|
|
@@ -2718,18 +2723,10 @@
|
|
|
2718
2723
|
--origam-blockquote--quoted---glyph-offset-top: -0.1em;
|
|
2719
2724
|
--origam-blockquote--quoted---glyph-offset-left: -0.05em;
|
|
2720
2725
|
--origam-blockquote--quoted---glyph-padding-extra: 1rem;
|
|
2721
|
-
--origam-blockquote__elegant---font-family: var(--origam-font__family---serif);
|
|
2722
|
-
--origam-blockquote__elegant---font-size: var(--origam-font__size---xl);
|
|
2723
2726
|
--origam-blockquote__elegant---font-style: italic;
|
|
2724
|
-
--origam-blockquote__elegant---line-height: var(--origam-font__lineHeight---loose);
|
|
2725
2727
|
--origam-blockquote__elegant---padding-block: var(--origam-space---6);
|
|
2726
|
-
--origam-blockquote__minimal---font-size: var(--origam-font__size---md);
|
|
2727
2728
|
--origam-blockquote__minimal---font-style: italic;
|
|
2728
2729
|
--origam-blockquote__minimal---padding-inline: var(--origam-space---3);
|
|
2729
|
-
--origam-blockquote__pull---font-family: var(--origam-font__family---serif);
|
|
2730
|
-
--origam-blockquote__pull---font-size: var(--origam-font__size---3xl);
|
|
2731
|
-
--origam-blockquote__pull---font-weight: var(--origam-font__weight---medium);
|
|
2732
|
-
--origam-blockquote__pull---line-height: var(--origam-font__lineHeight---snug);
|
|
2733
2730
|
--origam-blockquote__pull---padding-block: var(--origam-space---6);
|
|
2734
2731
|
--origam-blockquote__pull---rule-width: 2px;
|
|
2735
2732
|
--origam-video---background-color: var(--origam-color---black);
|
|
@@ -3200,6 +3197,9 @@
|
|
|
3200
3197
|
--origam-color__surface---inverse: var(--origam-color__neutral---0);
|
|
3201
3198
|
--origam-color__text---primary: var(--origam-color__neutral---50);
|
|
3202
3199
|
--origam-color__text---secondary: var(--origam-color__neutral---400);
|
|
3200
|
+
/* #1044 — meme aplatissement que le bloc explicite ci-dessus : voir sa
|
|
3201
|
+
note, cette feuille doit rester le miroir exact de ce bloc. */
|
|
3202
|
+
--origam-color__text---tertiary: var(--origam-color__neutral---400);
|
|
3203
3203
|
--origam-color__text---disabled: var(--origam-color__neutral---600);
|
|
3204
3204
|
--origam-color__text---inverse: var(--origam-color__neutral---950); /* #615 — voir light.css : le bloc runtime de `origamDarkTheme` pose #0a0a0a */
|
|
3205
3205
|
--origam-color__text---onColor: var(--origam-color__neutral---0);
|
|
@@ -5735,18 +5735,10 @@
|
|
|
5735
5735
|
--origam-blockquote--quoted---glyph-offset-top: -0.1em;
|
|
5736
5736
|
--origam-blockquote--quoted---glyph-offset-left: -0.05em;
|
|
5737
5737
|
--origam-blockquote--quoted---glyph-padding-extra: 1rem;
|
|
5738
|
-
--origam-blockquote__elegant---font-family: var(--origam-font__family---serif);
|
|
5739
|
-
--origam-blockquote__elegant---font-size: var(--origam-font__size---xl);
|
|
5740
5738
|
--origam-blockquote__elegant---font-style: italic;
|
|
5741
|
-
--origam-blockquote__elegant---line-height: var(--origam-font__lineHeight---loose);
|
|
5742
5739
|
--origam-blockquote__elegant---padding-block: var(--origam-space---6);
|
|
5743
|
-
--origam-blockquote__minimal---font-size: var(--origam-font__size---md);
|
|
5744
5740
|
--origam-blockquote__minimal---font-style: italic;
|
|
5745
5741
|
--origam-blockquote__minimal---padding-inline: var(--origam-space---3);
|
|
5746
|
-
--origam-blockquote__pull---font-family: var(--origam-font__family---serif);
|
|
5747
|
-
--origam-blockquote__pull---font-size: var(--origam-font__size---3xl);
|
|
5748
|
-
--origam-blockquote__pull---font-weight: var(--origam-font__weight---medium);
|
|
5749
|
-
--origam-blockquote__pull---line-height: var(--origam-font__lineHeight---snug);
|
|
5750
5742
|
--origam-blockquote__pull---padding-block: var(--origam-space---6);
|
|
5751
5743
|
--origam-blockquote__pull---rule-width: 2px;
|
|
5752
5744
|
--origam-video---background-color: var(--origam-color---black);
|
|
@@ -84,6 +84,9 @@
|
|
|
84
84
|
`origam.theme.ts` qu'il faut changer AVEC, sinon la divergence revient. */
|
|
85
85
|
--origam-color__text---primary: var(--origam-color__neutral---950);
|
|
86
86
|
--origam-color__text---secondary: var(--origam-color__neutral---600);
|
|
87
|
+
/* #1044 — un niveau sous `secondary`, mesuré 4.74:1 sur `surface---default`
|
|
88
|
+
(#ffffff), AA. Voir dark.css pour la contrainte qui a fixé ce rung. */
|
|
89
|
+
--origam-color__text---tertiary: var(--origam-color__neutral---500);
|
|
87
90
|
--origam-color__text---disabled: var(--origam-color__neutral---400);
|
|
88
91
|
--origam-color__text---inverse: var(--origam-color__neutral---0);
|
|
89
92
|
--origam-color__text---onColor: var(--origam-color__neutral---0);
|
|
@@ -2634,18 +2637,10 @@
|
|
|
2634
2637
|
--origam-blockquote--quoted---glyph-offset-top: -0.1em;
|
|
2635
2638
|
--origam-blockquote--quoted---glyph-offset-left: -0.05em;
|
|
2636
2639
|
--origam-blockquote--quoted---glyph-padding-extra: 1rem;
|
|
2637
|
-
--origam-blockquote__elegant---font-family: var(--origam-font__family---serif);
|
|
2638
|
-
--origam-blockquote__elegant---font-size: var(--origam-font__size---xl);
|
|
2639
2640
|
--origam-blockquote__elegant---font-style: italic;
|
|
2640
|
-
--origam-blockquote__elegant---line-height: var(--origam-font__lineHeight---loose);
|
|
2641
2641
|
--origam-blockquote__elegant---padding-block: var(--origam-space---6);
|
|
2642
|
-
--origam-blockquote__minimal---font-size: var(--origam-font__size---md);
|
|
2643
2642
|
--origam-blockquote__minimal---font-style: italic;
|
|
2644
2643
|
--origam-blockquote__minimal---padding-inline: var(--origam-space---3);
|
|
2645
|
-
--origam-blockquote__pull---font-family: var(--origam-font__family---serif);
|
|
2646
|
-
--origam-blockquote__pull---font-size: var(--origam-font__size---3xl);
|
|
2647
|
-
--origam-blockquote__pull---font-weight: var(--origam-font__weight---medium);
|
|
2648
|
-
--origam-blockquote__pull---line-height: var(--origam-font__lineHeight---snug);
|
|
2649
2644
|
--origam-blockquote__pull---padding-block: var(--origam-space---6);
|
|
2650
2645
|
--origam-blockquote__pull---rule-width: 2px;
|
|
2651
2646
|
--origam-video---background-color: var(--origam-color---black);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:style="blockquoteStyles"
|
|
8
8
|
>
|
|
9
9
|
<span
|
|
10
|
-
v-if="
|
|
10
|
+
v-if="quoteMark"
|
|
11
11
|
class="origam-blockquote__mark origam-blockquote__mark--bg"
|
|
12
12
|
aria-hidden="true"
|
|
13
13
|
>{{ openMark }}</span>
|
|
@@ -68,7 +68,8 @@ const props = defineProps({
|
|
|
68
68
|
source: { type: String, required: false },
|
|
69
69
|
cite: { type: String, required: false },
|
|
70
70
|
lang: { type: null, required: false, default: "auto" },
|
|
71
|
-
align: { type: null, required: false },
|
|
71
|
+
align: { type: null, required: false, default: "left" },
|
|
72
|
+
quoteMark: { type: Boolean, required: false },
|
|
72
73
|
id: { type: String, required: false },
|
|
73
74
|
class: { type: [String, Array, Object], required: false },
|
|
74
75
|
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
@@ -160,14 +161,9 @@ const effectiveLang = computed(() => {
|
|
|
160
161
|
});
|
|
161
162
|
const openMark = computed(() => QUOTE_MARKS_BY_LANG[effectiveLang.value].open);
|
|
162
163
|
const closeMark = computed(() => QUOTE_MARKS_BY_LANG[effectiveLang.value].close);
|
|
163
|
-
const showQuoteMark = computed(() => props.variant === "quoted");
|
|
164
164
|
const hasAuthor = computed(() => Boolean(slots.author) || (props.author?.length ?? 0) > 0);
|
|
165
165
|
const hasSource = computed(() => Boolean(slots.source) || (props.source?.length ?? 0) > 0);
|
|
166
166
|
const hasAttribution = computed(() => hasAuthor.value || hasSource.value);
|
|
167
|
-
const effectiveAlign = computed(() => {
|
|
168
|
-
if (props.align) return props.align;
|
|
169
|
-
return props.variant === "pull" ? "center" : "left";
|
|
170
|
-
});
|
|
171
167
|
const { roundedClasses, roundedStyles } = useRounded(props);
|
|
172
168
|
const { elevationClasses } = useElevation(props);
|
|
173
169
|
const { borderClasses, borderStyles } = useBorder(props);
|
|
@@ -202,7 +198,7 @@ const blockquoteClasses = computed(() => {
|
|
|
202
198
|
return [
|
|
203
199
|
"origam-blockquote",
|
|
204
200
|
`origam-blockquote--variant-${props.variant}`,
|
|
205
|
-
`origam-blockquote--align-${
|
|
201
|
+
`origam-blockquote--align-${props.align}`,
|
|
206
202
|
{
|
|
207
203
|
[`origam-blockquote--color-${props.color}`]: colorIsIntent.value,
|
|
208
204
|
[`origam-blockquote--accent-${resolvedAccentColor.value}`]: accentIsIntent.value,
|
|
@@ -229,10 +225,8 @@ const blockquoteStyles = computed(() => {
|
|
|
229
225
|
});
|
|
230
226
|
defineExpose({
|
|
231
227
|
effectiveLang,
|
|
232
|
-
effectiveAlign,
|
|
233
228
|
openMark,
|
|
234
229
|
closeMark,
|
|
235
|
-
showQuoteMark,
|
|
236
230
|
hasAttribution
|
|
237
231
|
});
|
|
238
232
|
</script>
|
|
@@ -259,14 +253,13 @@ defineExpose({
|
|
|
259
253
|
// win the cascade. Without it the scoped compiler pushes this rule
|
|
260
254
|
// to (0,2,0) and beats the utility's (0,1,0).
|
|
261
255
|
//
|
|
262
|
-
// ⚠️
|
|
263
|
-
//
|
|
264
|
-
//
|
|
265
|
-
//
|
|
266
|
-
//
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
// the variant's accent-bar offset must not lose to a utility.
|
|
256
|
+
// ⚠️ #950's caveat about a competing variant rule is OBSOLETE since
|
|
257
|
+
// ADR-005 D7 (lot #1015): there is no longer any variant rule to
|
|
258
|
+
// compete with. A variant's spacing now arrives as an INLINE
|
|
259
|
+
// declaration from its props preset, which outranks both this rule
|
|
260
|
+
// and the utility class — so the accent-bar offset still cannot
|
|
261
|
+
// lose to a utility, by a stronger mechanism than specificity.
|
|
262
|
+
// This rule is what a variant that sets no spacing falls back to.
|
|
270
263
|
:where(&) {
|
|
271
264
|
margin: 0;
|
|
272
265
|
padding-block: var(--origam-blockquote---resolved-padding-block);
|
|
@@ -335,53 +328,10 @@ defineExpose({
|
|
|
335
328
|
text-align: right;
|
|
336
329
|
}
|
|
337
330
|
|
|
338
|
-
.origam-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
.origam-blockquote--variant-elegant {
|
|
344
|
-
font-family: var(--origam-blockquote__elegant---font-family, Georgia, 'Times New Roman', serif);
|
|
345
|
-
font-size: var(--origam-blockquote__elegant---font-size, 1.125rem);
|
|
346
|
-
font-style: var(--origam-blockquote__elegant---font-style, italic);
|
|
347
|
-
line-height: var(--origam-blockquote__elegant---line-height, 2);
|
|
348
|
-
padding-block: var(--origam-blockquote__elegant---padding-block, 24px);
|
|
349
|
-
border-inline-start: var(--origam-blockquote__accent---width, 4px) solid var(--origam-blockquote---resolved-accent-color);
|
|
350
|
-
padding-inline-start: calc(var(--origam-blockquote---resolved-padding-inline) + var(--origam-blockquote__accent---width, 4px));
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.origam-blockquote--variant-quoted {
|
|
354
|
-
padding-top: calc(var(--origam-blockquote---resolved-padding-block) + var(--origam-blockquote--quoted---glyph-padding-extra, 1rem));
|
|
355
|
-
|
|
356
|
-
.origam-blockquote__body {
|
|
357
|
-
position: relative;
|
|
358
|
-
z-index: 1;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.origam-blockquote__attribution {
|
|
362
|
-
position: relative;
|
|
363
|
-
z-index: 1;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.origam-blockquote--variant-minimal {
|
|
368
|
-
font-size: var(--origam-blockquote__minimal---font-size, 0.875rem);
|
|
369
|
-
font-style: var(--origam-blockquote__minimal---font-style, italic);
|
|
370
|
-
padding-inline: var(--origam-blockquote__minimal---padding-inline, 12px);
|
|
371
|
-
padding-block: 0;
|
|
372
|
-
border-inline-start: var(--origam-blockquote--minimal---accent-width, 2px) solid var(--origam-blockquote---resolved-accent-color);
|
|
373
|
-
padding-inline-start: calc(var(--origam-blockquote__minimal---padding-inline, 12px) + var(--origam-blockquote--minimal---accent-width, 2px));
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.origam-blockquote--variant-pull {
|
|
377
|
-
font-family: var(--origam-blockquote__pull---font-family, Georgia, 'Times New Roman', serif);
|
|
378
|
-
font-size: var(--origam-blockquote__pull---font-size, 1.5rem);
|
|
379
|
-
font-weight: var(--origam-blockquote__pull---font-weight, 500);
|
|
380
|
-
line-height: var(--origam-blockquote__pull---line-height, 1.375);
|
|
381
|
-
padding-block: var(--origam-blockquote__pull---padding-block, 24px);
|
|
382
|
-
padding-inline: var(--origam-blockquote---resolved-padding-inline);
|
|
383
|
-
border-block-start: var(--origam-blockquote__pull---rule-width, 2px) solid var(--origam-blockquote---resolved-accent-color);
|
|
384
|
-
border-block-end: var(--origam-blockquote__pull---rule-width, 2px) solid var(--origam-blockquote---resolved-accent-color);
|
|
331
|
+
.origam-blockquote__mark--bg + .origam-blockquote__body,
|
|
332
|
+
.origam-blockquote__mark--bg ~ .origam-blockquote__attribution {
|
|
333
|
+
position: relative;
|
|
334
|
+
z-index: 1;
|
|
385
335
|
}
|
|
386
336
|
|
|
387
337
|
.origam-blockquote--accent-primary {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<teleport
|
|
2
|
+
<teleport
|
|
3
|
+
:disabled="!teleportTarget"
|
|
4
|
+
:to="teleportTarget"
|
|
5
|
+
>
|
|
3
6
|
<transition name="origam-command-palette--fade">
|
|
4
7
|
<div
|
|
5
8
|
v-if="isActive"
|
|
@@ -172,6 +175,7 @@ import OrigamKbd from "../Kbd/OrigamKbd.vue";
|
|
|
172
175
|
import { useCommand } from "../../composables/CommandPalette/command.composable";
|
|
173
176
|
import { useHotkey } from "../../composables/Commons/hotkey.composable";
|
|
174
177
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
178
|
+
import { useTeleport } from "../../composables/Commons/teleport.composable";
|
|
175
179
|
import { useTypography } from "../../composables/Commons/typography.composable";
|
|
176
180
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
177
181
|
import { COMMAND_PALETTE_DEFAULT_HOTKEY, COMMAND_PALETTE_DEFAULT_MAX_HEIGHT, COMMAND_PALETTE_DEFAULT_WIDTH } from "../../consts/CommandPalette/command-palette.const";
|
|
@@ -195,7 +199,8 @@ const props = defineProps({
|
|
|
195
199
|
id: { type: String, required: false },
|
|
196
200
|
class: { type: [String, Array, Object], required: false },
|
|
197
201
|
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
198
|
-
fontSize: { type: null, required: false }
|
|
202
|
+
fontSize: { type: null, required: false },
|
|
203
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true }
|
|
199
204
|
});
|
|
200
205
|
const emit = defineEmits(["update:modelValue", "select", "query"]);
|
|
201
206
|
defineSlots();
|
|
@@ -208,6 +213,7 @@ watch(registryOpen, (next) => {
|
|
|
208
213
|
watch(isActive, (next) => {
|
|
209
214
|
if (next !== registryOpen.value) registryOpen.value = next;
|
|
210
215
|
});
|
|
216
|
+
const { teleportTarget } = useTeleport(computed(() => props.attach || false));
|
|
211
217
|
const uid = getUid();
|
|
212
218
|
const inputId = computed(() => `origam-command-palette-input-${uid}`);
|
|
213
219
|
const listboxId = computed(() => `origam-command-palette-listbox-${uid}`);
|
|
@@ -39,7 +39,6 @@ const props = defineProps({
|
|
|
39
39
|
class: { type: [String, Array, Object], required: false },
|
|
40
40
|
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
41
41
|
absolute: { type: Boolean, required: false },
|
|
42
|
-
attach: { type: [Boolean, String], required: false, skipCheck: true },
|
|
43
42
|
closeOnBack: { type: Boolean, required: false },
|
|
44
43
|
contentClass: { type: [String, Array], required: false },
|
|
45
44
|
contentProps: { type: null, required: false },
|
|
@@ -75,6 +74,7 @@ const props = defineProps({
|
|
|
75
74
|
eager: { type: Boolean, required: false },
|
|
76
75
|
transition: { type: [Boolean, String, Object], required: false, default: () => ({ component: OrigamTranslateScale }) },
|
|
77
76
|
scrim: { type: [Boolean, String], required: false, default: false },
|
|
77
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true },
|
|
78
78
|
activeClass: { type: String, required: false },
|
|
79
79
|
expandIcon: { type: String, required: false },
|
|
80
80
|
collapseIcon: { type: String, required: false },
|
|
@@ -168,7 +168,6 @@ const props = defineProps({
|
|
|
168
168
|
class: { type: [String, Array, Object], required: false },
|
|
169
169
|
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
170
170
|
absolute: { type: Boolean, required: false },
|
|
171
|
-
attach: { type: [Boolean, String], required: false, skipCheck: true },
|
|
172
171
|
closeOnBack: { type: Boolean, required: false },
|
|
173
172
|
contentClass: { type: [String, Array], required: false },
|
|
174
173
|
contentProps: { type: null, required: false },
|
|
@@ -204,6 +203,7 @@ const props = defineProps({
|
|
|
204
203
|
eager: { type: Boolean, required: false },
|
|
205
204
|
transition: { type: [Boolean, String, Object], required: false, default: () => ({ component: OrigamTranslateScale }) },
|
|
206
205
|
scrim: { type: [Boolean, String], required: false, default: true },
|
|
206
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true },
|
|
207
207
|
flat: { type: Boolean, required: false },
|
|
208
208
|
hover: { type: Boolean, required: false },
|
|
209
209
|
image: { type: String, required: false },
|
|
@@ -144,7 +144,6 @@ const props = defineProps({
|
|
|
144
144
|
class: { type: [String, Array, Object], required: false },
|
|
145
145
|
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
146
146
|
absolute: { type: Boolean, required: false },
|
|
147
|
-
attach: { type: [Boolean, String], required: false, skipCheck: true },
|
|
148
147
|
closeOnBack: { type: Boolean, required: false },
|
|
149
148
|
contentClass: { type: [String, Array], required: false },
|
|
150
149
|
contentProps: { type: null, required: false },
|
|
@@ -180,6 +179,7 @@ const props = defineProps({
|
|
|
180
179
|
eager: { type: Boolean, required: false },
|
|
181
180
|
transition: { type: [Boolean, String, Object], required: false },
|
|
182
181
|
scrim: { type: [Boolean, String], required: false },
|
|
182
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true },
|
|
183
183
|
flat: { type: Boolean, required: false },
|
|
184
184
|
hover: { type: Boolean, required: false },
|
|
185
185
|
image: { type: String, required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<teleport
|
|
3
|
-
:disabled="
|
|
4
|
-
:to="
|
|
3
|
+
:disabled="teleportDisabled"
|
|
4
|
+
:to="teleportTo"
|
|
5
5
|
defer
|
|
6
6
|
>
|
|
7
7
|
<origam-transition :transition="transition">
|
|
@@ -83,6 +83,7 @@ import { useStateEffect } from "../../composables/Commons/stateEffect.composable
|
|
|
83
83
|
import { useStateFlag } from "../../composables/Commons/stateFlag.composable";
|
|
84
84
|
import { useSticky } from "../../composables/Commons/sticky.composable";
|
|
85
85
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
86
|
+
import { useTeleport } from "../../composables/Commons/teleport.composable";
|
|
86
87
|
import { useToggleScope } from "../../composables/Commons/toggleScope.composable";
|
|
87
88
|
import { useTouch } from "../../composables/Commons/touch.composable";
|
|
88
89
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
@@ -104,6 +105,7 @@ const props = defineProps({
|
|
|
104
105
|
sticky: { type: Boolean, required: false },
|
|
105
106
|
push: { type: [Boolean, null], required: false, default: null },
|
|
106
107
|
clipped: { type: [Boolean, null], required: false, default: null },
|
|
108
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true, default: null },
|
|
107
109
|
tag: { type: String, required: false, default: "nav" },
|
|
108
110
|
id: { type: String, required: false },
|
|
109
111
|
class: { type: [String, Array, Object], required: false },
|
|
@@ -276,6 +278,14 @@ const teleportDrawer = computed(() => {
|
|
|
276
278
|
if (isLayoutOrphan.value) return void 0;
|
|
277
279
|
return `#${resolvedLayoutId.value} .origam-layout__wrapper`;
|
|
278
280
|
});
|
|
281
|
+
const hasExplicitAttach = computed(() => props.attach !== null);
|
|
282
|
+
const { teleportTarget: attachTarget } = useTeleport(computed(() => props.attach || false));
|
|
283
|
+
const teleportDisabled = computed(() => {
|
|
284
|
+
return hasExplicitAttach.value ? !attachTarget.value : isLayoutOrphan.value;
|
|
285
|
+
});
|
|
286
|
+
const teleportTo = computed(() => {
|
|
287
|
+
return hasExplicitAttach.value ? attachTarget.value : teleportDrawer.value;
|
|
288
|
+
});
|
|
279
289
|
const { isStuck, stickyStyles } = useSticky({ rootEl, isSticky, layoutItemStyles });
|
|
280
290
|
const scrimStyles = computed(() => ({
|
|
281
291
|
...isDragging.value ? {
|
|
@@ -101,7 +101,6 @@ import { getUid } from "../../utils/Commons/getCurrentInstance.util";
|
|
|
101
101
|
const props = defineProps({
|
|
102
102
|
id: { type: String, required: false },
|
|
103
103
|
absolute: { type: Boolean, required: false },
|
|
104
|
-
attach: { type: [Boolean, String], required: false, skipCheck: true },
|
|
105
104
|
closeOnBack: { type: Boolean, required: false },
|
|
106
105
|
contentClass: { type: [String, Array], required: false },
|
|
107
106
|
contentProps: { type: null, required: false },
|
|
@@ -139,6 +138,7 @@ const props = defineProps({
|
|
|
139
138
|
eager: { type: Boolean, required: false },
|
|
140
139
|
transition: { type: [Boolean, String, Object], required: false, default: () => ({ component: OrigamTranslateScale }) },
|
|
141
140
|
scrim: { type: [Boolean, String], required: false, default: false },
|
|
141
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true },
|
|
142
142
|
activeClass: { type: String, required: false },
|
|
143
143
|
expandIcon: { type: String, required: false },
|
|
144
144
|
collapseIcon: { type: String, required: false },
|
|
@@ -83,7 +83,6 @@ import { getScrollParent } from "../../utils/Commons/scroll.util";
|
|
|
83
83
|
defineOptions({ inheritAttrs: false });
|
|
84
84
|
const props = defineProps({
|
|
85
85
|
absolute: { type: Boolean, required: false },
|
|
86
|
-
attach: { type: [Boolean, String], required: false, skipCheck: true },
|
|
87
86
|
closeOnBack: { type: Boolean, required: false, default: true },
|
|
88
87
|
contentClass: { type: [String, Array], required: false },
|
|
89
88
|
contentProps: { type: null, required: false },
|
|
@@ -121,7 +120,8 @@ const props = defineProps({
|
|
|
121
120
|
contained: { type: Boolean, required: false },
|
|
122
121
|
eager: { type: Boolean, required: false },
|
|
123
122
|
transition: { type: [Boolean, String, Object], required: false, default: () => ({ component: OrigamFade }) },
|
|
124
|
-
scrim: { type: [Boolean, String], required: false, default: true }
|
|
123
|
+
scrim: { type: [Boolean, String], required: false, default: true },
|
|
124
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true }
|
|
125
125
|
});
|
|
126
126
|
const emits = defineEmits(["afterEnter", "afterLeave", "keydown", "update:modelValue", "click:outside"]);
|
|
127
127
|
defineSlots();
|
|
@@ -120,7 +120,6 @@ const props = defineProps({
|
|
|
120
120
|
color: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
121
121
|
bgColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
122
122
|
absolute: { type: Boolean, required: false },
|
|
123
|
-
attach: { type: [Boolean, String], required: false, skipCheck: true },
|
|
124
123
|
closeOnBack: { type: Boolean, required: false },
|
|
125
124
|
contentClass: { type: [String, Array], required: false },
|
|
126
125
|
contentProps: { type: null, required: false },
|
|
@@ -158,6 +157,7 @@ const props = defineProps({
|
|
|
158
157
|
component: OrigamSnack
|
|
159
158
|
}) },
|
|
160
159
|
scrim: { type: [Boolean, String], required: false },
|
|
160
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true },
|
|
161
161
|
position: { type: null, required: false },
|
|
162
162
|
top: { type: [Number, String], required: false },
|
|
163
163
|
bottom: { type: [Number, String], required: false },
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<teleport
|
|
2
|
+
<teleport
|
|
3
|
+
:disabled="!teleportTarget"
|
|
4
|
+
:to="teleportTarget"
|
|
5
|
+
>
|
|
3
6
|
<component
|
|
4
7
|
:is="tag"
|
|
5
8
|
:id="resolvedDomId"
|
|
@@ -41,6 +44,7 @@ import OrigamSnackbarItem from "./OrigamSnackbarItem.vue";
|
|
|
41
44
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
42
45
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
43
46
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
47
|
+
import { useTeleport } from "../../composables/Commons/teleport.composable";
|
|
44
48
|
import { useSnackbarGroupInternal } from "../../composables/Snackbar/snackbarGroupInternal.composable";
|
|
45
49
|
import { INTENT } from "../../enums/Commons/intent.enum";
|
|
46
50
|
import { SNACKBAR_GROUP_DIRECTION } from "../../enums/Snackbar/snackbar-group.enum";
|
|
@@ -55,13 +59,15 @@ const props = defineProps({
|
|
|
55
59
|
direction: { type: null, required: false },
|
|
56
60
|
class: { type: [String, Array, Object], required: false },
|
|
57
61
|
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
58
|
-
tag: { type: String, required: false, default: "div" }
|
|
62
|
+
tag: { type: String, required: false, default: "div" },
|
|
63
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true }
|
|
59
64
|
});
|
|
60
65
|
defineEmits([]);
|
|
61
66
|
defineSlots();
|
|
62
67
|
const { t } = useLocale();
|
|
63
68
|
const { filterProps } = useProps(props);
|
|
64
69
|
const rootRef = ref();
|
|
70
|
+
const { teleportTarget } = useTeleport(computed(() => props.attach || false));
|
|
65
71
|
const { rawItems, registerDefaultDuration } = useSnackbarGroupInternal(() => props.id);
|
|
66
72
|
watch(() => props.defaultDuration, (duration) => {
|
|
67
73
|
registerDefaultDuration(duration);
|
|
@@ -59,7 +59,6 @@ const props = defineProps({
|
|
|
59
59
|
class: { type: [String, Array, Object], required: false },
|
|
60
60
|
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true },
|
|
61
61
|
absolute: { type: Boolean, required: false },
|
|
62
|
-
attach: { type: [Boolean, String], required: false, skipCheck: true },
|
|
63
62
|
closeOnBack: { type: Boolean, required: false, default: false },
|
|
64
63
|
contentClass: { type: [String, Array], required: false },
|
|
65
64
|
contentProps: { type: null, required: false },
|
|
@@ -95,6 +94,7 @@ const props = defineProps({
|
|
|
95
94
|
eager: { type: Boolean, required: false, default: true },
|
|
96
95
|
transition: { type: [Boolean, String, Object], required: false, default: false },
|
|
97
96
|
scrim: { type: [Boolean, String], required: false, default: false },
|
|
97
|
+
attach: { type: [Boolean, String, null], required: false, skipCheck: true },
|
|
98
98
|
color: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
99
99
|
bgColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
100
100
|
fontSize: { type: null, required: false },
|
|
@@ -9,9 +9,14 @@ var _display = require("./display.composable.cjs");
|
|
|
9
9
|
var _commons = require("../../consts/Commons/commons.const.cjs");
|
|
10
10
|
function useHydration() {
|
|
11
11
|
if (!_commons.IN_BROWSER) return (0, _vue.shallowRef)(false);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
let ssr;
|
|
13
|
+
try {
|
|
14
|
+
({
|
|
15
|
+
ssr
|
|
16
|
+
} = (0, _display.useDisplay)());
|
|
17
|
+
} catch {
|
|
18
|
+
return (0, _vue.shallowRef)(true);
|
|
19
|
+
}
|
|
15
20
|
if (ssr) {
|
|
16
21
|
const isMounted = (0, _vue.shallowRef)(false);
|
|
17
22
|
(0, _vue.onMounted)(() => {
|
|
@@ -13,11 +13,19 @@
|
|
|
13
13
|
* navigateur (`!IN_BROWSER`), retourne un Ref fige a `false`.
|
|
14
14
|
*
|
|
15
15
|
* @description
|
|
16
|
-
*
|
|
16
|
+
* ⚠️ Dans un navigateur, ce composable PREFERE `createOrigam()` : il
|
|
17
17
|
* appelle `useDisplay()`, dont l'injection n'existe que si le plugin est
|
|
18
|
-
* installe
|
|
19
|
-
* `
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* installe, pour savoir si l'app tourne en SSR. **#attach-harmonisation** —
|
|
19
|
+
* jusque-la, l'absence du plugin faisait LEVER `useDisplay()` (« Could not
|
|
20
|
+
* find Origam display injection »), ce qui a casse 4 e2e marketing (SSR
|
|
21
|
+
* Nuxt) : `useTeleport()`, qui appelle desormais ce composable pour eviter
|
|
22
|
+
* une course de montage (voir teleport.composable.ts), doit rester
|
|
23
|
+
* utilisable comme primitive BRUTE — sans `createOrigam()` — exactement
|
|
24
|
+
* comme il l'etait avant. Le `try/catch` ci-dessous rattrape UNIQUEMENT ce
|
|
25
|
+
* cas (plugin absent) et retombe sur le chemin non-SSR (`shallowRef(true)`,
|
|
26
|
+
* aucun delai) : un consommateur qui a reellement besoin du signal SSR et
|
|
27
|
+
* installe le plugin obtient exactement le comportement documente plus
|
|
28
|
+
* haut, inchange. Aucun test n'epinglait le lever — `grep -rn "Could not
|
|
29
|
+
* find Origam display injection" packages/tests` ne retourne rien.
|
|
22
30
|
********************************************************/
|
|
23
31
|
export declare function useHydration(): import("vue").ShallowRef<boolean, boolean>;
|
|
@@ -3,7 +3,12 @@ import { useDisplay } from "./display.composable.js";
|
|
|
3
3
|
import { IN_BROWSER } from "../../consts/Commons/commons.const.js";
|
|
4
4
|
export function useHydration() {
|
|
5
5
|
if (!IN_BROWSER) return shallowRef(false);
|
|
6
|
-
|
|
6
|
+
let ssr;
|
|
7
|
+
try {
|
|
8
|
+
({ ssr } = useDisplay());
|
|
9
|
+
} catch {
|
|
10
|
+
return shallowRef(true);
|
|
11
|
+
}
|
|
7
12
|
if (ssr) {
|
|
8
13
|
const isMounted = shallowRef(false);
|
|
9
14
|
onMounted(() => {
|
|
@@ -7,10 +7,13 @@ exports.useTeleport = useTeleport;
|
|
|
7
7
|
var _commons = require("../../consts/Commons/commons.const.cjs");
|
|
8
8
|
var _console = require("../../utils/Commons/console.util.cjs");
|
|
9
9
|
var _vue = require("vue");
|
|
10
|
+
var _hydration = require("./hydration.composable.cjs");
|
|
10
11
|
function useTeleport(target) {
|
|
12
|
+
const isHydrated = (0, _hydration.useHydration)();
|
|
11
13
|
const teleportTarget = (0, _vue.computed)(() => {
|
|
12
14
|
const _target = target.value;
|
|
13
15
|
if (_target === true || !_commons.IN_BROWSER) return void 0;
|
|
16
|
+
if (!isHydrated.value) return void 0;
|
|
14
17
|
const targetElement = _target === false ? document.body : typeof _target === "string" ? document.querySelector(_target) : _target;
|
|
15
18
|
if (targetElement == null) {
|
|
16
19
|
(0, _console.consoleWarn)(`Unable to locate target ${_target}`);
|