mnfst 0.5.14

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.
Files changed (47) hide show
  1. package/LICENSE +11 -0
  2. package/README.md +58 -0
  3. package/dist/manifest.accordion.css +81 -0
  4. package/dist/manifest.appwrite.auth.js +6247 -0
  5. package/dist/manifest.appwrite.data.js +1586 -0
  6. package/dist/manifest.appwrite.presence.js +1845 -0
  7. package/dist/manifest.avatar.css +113 -0
  8. package/dist/manifest.button.css +79 -0
  9. package/dist/manifest.checkbox.css +58 -0
  10. package/dist/manifest.code.css +453 -0
  11. package/dist/manifest.code.js +958 -0
  12. package/dist/manifest.code.min.css +1 -0
  13. package/dist/manifest.components.js +737 -0
  14. package/dist/manifest.css +3124 -0
  15. package/dist/manifest.data.js +11413 -0
  16. package/dist/manifest.dialog.css +130 -0
  17. package/dist/manifest.divider.css +77 -0
  18. package/dist/manifest.dropdown.css +278 -0
  19. package/dist/manifest.dropdowns.js +378 -0
  20. package/dist/manifest.form.css +169 -0
  21. package/dist/manifest.icons.js +161 -0
  22. package/dist/manifest.input.css +129 -0
  23. package/dist/manifest.js +302 -0
  24. package/dist/manifest.localization.js +571 -0
  25. package/dist/manifest.markdown.js +738 -0
  26. package/dist/manifest.min.css +1 -0
  27. package/dist/manifest.radio.css +38 -0
  28. package/dist/manifest.resize.css +233 -0
  29. package/dist/manifest.resize.js +442 -0
  30. package/dist/manifest.router.js +1207 -0
  31. package/dist/manifest.sidebar.css +102 -0
  32. package/dist/manifest.slides.css +80 -0
  33. package/dist/manifest.slides.js +173 -0
  34. package/dist/manifest.switch.css +44 -0
  35. package/dist/manifest.table.css +74 -0
  36. package/dist/manifest.tabs.js +273 -0
  37. package/dist/manifest.tailwind.js +578 -0
  38. package/dist/manifest.theme.css +119 -0
  39. package/dist/manifest.themes.js +109 -0
  40. package/dist/manifest.toast.css +92 -0
  41. package/dist/manifest.toasts.js +285 -0
  42. package/dist/manifest.tooltip.css +156 -0
  43. package/dist/manifest.tooltips.js +331 -0
  44. package/dist/manifest.typography.css +341 -0
  45. package/dist/manifest.utilities.css +399 -0
  46. package/dist/manifest.utilities.js +3197 -0
  47. package/package.json +63 -0
@@ -0,0 +1,102 @@
1
+ /* Manifest Sidebars */
2
+
3
+ @layer base {
4
+
5
+ /* Base popover styles */
6
+ :where([popover]):not(.unstyle) {
7
+ display: none;
8
+ transition: opacity .15s ease-in, scale .15s ease-in, display .15s ease-in;
9
+ transition-behavior: allow-discrete;
10
+
11
+ &:popover-open {
12
+ display: flex
13
+ }
14
+
15
+ /* Opening state */
16
+ @starting-style {
17
+ scale: .9;
18
+ opacity: 0
19
+ }
20
+
21
+ /* Closing state */
22
+ &:not(:popover-open) {
23
+ display: none !important;
24
+ scale: 1;
25
+ opacity: 0;
26
+ transition-duration: .15s;
27
+ transition-timing-function: ease-out
28
+ }
29
+ }
30
+ }
31
+
32
+ @layer components {
33
+
34
+ :where(aside[popover]) {
35
+ inset-inline-start: auto;
36
+ inset-inline-end: 0;
37
+ width: fit-content;
38
+ min-width: 20vw;
39
+ max-width: 80vw;
40
+ max-width: 100%;
41
+ height: 100%;
42
+ overflow-y: auto;
43
+ z-index: 200;
44
+ background-color: var(--color-popover-surface, oklch(100% 0 0));
45
+ transition: opacity .15s ease-in, transform .15s ease-in, display .15s ease-in;
46
+ transition-behavior: allow-discrete;
47
+
48
+ /* Opening state - slide in from inline-end */
49
+ @starting-style {
50
+ transform: translateX(100%);
51
+ opacity: 1;
52
+ scale: 1
53
+ }
54
+
55
+ /* Closing state - slide out to inline-end */
56
+ &:not(:popover-open) {
57
+ transform: translateX(100%);
58
+ opacity: 1;
59
+ scale: 1
60
+ }
61
+
62
+ /* RTL overrides - slide in from left in RTL context */
63
+ [dir=rtl] & {
64
+ @starting-style {
65
+ transform: translateX(-100%)
66
+ }
67
+
68
+ &:not(:popover-open) {
69
+ transform: translateX(-100%)
70
+ }
71
+ }
72
+ }
73
+
74
+ :where(aside[popover].appear-start) {
75
+ inset-inline-start: 0;
76
+ inset-inline-end: auto;
77
+
78
+ @starting-style {
79
+ transform: translateX(-100%)
80
+ }
81
+
82
+ &:not(:popover-open) {
83
+ transform: translateX(-100%)
84
+ }
85
+
86
+ /* RTL overrides */
87
+ [dir=rtl] & {
88
+ @starting-style {
89
+ transform: translateX(100%)
90
+ }
91
+
92
+ &:not(:popover-open) {
93
+ transform: translateX(100%)
94
+ }
95
+ }
96
+ }
97
+
98
+ /* Dark mode override */
99
+ .dark :where(aside[popover]) {
100
+ background-color: var(--color-surface-1, oklch(98.17% 0.0005 95.87))
101
+ }
102
+ }
@@ -0,0 +1,80 @@
1
+ /* Manifest Slides */
2
+
3
+ @layer components {
4
+
5
+ [x-carousel] {
6
+ position: relative;
7
+ display: flex;
8
+ flex-direction: column;
9
+ width: 100%;
10
+ overflow: hidden;
11
+
12
+ /* Slides container */
13
+ .carousel-slides {
14
+ display: flex;
15
+ transition: transform 300ms ease-in-out;
16
+ width: 100%;
17
+ aspect-ratio: 16 / 9
18
+ }
19
+
20
+ /* Previous & next buttons */
21
+ & button[\@click="prev()"],
22
+ & button[\@click="next()"] {
23
+ position: absolute;
24
+ top: 50%;
25
+ transform: translateY(-50%);
26
+ background-color: oklch(100% 0 0 / 0.15);
27
+
28
+ &:hover {
29
+ background-color: oklch(100% 0 0 / 0.3)
30
+ }
31
+ }
32
+
33
+ & button[\@click="prev()"] {
34
+ left: calc(var(--spacing) * 4)
35
+ }
36
+
37
+ & button[\@click="next()"] {
38
+ left: auto;
39
+ right: calc(var(--spacing) * 4)
40
+ }
41
+
42
+ /* Dots container */
43
+ .carousel-dots {
44
+ position: absolute;
45
+ bottom: calc(var(--spacing) * 4);
46
+ left: 50%;
47
+ transform: translateX(-50%);
48
+ display: flex;
49
+ gap: calc(var(--spacing) * 2);
50
+ max-width: 100%;
51
+ padding: 0 calc(var(--spacing) * 4);
52
+ overflow-x: auto;
53
+ -webkit-overflow-scrolling: touch;
54
+ scrollbar-width: none;
55
+
56
+ &::-webkit-scrollbar {
57
+ display: none
58
+ }
59
+
60
+ /* Dot button */
61
+ & span {
62
+ flex-shrink: 0;
63
+ width: 0.625rem;
64
+ height: 0.625rem;
65
+ border-radius: 50%;
66
+ background-color: oklch(100% 0 0 / 0.15);
67
+ cursor: pointer;
68
+ transition: background-color 300ms ease-in-out;
69
+
70
+ &:hover {
71
+ background-color: oklch(100% 0 0 / 0.3)
72
+ }
73
+
74
+ &.active {
75
+ background-color: white
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,173 @@
1
+ /* Manifest Slides */
2
+
3
+ function initializeCarouselPlugin() {
4
+
5
+ Alpine.directive('carousel', (el, { value, modifiers, expression }, { evaluate, effect }) => {
6
+ const state = {
7
+ carousel: {
8
+ autoplay: modifiers.includes('autoplay'),
9
+ interval: 3000,
10
+ loop: modifiers.includes('loop'),
11
+ arrows: modifiers.includes('arrows'),
12
+ dots: modifiers.includes('dots'),
13
+ thumbnails: modifiers.includes('thumbnails'),
14
+ enableDrag: !modifiers.includes('no-drag')
15
+ },
16
+ currentSlide: 0,
17
+ dragging: false,
18
+ startX: 0,
19
+
20
+ // Get total slides by counting actual DOM elements
21
+ get totalSlides() {
22
+ const track = el.querySelector('.carousel-slides');
23
+ if (!track) return 0;
24
+ return Array.from(track.children).filter(child =>
25
+ child.tagName !== 'TEMPLATE'
26
+ ).length;
27
+ },
28
+
29
+ // Navigation methods
30
+ next() {
31
+ const total = this.totalSlides;
32
+ if (this.currentSlide >= total - 1) {
33
+ if (this.carousel.loop) {
34
+ this.currentSlide = 0;
35
+ }
36
+ } else {
37
+ this.currentSlide++;
38
+ }
39
+ },
40
+
41
+ prev() {
42
+ const total = this.totalSlides;
43
+ if (this.currentSlide <= 0) {
44
+ if (this.carousel.loop) {
45
+ this.currentSlide = total - 1;
46
+ }
47
+ } else {
48
+ this.currentSlide--;
49
+ }
50
+ },
51
+
52
+ goToSlide(index) {
53
+ const total = this.totalSlides;
54
+ if (index >= 0 && index < total) {
55
+ this.currentSlide = index;
56
+ }
57
+ },
58
+
59
+ // Drag handlers
60
+ startDrag(e) {
61
+ if (!this.carousel.enableDrag) return;
62
+ this.dragging = true;
63
+ this.startX = e.type === 'mousedown' ? e.pageX : e.touches[0].pageX;
64
+ },
65
+
66
+ drag(e) {
67
+ if (!this.dragging) return;
68
+ e.preventDefault();
69
+ const currentX = e.type === 'mousemove' ? e.pageX : e.touches[0].pageX;
70
+ const diff = currentX - this.startX;
71
+
72
+ if (Math.abs(diff) > 50) {
73
+ if (diff > 0) {
74
+ this.prev();
75
+ } else {
76
+ this.next();
77
+ }
78
+ this.dragging = false;
79
+ }
80
+ },
81
+
82
+ endDrag() {
83
+ this.dragging = false;
84
+ },
85
+
86
+ // Add this method to generate dots array
87
+ get dots() {
88
+ return Array.from({ length: this.totalSlides }, (_, i) => ({
89
+ index: i,
90
+ active: i === this.currentSlide
91
+ }));
92
+ }
93
+ };
94
+
95
+ Alpine.bind(el, {
96
+ 'x-data'() {
97
+ return state;
98
+ },
99
+
100
+ 'x-init'() {
101
+ setTimeout(() => {
102
+ const track = el.querySelector('.carousel-slides');
103
+ if (!track) {
104
+ console.warn('[Manifest] Carousel track element not found. Expected element with class "carousel-slides"');
105
+ return;
106
+ }
107
+
108
+ // Setup autoplay if enabled
109
+ if (this.carousel.autoplay) {
110
+ let interval;
111
+
112
+ const startAutoplay = () => {
113
+ interval = setInterval(() => this.next(), this.carousel.interval);
114
+ };
115
+
116
+ const stopAutoplay = () => {
117
+ clearInterval(interval);
118
+ };
119
+
120
+ // Start autoplay
121
+ startAutoplay();
122
+
123
+ // Pause on hover if autoplay is enabled
124
+ el.addEventListener('mouseenter', stopAutoplay);
125
+ el.addEventListener('mouseleave', startAutoplay);
126
+
127
+ // Clean up on element removal
128
+ el._x_cleanups = el._x_cleanups || [];
129
+ el._x_cleanups.push(() => {
130
+ stopAutoplay();
131
+ el.removeEventListener('mouseenter', stopAutoplay);
132
+ el.removeEventListener('mouseleave', startAutoplay);
133
+ });
134
+ }
135
+ }, 0);
136
+ }
137
+ });
138
+ });
139
+ }
140
+
141
+ // Track initialization to prevent duplicates
142
+ let slidesPluginInitialized = false;
143
+
144
+ function ensureSlidesPluginInitialized() {
145
+ if (slidesPluginInitialized) return;
146
+ if (!window.Alpine || typeof window.Alpine.directive !== 'function') return;
147
+
148
+ slidesPluginInitialized = true;
149
+ initializeCarouselPlugin();
150
+ }
151
+
152
+ // Expose on window for loader to call if needed
153
+ window.ensureSlidesPluginInitialized = ensureSlidesPluginInitialized;
154
+
155
+ // Handle both DOMContentLoaded and alpine:init
156
+ if (document.readyState === 'loading') {
157
+ document.addEventListener('DOMContentLoaded', ensureSlidesPluginInitialized);
158
+ }
159
+
160
+ document.addEventListener('alpine:init', ensureSlidesPluginInitialized);
161
+
162
+ // If Alpine is already initialized when this script loads, initialize immediately
163
+ if (window.Alpine && typeof window.Alpine.directive === 'function') {
164
+ setTimeout(ensureSlidesPluginInitialized, 0);
165
+ } else if (document.readyState === 'complete') {
166
+ const checkAlpine = setInterval(() => {
167
+ if (window.Alpine && typeof window.Alpine.directive === 'function') {
168
+ clearInterval(checkAlpine);
169
+ ensureSlidesPluginInitialized();
170
+ }
171
+ }, 10);
172
+ setTimeout(() => clearInterval(checkAlpine), 5000);
173
+ }
@@ -0,0 +1,44 @@
1
+ /* Manifest Switches */
2
+
3
+ @layer components {
4
+
5
+ :where(input[role=switch]):not(.unstyle) {
6
+ position: relative;
7
+ min-width: calc(var(--spacing-field-height, 2.25rem) * 0.65 * 2);
8
+ width: calc(var(--spacing-field-height, 2.25rem) * 0.65 * 2);
9
+ height: calc(var(--spacing-field-height, 2.25rem) * 0.65);
10
+ padding: 0;
11
+ box-sizing: content-box;
12
+ border-radius: calc(var(--spacing-field-height, 2.25rem) * 0.65);
13
+ cursor: pointer;
14
+
15
+ /* Marker */
16
+ &::before {
17
+ content: "";
18
+ position: absolute;
19
+ top: 0.125rem;
20
+ left: 0.125rem;
21
+ width: calc(var(--spacing-field-height, 2.25rem) * 0.65 - 0.125rem * 2);
22
+ height: calc(var(--spacing-field-height, 2.25rem) * 0.65 - 0.125rem * 2);
23
+ border-radius: 50%;
24
+ background-color: color-mix(in oklch, var(--color-field-surface, oklch(91.79% 0.0029 264.26)) 60%, var(--color-field-inverse, oklch(16.6% 0.026 267)));
25
+ box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
26
+ transition: var(--transition, all .05s ease-in-out)
27
+ }
28
+
29
+ /* Checked */
30
+ &:checked {
31
+ background-color: var(--color-field-surface, oklch(91.79% 0.0029 264.26));
32
+
33
+ /* Marker */
34
+ &::before {
35
+ left: calc(100% - (var(--spacing-field-height, 2.25rem) * 0.65) + 0.125rem);
36
+ background-color: var(--color-field-inverse, oklch(16.6% 0.026 267))
37
+ }
38
+
39
+ &:hover {
40
+ background-color: var(--color-field-surface-hover, oklch(89.24% 0.0024 12.48))
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,74 @@
1
+ /* Manifest Tables */
2
+
3
+ @layer components {
4
+
5
+ :where(table, .grid-table):not(.unstyle) {
6
+ table-layout: auto;
7
+ width: 100%;
8
+ max-width: 100%;
9
+ overflow: hidden;
10
+ border-spacing: 0;
11
+ border-radius: var(--radius, 0.5rem);
12
+
13
+ /* Grid utility classes */
14
+ :where(.grid-header, .grid-row, .grid-footer) {
15
+ display: contents
16
+ }
17
+
18
+ /* Header row */
19
+ :where(thead, .grid-header > *) {
20
+ background-color: var(--color-surface-1, oklch(98.17% 0.0005 95.87));
21
+ border-bottom: 1px solid var(--color-line, oklch(48.3% 0.006422 17.4 / 0.15))
22
+ }
23
+
24
+ /* Header cell */
25
+ :where(th, .grid-header > *) {
26
+ font-weight: bold
27
+ }
28
+
29
+ /* Row */
30
+ :where(tr, .grid-row > *) {
31
+ border-bottom: 1px solid var(--color-line, oklch(48.3% 0.006422 17.4 / 0.15))
32
+ }
33
+
34
+ /* Cell */
35
+ :where(td, th, .grid-header > *, .grid-row > *, .grid-footer > *) {
36
+ padding: calc(var(--spacing, 0.25rem) * 2.5) calc(var(--spacing, 0.25rem) * 4);
37
+ font-size: 0.875rem;
38
+ text-align: left;
39
+ text-align: start;
40
+ overflow: hidden;
41
+
42
+ /* Make elements within cell inline */
43
+ &>*:not(template) {
44
+ display: inline-flex;
45
+ vertical-align: middle;
46
+
47
+ /* Add space between them */
48
+ &:not(:last-child) {
49
+ margin-right: 4px
50
+ }
51
+ }
52
+ }
53
+
54
+ /* Footer row */
55
+ :where(:not(:has(tfoot)) tbody tr:last-child, tfoot tr:last-child, .grid-footer > *) {
56
+ border-bottom: 0
57
+ }
58
+
59
+ /* Striped utility class */
60
+ &.striped {
61
+ :where(tr:nth-child(even), .grid-row:nth-child(even)) {
62
+ background-color: var(--color-surface-1, oklch(98.17% 0.0005 95.87))
63
+ }
64
+
65
+ :where(tr:nth-child(odd), .grid-row:nth-child(odd)) {
66
+ background-color: transparent
67
+ }
68
+
69
+ :where(tr, .grid-row) {
70
+ border-bottom: 0 none
71
+ }
72
+ }
73
+ }
74
+ }