@abraca/nuxt 1.8.0 → 1.9.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/README.md +27 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +42 -4
- package/dist/runtime/components/docs/ADocsNavigation.d.vue.ts +155 -0
- package/dist/runtime/components/docs/ADocsNavigation.vue +154 -0
- package/dist/runtime/components/docs/ADocsNavigation.vue.d.ts +155 -0
- package/dist/runtime/components/docs/ADocsSearch.d.vue.ts +249 -0
- package/dist/runtime/components/docs/ADocsSearch.vue +187 -0
- package/dist/runtime/components/docs/ADocsSearch.vue.d.ts +249 -0
- package/dist/runtime/components/docs/ADocsSearchButton.d.vue.ts +253 -0
- package/dist/runtime/components/docs/ADocsSearchButton.vue +99 -0
- package/dist/runtime/components/docs/ADocsSearchButton.vue.d.ts +253 -0
- package/dist/runtime/components/docs/ADocsSurround.d.vue.ts +56 -0
- package/dist/runtime/components/docs/ADocsSurround.vue +68 -0
- package/dist/runtime/components/docs/ADocsSurround.vue.d.ts +56 -0
- package/dist/runtime/components/docs/ADocsToc.d.vue.ts +117 -0
- package/dist/runtime/components/docs/ADocsToc.vue +194 -0
- package/dist/runtime/components/docs/ADocsToc.vue.d.ts +117 -0
- package/dist/runtime/components/editor/ADocLinkPopover.vue +1 -5
- package/dist/runtime/components/renderers/AMediaRenderer.vue +1 -1
- package/dist/runtime/components/shell/ADocPanelSettings.d.vue.ts +32 -2
- package/dist/runtime/components/shell/ADocPanelSettings.vue +289 -2
- package/dist/runtime/components/shell/ADocPanelSettings.vue.d.ts +32 -2
- package/dist/runtime/composables/useDocsSearch.d.ts +24 -0
- package/dist/runtime/composables/useDocsSearch.js +34 -0
- package/dist/runtime/extensions/doc-embed.js +2 -1
- package/dist/runtime/extensions/doc-link-drop.js +4 -4
- package/dist/runtime/extensions/doc-link.d.ts +12 -0
- package/dist/runtime/extensions/doc-link.js +60 -0
- package/dist/runtime/extensions/views/DocEmbedView.vue +18 -3
- package/dist/runtime/extensions/views/DocLinkView.d.vue.ts +4 -0
- package/dist/runtime/extensions/views/DocLinkView.vue +71 -0
- package/dist/runtime/extensions/views/DocLinkView.vue.d.ts +4 -0
- package/dist/runtime/plugin-abracadabra.client.js +18 -2
- package/dist/runtime/plugins/core.plugin.js +3 -0
- package/dist/runtime/server/plugins/abracadabra-service.js +3 -1
- package/dist/runtime/theme/content/_shared.d.ts +6 -0
- package/dist/runtime/theme/content/_shared.js +6 -0
- package/dist/runtime/theme/content/content-navigation.d.ts +120 -0
- package/dist/runtime/theme/content/content-navigation.js +155 -0
- package/dist/runtime/theme/content/content-search-button.d.ts +16 -0
- package/dist/runtime/theme/content/content-search-button.js +15 -0
- package/dist/runtime/theme/content/content-search.d.ts +24 -0
- package/dist/runtime/theme/content/content-search.js +23 -0
- package/dist/runtime/theme/content/content-surround.d.ts +22 -0
- package/dist/runtime/theme/content/content-surround.js +23 -0
- package/dist/runtime/theme/content/content-toc.d.ts +84 -0
- package/dist/runtime/theme/content/content-toc.js +94 -0
- package/dist/runtime/theme/content/index.d.ts +5 -0
- package/dist/runtime/theme/content/index.js +5 -0
- package/dist/runtime/utils/content.d.ts +19 -0
- package/dist/runtime/utils/content.js +23 -0
- package/dist/runtime/utils/docReferenceEdges.js +1 -1
- package/package.json +20 -13
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { NodeViewWrapper } from "@tiptap/vue-3";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { navigateTo } from "#imports";
|
|
5
|
+
import { useAbracadabra } from "../../composables/useAbracadabra";
|
|
6
|
+
import { useSyncedMap } from "../../composables/useYDoc";
|
|
7
|
+
import { resolveDocType } from "../../utils/docTypes";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
decorations: { type: Array, required: true },
|
|
10
|
+
selected: { type: Boolean, required: true },
|
|
11
|
+
updateAttributes: { type: Function, required: true },
|
|
12
|
+
deleteNode: { type: Function, required: true },
|
|
13
|
+
node: { type: null, required: true },
|
|
14
|
+
view: { type: null, required: true },
|
|
15
|
+
getPos: { type: null, required: true },
|
|
16
|
+
innerDecorations: { type: null, required: true },
|
|
17
|
+
editor: { type: Object, required: true },
|
|
18
|
+
extension: { type: Object, required: true },
|
|
19
|
+
HTMLAttributes: { type: Object, required: true }
|
|
20
|
+
});
|
|
21
|
+
const { doc: rootDoc } = useAbracadabra();
|
|
22
|
+
const treeMap = useSyncedMap(
|
|
23
|
+
rootDoc,
|
|
24
|
+
"doc-tree"
|
|
25
|
+
);
|
|
26
|
+
const docId = computed(() => props.node.attrs.docId);
|
|
27
|
+
const treeEntry = computed(() => treeMap.data[docId.value]);
|
|
28
|
+
const exists = computed(() => !!treeEntry.value);
|
|
29
|
+
const docType = computed(() => resolveDocType(treeEntry.value?.type));
|
|
30
|
+
const label = computed(() => treeEntry.value?.label || "Untitled");
|
|
31
|
+
function navigate(e) {
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
e.stopPropagation();
|
|
34
|
+
if (!docId.value) return;
|
|
35
|
+
navigateTo(`/doc/${docId.value}`);
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<NodeViewWrapper
|
|
41
|
+
as="span"
|
|
42
|
+
class="inline-flex align-baseline"
|
|
43
|
+
>
|
|
44
|
+
<UBadge
|
|
45
|
+
v-if="exists"
|
|
46
|
+
:icon="docType.icon"
|
|
47
|
+
color="neutral"
|
|
48
|
+
variant="subtle"
|
|
49
|
+
size="sm"
|
|
50
|
+
class="dl-badge rounded-full cursor-pointer"
|
|
51
|
+
:class="{ 'dl-badge-selected': props.selected }"
|
|
52
|
+
@click="navigate"
|
|
53
|
+
>
|
|
54
|
+
{{ label }}
|
|
55
|
+
</UBadge>
|
|
56
|
+
<UBadge
|
|
57
|
+
v-else
|
|
58
|
+
icon="i-lucide-file-x"
|
|
59
|
+
color="error"
|
|
60
|
+
variant="outline"
|
|
61
|
+
size="sm"
|
|
62
|
+
class="dl-badge rounded-full"
|
|
63
|
+
>
|
|
64
|
+
Missing document
|
|
65
|
+
</UBadge>
|
|
66
|
+
</NodeViewWrapper>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<style scoped>
|
|
70
|
+
.dl-badge{transition:background-color .12s ease,box-shadow .12s ease;vertical-align:baseline}.dl-badge:hover{background:var(--ui-bg-accented)}.dl-badge-selected,:deep(.ProseMirror-selectednode) .dl-badge{box-shadow:0 0 0 2px var(--ui-primary)}
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<NodeViewProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
@@ -228,6 +228,20 @@ export default defineNuxtPlugin({
|
|
|
228
228
|
const userColor = ref("hsl(217, 70%, 75%)");
|
|
229
229
|
const userColorName = ref("blue");
|
|
230
230
|
const userNeutralColorName = ref("zinc");
|
|
231
|
+
watch([status, synced], ([s, sy]) => {
|
|
232
|
+
try {
|
|
233
|
+
const ready = s === "connected" && sy;
|
|
234
|
+
window.__abracaReady = ready ? Date.now() : false;
|
|
235
|
+
} catch {
|
|
236
|
+
}
|
|
237
|
+
}, { immediate: true });
|
|
238
|
+
watch(unsyncedChanges, (n) => {
|
|
239
|
+
try {
|
|
240
|
+
;
|
|
241
|
+
window.__abracaUnsynced = n;
|
|
242
|
+
} catch {
|
|
243
|
+
}
|
|
244
|
+
}, { immediate: true });
|
|
231
245
|
const currentServerUrl = ref(defaultUrl);
|
|
232
246
|
const savedServers = ref([]);
|
|
233
247
|
let _serversLoaded = false;
|
|
@@ -592,7 +606,9 @@ export default defineNuxtPlugin({
|
|
|
592
606
|
]);
|
|
593
607
|
setSdkModule(sdkModule);
|
|
594
608
|
const { AbracadabraClient, AbracadabraProvider, AbracadabraWS, CryptoIdentityKeystore } = sdkModule;
|
|
595
|
-
|
|
609
|
+
const edEtc = ed.etc;
|
|
610
|
+
edEtc.sha512Sync = (...m) => sha512(edEtc.concatBytes(...m));
|
|
611
|
+
edEtc.sha512Async = (...m) => Promise.resolve(edEtc.sha512Sync(...m));
|
|
596
612
|
const ks = new CryptoIdentityKeystore();
|
|
597
613
|
keystore.value = ks;
|
|
598
614
|
let privKey = null;
|
|
@@ -618,7 +634,7 @@ export default defineNuxtPlugin({
|
|
|
618
634
|
privKey = fromBase64Url(storedPrivKey);
|
|
619
635
|
addLog("Using guest identity (soft key)", "auth");
|
|
620
636
|
} else {
|
|
621
|
-
privKey = ed.utils.
|
|
637
|
+
privKey = ed.utils.randomPrivateKey();
|
|
622
638
|
localStorage.setItem("abracadabra_privkey", toBase64Url(privKey));
|
|
623
639
|
addLog("Created new guest identity (soft key)", "auth");
|
|
624
640
|
}
|
|
@@ -35,6 +35,7 @@ async function loadClientExtensions() {
|
|
|
35
35
|
{ FileBlock },
|
|
36
36
|
{ MetaField },
|
|
37
37
|
{ DocEmbed },
|
|
38
|
+
{ DocLink },
|
|
38
39
|
{ DocLinkDrop },
|
|
39
40
|
{ MentionDrop },
|
|
40
41
|
{ SelectionDrag },
|
|
@@ -76,6 +77,7 @@ async function loadClientExtensions() {
|
|
|
76
77
|
import("../extensions/file-block.js"),
|
|
77
78
|
import("../extensions/meta-field.js"),
|
|
78
79
|
import("../extensions/doc-embed.js"),
|
|
80
|
+
import("../extensions/doc-link.js"),
|
|
79
81
|
import("../extensions/doc-link-drop.js"),
|
|
80
82
|
import("../extensions/mention-drop.js"),
|
|
81
83
|
import("../extensions/selection-drag.js"),
|
|
@@ -129,6 +131,7 @@ async function loadClientExtensions() {
|
|
|
129
131
|
MetaField,
|
|
130
132
|
// Document embeds & linking
|
|
131
133
|
DocEmbed,
|
|
134
|
+
DocLink,
|
|
132
135
|
DocLinkDrop,
|
|
133
136
|
MentionDrop,
|
|
134
137
|
SelectionDrag,
|
|
@@ -42,7 +42,9 @@ export default defineNitroPlugin(async (nitroApp) => {
|
|
|
42
42
|
import("@noble/hashes/sha512"),
|
|
43
43
|
import("yjs")
|
|
44
44
|
]);
|
|
45
|
-
|
|
45
|
+
const edEtc = ed.etc;
|
|
46
|
+
edEtc.sha512Sync = (...m) => sha512(edEtc.concatBytes(...m));
|
|
47
|
+
edEtc.sha512Async = (...m) => Promise.resolve(edEtc.sha512Sync(...m));
|
|
46
48
|
const privKey = fromBase64Url(privKeyB64);
|
|
47
49
|
const client = new AbracadabraClient({
|
|
48
50
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Nuxt runtime config augmentation not resolved in Nitro
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
slots: {
|
|
3
|
+
root: string;
|
|
4
|
+
content: string;
|
|
5
|
+
list: string;
|
|
6
|
+
item: string;
|
|
7
|
+
listWithChildren: string;
|
|
8
|
+
itemWithChildren: string;
|
|
9
|
+
trigger: string;
|
|
10
|
+
link: string;
|
|
11
|
+
linkLeadingIcon: string;
|
|
12
|
+
linkTrailing: string;
|
|
13
|
+
linkTrailingBadge: string;
|
|
14
|
+
linkTrailingBadgeSize: string;
|
|
15
|
+
linkTrailingIcon: string;
|
|
16
|
+
linkTitle: string;
|
|
17
|
+
linkTitleExternalIcon: string;
|
|
18
|
+
};
|
|
19
|
+
variants: {
|
|
20
|
+
color: {
|
|
21
|
+
neutral: {
|
|
22
|
+
trigger: string;
|
|
23
|
+
link: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
highlightColor: {
|
|
27
|
+
neutral: string;
|
|
28
|
+
};
|
|
29
|
+
variant: {
|
|
30
|
+
pill: string;
|
|
31
|
+
link: string;
|
|
32
|
+
};
|
|
33
|
+
active: {
|
|
34
|
+
true: {
|
|
35
|
+
link: string;
|
|
36
|
+
};
|
|
37
|
+
false: {
|
|
38
|
+
link: string;
|
|
39
|
+
linkLeadingIcon: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
disabled: {
|
|
43
|
+
true: {
|
|
44
|
+
trigger: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
highlight: {
|
|
48
|
+
true: {};
|
|
49
|
+
};
|
|
50
|
+
level: {
|
|
51
|
+
true: {
|
|
52
|
+
item: string;
|
|
53
|
+
itemWithChildren: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
compoundVariants: ({
|
|
58
|
+
color: string;
|
|
59
|
+
variant: string;
|
|
60
|
+
active: boolean;
|
|
61
|
+
class: {
|
|
62
|
+
link: string;
|
|
63
|
+
linkLeadingIcon: string;
|
|
64
|
+
};
|
|
65
|
+
} | {
|
|
66
|
+
highlightColor: string;
|
|
67
|
+
highlight: boolean;
|
|
68
|
+
level: boolean;
|
|
69
|
+
active: boolean;
|
|
70
|
+
class: {
|
|
71
|
+
link: string;
|
|
72
|
+
};
|
|
73
|
+
} | {
|
|
74
|
+
highlight: boolean;
|
|
75
|
+
level: boolean;
|
|
76
|
+
class: {
|
|
77
|
+
link: (string | false | undefined)[];
|
|
78
|
+
linkLeadingIcon?: undefined;
|
|
79
|
+
};
|
|
80
|
+
disabled?: undefined;
|
|
81
|
+
active?: undefined;
|
|
82
|
+
variant?: undefined;
|
|
83
|
+
} | {
|
|
84
|
+
disabled: boolean;
|
|
85
|
+
active: boolean;
|
|
86
|
+
variant: string;
|
|
87
|
+
class: {
|
|
88
|
+
link: (string | false | undefined)[];
|
|
89
|
+
linkLeadingIcon: (string | false | undefined)[];
|
|
90
|
+
};
|
|
91
|
+
highlight?: undefined;
|
|
92
|
+
level?: undefined;
|
|
93
|
+
} | {
|
|
94
|
+
variant: string;
|
|
95
|
+
active: boolean;
|
|
96
|
+
highlight: boolean;
|
|
97
|
+
class: {
|
|
98
|
+
link: string;
|
|
99
|
+
linkLeadingIcon?: undefined;
|
|
100
|
+
};
|
|
101
|
+
level?: undefined;
|
|
102
|
+
disabled?: undefined;
|
|
103
|
+
} | {
|
|
104
|
+
variant: string;
|
|
105
|
+
active: boolean;
|
|
106
|
+
highlight: boolean;
|
|
107
|
+
disabled: boolean;
|
|
108
|
+
class: {
|
|
109
|
+
link: (string | false | undefined)[];
|
|
110
|
+
linkLeadingIcon?: undefined;
|
|
111
|
+
};
|
|
112
|
+
level?: undefined;
|
|
113
|
+
})[];
|
|
114
|
+
defaultVariants: {
|
|
115
|
+
color: string;
|
|
116
|
+
highlightColor: string;
|
|
117
|
+
variant: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
export default _default;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { themeOptions } from "./_shared.js";
|
|
2
|
+
const contentNavigation = (options) => ({
|
|
3
|
+
slots: {
|
|
4
|
+
root: "",
|
|
5
|
+
content: "data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none",
|
|
6
|
+
list: "isolate -mx-2.5 -mt-1.5",
|
|
7
|
+
item: "",
|
|
8
|
+
listWithChildren: "ms-5 border-s border-default",
|
|
9
|
+
itemWithChildren: "flex flex-col data-[state=open]:mb-1.5",
|
|
10
|
+
trigger: "font-semibold",
|
|
11
|
+
link: "group relative w-full px-2.5 py-1.5 before:inset-y-px before:inset-x-0 flex items-center gap-1.5 text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
|
|
12
|
+
linkLeadingIcon: "shrink-0 size-5",
|
|
13
|
+
linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
14
|
+
linkTrailingBadge: "shrink-0",
|
|
15
|
+
linkTrailingBadgeSize: "sm",
|
|
16
|
+
linkTrailingIcon: "size-5 transform transition-transform duration-200 shrink-0 group-data-[state=open]:rotate-180",
|
|
17
|
+
linkTitle: "truncate",
|
|
18
|
+
linkTitleExternalIcon: "size-3 align-top text-dimmed"
|
|
19
|
+
},
|
|
20
|
+
variants: {
|
|
21
|
+
color: {
|
|
22
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, {
|
|
23
|
+
trigger: `focus-visible:ring-${color}`,
|
|
24
|
+
link: `focus-visible:before:ring-${color}`
|
|
25
|
+
}])),
|
|
26
|
+
neutral: {
|
|
27
|
+
trigger: "focus-visible:ring-inverted",
|
|
28
|
+
link: "focus-visible:before:ring-inverted"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
highlightColor: {
|
|
32
|
+
...Object.fromEntries((options.theme.colors || []).map((color) => [color, ""])),
|
|
33
|
+
neutral: ""
|
|
34
|
+
},
|
|
35
|
+
variant: {
|
|
36
|
+
pill: "",
|
|
37
|
+
link: ""
|
|
38
|
+
},
|
|
39
|
+
active: {
|
|
40
|
+
true: {
|
|
41
|
+
link: "font-medium"
|
|
42
|
+
},
|
|
43
|
+
false: {
|
|
44
|
+
link: "text-muted",
|
|
45
|
+
linkLeadingIcon: "text-dimmed"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
disabled: {
|
|
49
|
+
true: {
|
|
50
|
+
trigger: "data-[state=open]:text-highlighted"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
highlight: {
|
|
54
|
+
true: {}
|
|
55
|
+
},
|
|
56
|
+
level: {
|
|
57
|
+
true: {
|
|
58
|
+
item: "ps-1.5 -ms-px",
|
|
59
|
+
itemWithChildren: "ps-1.5 -ms-px"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
compoundVariants: [{
|
|
64
|
+
highlight: true,
|
|
65
|
+
level: true,
|
|
66
|
+
class: {
|
|
67
|
+
link: ["after:absolute after:-left-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full", options.theme.transitions && "after:transition-colors"]
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
disabled: false,
|
|
71
|
+
active: false,
|
|
72
|
+
variant: "pill",
|
|
73
|
+
class: {
|
|
74
|
+
link: ["hover:text-highlighted hover:before:bg-elevated/50 data-[state=open]:text-highlighted", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
75
|
+
linkLeadingIcon: ["group-hover:text-default group-data-[state=open]:text-default", options.theme.transitions && "transition-colors"]
|
|
76
|
+
}
|
|
77
|
+
}, ...(options.theme.colors || []).map((color) => ({
|
|
78
|
+
color,
|
|
79
|
+
variant: "pill",
|
|
80
|
+
active: true,
|
|
81
|
+
class: {
|
|
82
|
+
link: `text-${color}`,
|
|
83
|
+
linkLeadingIcon: `text-${color} group-data-[state=open]:text-${color}`
|
|
84
|
+
}
|
|
85
|
+
})), {
|
|
86
|
+
color: "neutral",
|
|
87
|
+
variant: "pill",
|
|
88
|
+
active: true,
|
|
89
|
+
class: {
|
|
90
|
+
link: "text-highlighted",
|
|
91
|
+
linkLeadingIcon: "text-highlighted group-data-[state=open]:text-highlighted"
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
variant: "pill",
|
|
95
|
+
active: true,
|
|
96
|
+
highlight: false,
|
|
97
|
+
class: {
|
|
98
|
+
link: "before:bg-elevated"
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
variant: "pill",
|
|
102
|
+
active: true,
|
|
103
|
+
highlight: true,
|
|
104
|
+
disabled: false,
|
|
105
|
+
class: {
|
|
106
|
+
link: ["hover:before:bg-elevated/50", options.theme.transitions && "before:transition-colors"]
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
disabled: false,
|
|
110
|
+
active: false,
|
|
111
|
+
variant: "link",
|
|
112
|
+
class: {
|
|
113
|
+
link: ["hover:text-highlighted data-[state=open]:text-highlighted", options.theme.transitions && "transition-colors"],
|
|
114
|
+
linkLeadingIcon: ["group-hover:text-default group-data-[state=open]:text-default", options.theme.transitions && "transition-colors"]
|
|
115
|
+
}
|
|
116
|
+
}, ...(options.theme.colors || []).map((color) => ({
|
|
117
|
+
color,
|
|
118
|
+
variant: "link",
|
|
119
|
+
active: true,
|
|
120
|
+
class: {
|
|
121
|
+
link: `text-${color}`,
|
|
122
|
+
linkLeadingIcon: `text-${color} group-data-[state=open]:text-${color}`
|
|
123
|
+
}
|
|
124
|
+
})), {
|
|
125
|
+
color: "neutral",
|
|
126
|
+
variant: "link",
|
|
127
|
+
active: true,
|
|
128
|
+
class: {
|
|
129
|
+
link: "text-highlighted",
|
|
130
|
+
linkLeadingIcon: "text-highlighted group-data-[state=open]:text-highlighted"
|
|
131
|
+
}
|
|
132
|
+
}, ...(options.theme.colors || []).map((highlightColor) => ({
|
|
133
|
+
highlightColor,
|
|
134
|
+
highlight: true,
|
|
135
|
+
level: true,
|
|
136
|
+
active: true,
|
|
137
|
+
class: {
|
|
138
|
+
link: `after:bg-${highlightColor}`
|
|
139
|
+
}
|
|
140
|
+
})), {
|
|
141
|
+
highlightColor: "neutral",
|
|
142
|
+
highlight: true,
|
|
143
|
+
level: true,
|
|
144
|
+
active: true,
|
|
145
|
+
class: {
|
|
146
|
+
link: "after:bg-inverted"
|
|
147
|
+
}
|
|
148
|
+
}],
|
|
149
|
+
defaultVariants: {
|
|
150
|
+
color: "primary",
|
|
151
|
+
highlightColor: "primary",
|
|
152
|
+
variant: "pill"
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
export default contentNavigation(themeOptions);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
slots: {
|
|
3
|
+
modal: string;
|
|
4
|
+
input: string;
|
|
5
|
+
};
|
|
6
|
+
variants: {
|
|
7
|
+
fullscreen: {
|
|
8
|
+
false: {
|
|
9
|
+
modal: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
xs: {};
|
|
14
|
+
sm: {};
|
|
15
|
+
md: {};
|
|
16
|
+
lg: {};
|
|
17
|
+
xl: {};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
size: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
slots: {
|
|
3
|
+
modal: "",
|
|
4
|
+
input: ""
|
|
5
|
+
},
|
|
6
|
+
variants: {
|
|
7
|
+
fullscreen: {
|
|
8
|
+
false: {
|
|
9
|
+
modal: "sm:max-w-3xl h-full sm:h-[28rem]"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
xs: {},
|
|
14
|
+
sm: {},
|
|
15
|
+
md: {},
|
|
16
|
+
lg: {},
|
|
17
|
+
xl: {}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
size: "md"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
slots: {
|
|
3
|
+
root: string;
|
|
4
|
+
link: (string | false | undefined)[];
|
|
5
|
+
linkLeading: (string | false | undefined)[];
|
|
6
|
+
linkLeadingIcon: (string | false | undefined)[];
|
|
7
|
+
linkTitle: string;
|
|
8
|
+
linkDescription: string;
|
|
9
|
+
};
|
|
10
|
+
variants: {
|
|
11
|
+
direction: {
|
|
12
|
+
left: {
|
|
13
|
+
linkLeadingIcon: (string | false | undefined)[];
|
|
14
|
+
};
|
|
15
|
+
right: {
|
|
16
|
+
link: string;
|
|
17
|
+
linkLeadingIcon: (string | false | undefined)[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { themeOptions } from "./_shared.js";
|
|
2
|
+
const contentSurround = (options) => ({
|
|
3
|
+
slots: {
|
|
4
|
+
root: "grid grid-cols-1 sm:grid-cols-2 gap-8",
|
|
5
|
+
link: ["group block px-6 py-8 rounded-lg border border-default hover:bg-elevated/50 focus-visible:outline-primary", options.theme.transitions && "transition-colors"],
|
|
6
|
+
linkLeading: ["inline-flex items-center rounded-full p-1.5 bg-elevated group-hover:bg-primary/10 ring ring-accented mb-4 group-hover:ring-primary/50", options.theme.transitions && "transition"],
|
|
7
|
+
linkLeadingIcon: ["size-5 shrink-0 text-highlighted group-hover:text-primary", options.theme.transitions && "transition-[color,translate]"],
|
|
8
|
+
linkTitle: "font-medium text-[15px] text-highlighted mb-1 truncate",
|
|
9
|
+
linkDescription: "text-sm text-muted line-clamp-2"
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
direction: {
|
|
13
|
+
left: {
|
|
14
|
+
linkLeadingIcon: [options.theme.transitions && "group-active:-translate-x-0.5"]
|
|
15
|
+
},
|
|
16
|
+
right: {
|
|
17
|
+
link: "text-end",
|
|
18
|
+
linkLeadingIcon: [options.theme.transitions && "group-active:translate-x-0.5"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export default contentSurround(themeOptions);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
slots: {
|
|
3
|
+
root: string;
|
|
4
|
+
container: string;
|
|
5
|
+
top: string;
|
|
6
|
+
bottom: string;
|
|
7
|
+
trigger: string;
|
|
8
|
+
title: string;
|
|
9
|
+
trailing: string;
|
|
10
|
+
trailingIcon: string;
|
|
11
|
+
content: string;
|
|
12
|
+
list: string;
|
|
13
|
+
listWithChildren: string;
|
|
14
|
+
item: string;
|
|
15
|
+
itemWithChildren: string;
|
|
16
|
+
link: string;
|
|
17
|
+
linkText: string;
|
|
18
|
+
indicator: string;
|
|
19
|
+
indicatorLine: string;
|
|
20
|
+
indicatorActive: string;
|
|
21
|
+
};
|
|
22
|
+
variants: {
|
|
23
|
+
color: {
|
|
24
|
+
neutral: string;
|
|
25
|
+
};
|
|
26
|
+
highlightColor: {
|
|
27
|
+
neutral: {
|
|
28
|
+
indicatorActive: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
active: {
|
|
32
|
+
false: {
|
|
33
|
+
link: (string | false | undefined)[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
highlight: {
|
|
37
|
+
true: string;
|
|
38
|
+
};
|
|
39
|
+
highlightVariant: {
|
|
40
|
+
straight: string;
|
|
41
|
+
circuit: string;
|
|
42
|
+
};
|
|
43
|
+
body: {
|
|
44
|
+
true: {
|
|
45
|
+
bottom: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
compoundVariants: ({
|
|
50
|
+
color: string;
|
|
51
|
+
active: boolean;
|
|
52
|
+
class: {
|
|
53
|
+
link: string;
|
|
54
|
+
};
|
|
55
|
+
} | {
|
|
56
|
+
highlight: boolean;
|
|
57
|
+
highlightVariant: string;
|
|
58
|
+
class: {
|
|
59
|
+
list: string;
|
|
60
|
+
item: string;
|
|
61
|
+
indicator: string;
|
|
62
|
+
indicatorLine: string;
|
|
63
|
+
indicatorActive: string;
|
|
64
|
+
itemWithChildren?: undefined;
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
highlight: boolean;
|
|
68
|
+
highlightVariant: string;
|
|
69
|
+
class: {
|
|
70
|
+
list: string;
|
|
71
|
+
item: string;
|
|
72
|
+
itemWithChildren: string;
|
|
73
|
+
indicator: string;
|
|
74
|
+
indicatorLine: string;
|
|
75
|
+
indicatorActive: string;
|
|
76
|
+
};
|
|
77
|
+
})[];
|
|
78
|
+
defaultVariants: {
|
|
79
|
+
color: string;
|
|
80
|
+
highlightColor: string;
|
|
81
|
+
highlightVariant: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export default _default;
|