@ozdao/martyrs 0.2.575 → 0.2.577
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/builder.js +1 -2
- package/dist/loader.js +0 -13
- package/dist/{main-BfEQkhXS.js → main-EZaj64lH.js} +1204 -1208
- package/dist/martyrs/dist/{main-BfEQkhXS.js → main-EZaj64lH.js} +78 -78
- package/dist/martyrs/dist/main-EZaj64lH.js.map +1 -0
- package/dist/martyrs/dist/{web-BqTV9va1.js → web-ClbcbWYJ.js} +2 -2
- package/dist/martyrs/dist/{web-BqTV9va1.js.map → web-ClbcbWYJ.js.map} +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +3 -3
- package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -0
- package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +2 -2
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
- package/dist/martyrs/src/components/Field/{Field.vue2.js → Field.vue.js} +2 -2
- package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -0
- package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +2 -2
- package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +2 -2
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/martyrs/src/components/Media/Media.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
- package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
- package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js → SelectMulti.vue.js} +2 -2
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +1 -0
- package/dist/martyrs/src/components/Slider/Slider.vue.js +91 -97
- package/dist/martyrs/src/components/Slider/Slider.vue.js.map +1 -1
- package/dist/martyrs/src/components/Upload/{Upload.vue2.js → Upload.vue.js} +2 -2
- package/dist/martyrs/src/components/Upload/Upload.vue.js.map +1 -0
- package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +2 -2
- package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/constructor/components/elements/Audio.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/Video.vue.js +1 -1
- package/dist/martyrs/src/modules/constructor/components/elements/VideoPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +2 -2
- package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/core/views/components/sections/{Filters.vue2.js → Filters.vue.js} +2 -2
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +1 -0
- package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +6 -6
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
- package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +3 -3
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +2 -2
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +3 -3
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +4 -4
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +4 -4
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
- package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +5 -5
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +5 -5
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +3 -3
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +4 -4
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +3 -3
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/style.css +3 -5
- package/dist/{web-BqTV9va1.js → web-ClbcbWYJ.js} +1 -1
- package/package.json +17 -17
- package/src/components/Slider/Slider.vue +111 -150
- package/src/jit/loader.js +2 -17
- package/src/jit/plugin.js +1 -2
- package/src/styles/config.scss +0 -2
- package/src/styles/layout.scss +1 -3
- package/src/styles/reset.scss +0 -2
- package/dist/martyrs/dist/main-BfEQkhXS.js.map +0 -1
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Field/Field.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/components/Select/Select.vue2.js.map +0 -1
- package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Upload/Upload.vue2.js.map +0 -1
- package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +0 -1
- package/src/modules/governance/reactcode/package-lock.json +0 -4229
package/dist/martyrs.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e, a as o, b as d, C as r, k as t, c as l, d as i, e as p, f as u, g as n, h as M, i as S, j as c, F as m, l as C, n as F, o as g, p as h, L as b, q as k, M as x, r as B, I, s as T, t as U, u as f, v as w, S as D, w as E, x as L, y as P, z as q, A as y, B as A, D as G, E as j, U as v, G as z, H, m as R } from "./main-
|
|
1
|
+
import { _ as e, a as o, b as d, C as r, k as t, c as l, d as i, e as p, f as u, g as n, h as M, i as S, j as c, F as m, l as C, n as F, o as g, p as h, L as b, q as k, M as x, r as B, I, s as T, t as U, u as f, v as w, S as D, w as E, x as L, y as P, z as q, A as y, B as A, D as G, E as j, U as v, G as z, H, m as R } from "./main-EZaj64lH.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Address,
|
|
4
4
|
o as Breadcrumbs,
|
package/dist/style.css
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
display: flex;
|
|
20
20
|
scroll-snap-type: x mandatory;
|
|
21
21
|
overflow-x: scroll;
|
|
22
|
-
scrollbar-width: none;
|
|
23
|
-
-ms-overflow-style: none;
|
|
22
|
+
scrollbar-width: none;
|
|
23
|
+
-ms-overflow-style: none;
|
|
24
24
|
scroll-behavior: smooth;
|
|
25
25
|
}
|
|
26
26
|
.carousel__container::-webkit-scrollbar {
|
|
27
|
-
display: none;
|
|
27
|
+
display: none;
|
|
28
28
|
}
|
|
29
29
|
.carousel__slide {
|
|
30
30
|
flex: 0 0 100%;
|
|
@@ -32,8 +32,6 @@
|
|
|
32
32
|
scroll-snap-align: start;
|
|
33
33
|
scroll-snap-stop: always;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
/* Navigation dots */
|
|
37
35
|
.carousel__dots {
|
|
38
36
|
display: flex;
|
|
39
37
|
justify-content: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ozdao/martyrs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.577",
|
|
4
4
|
"description": "Fullstack framework focused on user experience and ease of development.",
|
|
5
5
|
"author": "OZ DAO <hello@ozdao.dev>",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -56,21 +56,6 @@
|
|
|
56
56
|
"import": "./dist/martyrs/src/modules/*/*.client.js"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"preinstall": "npx only-allow pnpm",
|
|
61
|
-
"clean": "rimraf dist",
|
|
62
|
-
"build": "pnpm run clean && pnpm run build:builder && pnpm run build:components && pnpm run build:client && pnpm run build:server",
|
|
63
|
-
"build:components": "vite build --config vite.components.config.js",
|
|
64
|
-
"build:client": "vite build --config vite.modules.client.config.js",
|
|
65
|
-
"build:server": "vite build --config vite.modules.server.config.js",
|
|
66
|
-
"build:builder": "vite build --config vite.builder.config.js",
|
|
67
|
-
"build:rspack": "pnpm run clean && pnpm run build:builder:rspack && pnpm run build:components:rspack && pnpm run build:client:rspack && pnpm run build:theme:rspack && pnpm run build:server:rspack",
|
|
68
|
-
"build:components:rspack": "rspack --config rspack.components.config.js",
|
|
69
|
-
"build:theme:rspack": "rspack --config rspack.theme.config.js",
|
|
70
|
-
"build:client:rspack": "rspack --config rspack.client.config.js && FORMAT=cjs rspack --config rspack.client.config.js",
|
|
71
|
-
"build:server:rspack": "rspack --config rspack.server.config.js && FORMAT=esm rspack --config rspack.server.config.js",
|
|
72
|
-
"build:builder:rspack": "rspack --config rspack.builder.config.js"
|
|
73
|
-
},
|
|
74
59
|
"dependencies": {
|
|
75
60
|
"@capacitor/core": "7.4.4",
|
|
76
61
|
"@capacitor/preferences": "7.0.2",
|
|
@@ -116,5 +101,20 @@
|
|
|
116
101
|
},
|
|
117
102
|
"bugs": {
|
|
118
103
|
"url": "https://github.com/oz-digital/martyrs/issues"
|
|
104
|
+
},
|
|
105
|
+
"scripts": {
|
|
106
|
+
"preinstall": "npx only-allow pnpm",
|
|
107
|
+
"clean": "rimraf dist",
|
|
108
|
+
"build": "pnpm run clean && pnpm run build:builder && pnpm run build:components && pnpm run build:client && pnpm run build:server",
|
|
109
|
+
"build:components": "vite build --config vite.components.config.js",
|
|
110
|
+
"build:client": "vite build --config vite.modules.client.config.js",
|
|
111
|
+
"build:server": "vite build --config vite.modules.server.config.js",
|
|
112
|
+
"build:builder": "vite build --config vite.builder.config.js",
|
|
113
|
+
"build:rspack": "pnpm run clean && pnpm run build:builder:rspack && pnpm run build:components:rspack && pnpm run build:client:rspack && pnpm run build:theme:rspack && pnpm run build:server:rspack",
|
|
114
|
+
"build:components:rspack": "rspack --config rspack.components.config.js",
|
|
115
|
+
"build:theme:rspack": "rspack --config rspack.theme.config.js",
|
|
116
|
+
"build:client:rspack": "rspack --config rspack.client.config.js && FORMAT=cjs rspack --config rspack.client.config.js",
|
|
117
|
+
"build:server:rspack": "rspack --config rspack.server.config.js && FORMAT=esm rspack --config rspack.server.config.js",
|
|
118
|
+
"build:builder:rspack": "rspack --config rspack.builder.config.js"
|
|
119
119
|
}
|
|
120
|
-
}
|
|
120
|
+
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="carousel"
|
|
4
|
+
ref="carouselRef"
|
|
5
|
+
@mouseenter="onHoverStart"
|
|
6
|
+
@mouseleave="onHoverEnd"
|
|
7
|
+
@touchstart="onTouchStart"
|
|
8
|
+
@touchend="onTouchEnd"
|
|
9
|
+
>
|
|
4
10
|
<div class="carousel__container" @scroll="handleScroll">
|
|
5
11
|
<slot></slot>
|
|
6
12
|
</div>
|
|
7
|
-
|
|
8
|
-
<!-- Navigation Dots (optional) -->
|
|
13
|
+
|
|
9
14
|
<div class="carousel__dots" v-if="showDots && slideCount > 1">
|
|
10
|
-
<button
|
|
11
|
-
v-for="index in slideCount"
|
|
15
|
+
<button
|
|
16
|
+
v-for="index in slideCount"
|
|
12
17
|
:key="index - 1"
|
|
13
18
|
class="carousel__dot"
|
|
14
19
|
:class="{ 'carousel__dot--active': selectedIndex === index - 1 }"
|
|
@@ -19,187 +24,144 @@
|
|
|
19
24
|
</template>
|
|
20
25
|
|
|
21
26
|
<script setup>
|
|
22
|
-
import { ref, onMounted, onBeforeUnmount,
|
|
27
|
+
import { ref, onMounted, onBeforeUnmount, watch } from 'vue'
|
|
23
28
|
|
|
24
|
-
// Props for customization
|
|
25
29
|
const props = defineProps({
|
|
26
30
|
showDots: Boolean,
|
|
27
31
|
slideCount: {
|
|
28
32
|
type: Number,
|
|
29
33
|
default: 0
|
|
34
|
+
},
|
|
35
|
+
autoplay: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: null
|
|
30
38
|
}
|
|
31
39
|
});
|
|
32
40
|
|
|
41
|
+
// autoplay: { enabled, interval, hover, touch, resume, delay }
|
|
42
|
+
|
|
33
43
|
const carouselRef = ref(null)
|
|
34
44
|
const selectedIndex = ref(0)
|
|
35
|
-
const
|
|
45
|
+
const intervalId = ref(null)
|
|
36
46
|
const scrollTimeout = ref(null)
|
|
47
|
+
const resumeTimeout = ref(null)
|
|
48
|
+
const paused = ref(false)
|
|
37
49
|
|
|
38
|
-
// Scroll to specific slide
|
|
39
50
|
const scrollTo = (index) => {
|
|
40
51
|
if (!carouselRef.value) return
|
|
41
|
-
|
|
42
52
|
const container = carouselRef.value.querySelector('.carousel__container')
|
|
43
53
|
const slides = container.querySelectorAll('.carousel__slide')
|
|
44
|
-
|
|
45
54
|
if (slides[index]) {
|
|
46
|
-
container.scrollTo({
|
|
47
|
-
left: slides[index].offsetLeft,
|
|
48
|
-
behavior: 'smooth'
|
|
49
|
-
})
|
|
50
|
-
|
|
55
|
+
container.scrollTo({ left: slides[index].offsetLeft, behavior: 'smooth' })
|
|
51
56
|
selectedIndex.value = index
|
|
52
57
|
}
|
|
53
58
|
}
|
|
54
59
|
|
|
55
|
-
// Handle scroll event with debounce
|
|
56
60
|
const handleScroll = () => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
clearTimeout(scrollTimeout.value)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Set a timeout to update the index when scrolling stops
|
|
63
|
-
scrollTimeout.value = setTimeout(() => {
|
|
64
|
-
updateSelectedIndex()
|
|
65
|
-
}, 50) // Small delay to ensure scroll has completed
|
|
61
|
+
if (scrollTimeout.value) clearTimeout(scrollTimeout.value)
|
|
62
|
+
scrollTimeout.value = setTimeout(updateSelectedIndex, 50)
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
// Update selected index when scrolling
|
|
69
65
|
const updateSelectedIndex = () => {
|
|
70
66
|
if (!carouselRef.value) return
|
|
71
|
-
|
|
72
67
|
const container = carouselRef.value.querySelector('.carousel__container')
|
|
73
68
|
const slides = container.querySelectorAll('.carousel__slide')
|
|
74
|
-
|
|
75
69
|
if (!slides.length) return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
70
|
+
const index = Math.round(container.scrollLeft / slides[0].offsetWidth)
|
|
71
|
+
selectedIndex.value = Math.max(0, Math.min(index, slides.length - 1))
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const clearTimers = () => {
|
|
75
|
+
if (intervalId.value) { clearInterval(intervalId.value); intervalId.value = null }
|
|
76
|
+
if (resumeTimeout.value) { clearTimeout(resumeTimeout.value); resumeTimeout.value = null }
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const startAutoplay = () => {
|
|
80
|
+
clearTimers()
|
|
81
|
+
const a = props.autoplay
|
|
82
|
+
if (!a?.enabled || paused.value) return
|
|
83
|
+
intervalId.value = setInterval(() => {
|
|
84
|
+
scrollTo((selectedIndex.value + 1) % props.slideCount)
|
|
85
|
+
}, a.interval ?? 2000)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const pause = () => {
|
|
89
|
+
paused.value = true
|
|
90
|
+
clearTimers()
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const resume = () => {
|
|
94
|
+
const a = props.autoplay
|
|
95
|
+
if (!a?.enabled || a.resume === false) return
|
|
96
|
+
clearTimers()
|
|
97
|
+
const delay = a.delay ?? 0
|
|
98
|
+
if (delay > 0) {
|
|
99
|
+
resumeTimeout.value = setTimeout(() => {
|
|
100
|
+
paused.value = false
|
|
101
|
+
startAutoplay()
|
|
102
|
+
}, delay)
|
|
103
|
+
} else {
|
|
104
|
+
paused.value = false
|
|
105
|
+
startAutoplay()
|
|
94
106
|
}
|
|
95
|
-
|
|
96
|
-
autoplayInterval.value = setInterval(() => {
|
|
97
|
-
const nextIndex = (selectedIndex.value + 1) % props.slideCount
|
|
98
|
-
scrollTo(nextIndex)
|
|
99
|
-
}, 2000) // 2 seconds interval like in original
|
|
100
107
|
}
|
|
101
108
|
|
|
109
|
+
const onHoverStart = () => {
|
|
110
|
+
if (props.autoplay?.hover !== false) pause()
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const onHoverEnd = () => {
|
|
114
|
+
if (props.autoplay?.hover !== false) resume()
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const onTouchStart = () => {
|
|
118
|
+
if (props.autoplay?.touch !== false) pause()
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const onTouchEnd = () => {
|
|
122
|
+
if (props.autoplay?.touch !== false) resume()
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
watch(() => props.autoplay, () => {
|
|
126
|
+
if (props.autoplay?.enabled) {
|
|
127
|
+
paused.value = false
|
|
128
|
+
startAutoplay()
|
|
129
|
+
} else {
|
|
130
|
+
pause()
|
|
131
|
+
}
|
|
132
|
+
}, { deep: true })
|
|
133
|
+
|
|
102
134
|
onMounted(() => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (entry.isIntersecting) {
|
|
113
|
-
// Find the index of the visible slide
|
|
114
|
-
const slideIndex = Array.from(slides).indexOf(entry.target)
|
|
115
|
-
if (slideIndex !== -1) {
|
|
116
|
-
selectedIndex.value = slideIndex
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
}, {
|
|
121
|
-
root: container,
|
|
122
|
-
threshold: 0.7 // Consider slide visible when 70% is in view
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
// Observe all slides
|
|
126
|
-
slides.forEach(slide => {
|
|
127
|
-
observer.observe(slide)
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
// Add focus/blur events to pause autoplay on focus
|
|
131
|
-
container.addEventListener('focusin', () => {
|
|
132
|
-
if (autoplayInterval.value) {
|
|
133
|
-
clearInterval(autoplayInterval.value)
|
|
134
|
-
}
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
container.addEventListener('focusout', () => {
|
|
138
|
-
setupAutoplay()
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
// Stop autoplay on touch/mouse interaction
|
|
142
|
-
container.addEventListener('mousedown', () => {
|
|
143
|
-
if (autoplayInterval.value) {
|
|
144
|
-
clearInterval(autoplayInterval.value)
|
|
145
|
-
}
|
|
146
|
-
})
|
|
147
|
-
|
|
148
|
-
container.addEventListener('touchstart', () => {
|
|
149
|
-
if (autoplayInterval.value) {
|
|
150
|
-
clearInterval(autoplayInterval.value)
|
|
135
|
+
if (!carouselRef.value) return
|
|
136
|
+
const container = carouselRef.value.querySelector('.carousel__container')
|
|
137
|
+
const slides = container.querySelectorAll('.carousel__slide')
|
|
138
|
+
|
|
139
|
+
const observer = new IntersectionObserver((entries) => {
|
|
140
|
+
entries.forEach(entry => {
|
|
141
|
+
if (entry.isIntersecting) {
|
|
142
|
+
const idx = Array.from(slides).indexOf(entry.target)
|
|
143
|
+
if (idx !== -1) selectedIndex.value = idx
|
|
151
144
|
}
|
|
152
145
|
})
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
// Initialize autoplay
|
|
164
|
-
setupAutoplay()
|
|
165
|
-
|
|
166
|
-
// Store observer for cleanup
|
|
167
|
-
carouselRef.value._observer = observer
|
|
168
|
-
}
|
|
146
|
+
}, { root: container, threshold: 0.7 })
|
|
147
|
+
|
|
148
|
+
slides.forEach(slide => observer.observe(slide))
|
|
149
|
+
carouselRef.value._observer = observer
|
|
150
|
+
|
|
151
|
+
container.addEventListener('focusin', pause)
|
|
152
|
+
container.addEventListener('focusout', resume)
|
|
153
|
+
|
|
154
|
+
if (props.autoplay?.enabled) startAutoplay()
|
|
169
155
|
})
|
|
170
156
|
|
|
171
157
|
onBeforeUnmount(() => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (carouselRef.value._observer) {
|
|
176
|
-
carouselRef.value._observer.disconnect()
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Clean up event listeners
|
|
180
|
-
const container = carouselRef.value.querySelector('.carousel__container')
|
|
181
|
-
if (container) {
|
|
182
|
-
container.removeEventListener('focusin', () => {})
|
|
183
|
-
container.removeEventListener('focusout', () => {})
|
|
184
|
-
container.removeEventListener('mousedown', () => {})
|
|
185
|
-
container.removeEventListener('touchstart', () => {})
|
|
186
|
-
container.removeEventListener('mouseup', () => {})
|
|
187
|
-
container.removeEventListener('touchend', () => {})
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// Clear all timeouts and intervals
|
|
192
|
-
if (autoplayInterval.value) {
|
|
193
|
-
clearInterval(autoplayInterval.value)
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (scrollTimeout.value) {
|
|
197
|
-
clearTimeout(scrollTimeout.value)
|
|
198
|
-
}
|
|
158
|
+
if (carouselRef.value?._observer) carouselRef.value._observer.disconnect()
|
|
159
|
+
clearTimers()
|
|
160
|
+
if (scrollTimeout.value) clearTimeout(scrollTimeout.value)
|
|
199
161
|
})
|
|
200
162
|
</script>
|
|
201
163
|
|
|
202
|
-
<style
|
|
164
|
+
<style>
|
|
203
165
|
.carousel {
|
|
204
166
|
position: relative;
|
|
205
167
|
width: 100%;
|
|
@@ -210,13 +172,13 @@ onBeforeUnmount(() => {
|
|
|
210
172
|
display: flex;
|
|
211
173
|
scroll-snap-type: x mandatory;
|
|
212
174
|
overflow-x: scroll;
|
|
213
|
-
scrollbar-width: none;
|
|
214
|
-
-ms-overflow-style: none;
|
|
175
|
+
scrollbar-width: none;
|
|
176
|
+
-ms-overflow-style: none;
|
|
215
177
|
scroll-behavior: smooth;
|
|
216
178
|
}
|
|
217
179
|
|
|
218
180
|
.carousel__container::-webkit-scrollbar {
|
|
219
|
-
display: none;
|
|
181
|
+
display: none;
|
|
220
182
|
}
|
|
221
183
|
|
|
222
184
|
.carousel__slide {
|
|
@@ -226,7 +188,6 @@ onBeforeUnmount(() => {
|
|
|
226
188
|
scroll-snap-stop: always;
|
|
227
189
|
}
|
|
228
190
|
|
|
229
|
-
/* Navigation dots */
|
|
230
191
|
.carousel__dots {
|
|
231
192
|
display: flex;
|
|
232
193
|
justify-content: center;
|
|
@@ -248,4 +209,4 @@ onBeforeUnmount(() => {
|
|
|
248
209
|
.carousel__dot--active {
|
|
249
210
|
background-color: rgba(0, 0, 0, 0.6);
|
|
250
211
|
}
|
|
251
|
-
</style>
|
|
212
|
+
</style>
|
package/src/jit/loader.js
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* Martyrs JIT CSS Engine - Token Extraction Loader
|
|
3
3
|
*
|
|
4
4
|
* Этот loader вызывается rspack для каждого .vue/.js/.ts файла.
|
|
5
|
-
*
|
|
6
|
-
* 2. Оборачивает <style> блоки в @layer components для приоритета JIT
|
|
5
|
+
* Извлекает токены для JIT engine
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* @param {string} source - содержимое файла
|
|
11
|
-
* @returns {string} - source
|
|
10
|
+
* @returns {string} - source без изменений
|
|
12
11
|
*/
|
|
13
12
|
export default function martyrsLoader(source) {
|
|
14
13
|
// Получаем options и plugin instance
|
|
@@ -28,19 +27,5 @@ export default function martyrsLoader(source) {
|
|
|
28
27
|
console.warn(`[MartyrsJIT] Error extracting tokens from ${resourcePath}:`, error.message);
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
// Для .vue файлов оборачиваем содержимое <style> в @layer components
|
|
32
|
-
if (resourcePath.endsWith('.vue')) {
|
|
33
|
-
source = source.replace(
|
|
34
|
-
/<style([^>]*)>([\s\S]*?)<\/style>/gi,
|
|
35
|
-
(match, attrs, css) => {
|
|
36
|
-
// Пропускаем пустые стили или уже обёрнутые в @layer
|
|
37
|
-
if (!css.trim() || css.includes('@layer')) {
|
|
38
|
-
return match;
|
|
39
|
-
}
|
|
40
|
-
return `<style${attrs}>@layer components {\n${css}\n}</style>`;
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
30
|
return source;
|
|
46
31
|
}
|
package/src/jit/plugin.js
CHANGED
|
@@ -204,8 +204,7 @@ export class MartyrsJitPlugin {
|
|
|
204
204
|
generateCSS() {
|
|
205
205
|
const tokens = Array.from(this.tokens);
|
|
206
206
|
const css = this.jit.generate(tokens);
|
|
207
|
-
|
|
208
|
-
return `/* Martyrs JIT - ${tokens.length} tokens */\n@layer base, components, utilities;\n@layer utilities {\n${css}\n}`;
|
|
207
|
+
return `/* Martyrs JIT - ${tokens.length} tokens */\nbody {\n${css}\n}`;
|
|
209
208
|
}
|
|
210
209
|
}
|
|
211
210
|
|
package/src/styles/config.scss
CHANGED
|
@@ -46,7 +46,6 @@ $xxl-desktop-min: 1921px;
|
|
|
46
46
|
// ============================================================================
|
|
47
47
|
// CSS VARIABLES
|
|
48
48
|
// ============================================================================
|
|
49
|
-
@layer base {
|
|
50
49
|
:root {
|
|
51
50
|
color-scheme: light dark;
|
|
52
51
|
|
|
@@ -214,4 +213,3 @@ p,.p-regular { font-family: var(--font-second); font-weight: 400; font-size: 1.0
|
|
|
214
213
|
.text-box-trim { text-box: trim-both cap alphabetic; }
|
|
215
214
|
.text-box-trim-end { text-box: trim-end cap alphabetic; }
|
|
216
215
|
.trimmed > * { text-box: trim-both cap alphabetic; overflow: visible; }
|
|
217
|
-
}
|
package/src/styles/layout.scss
CHANGED
package/src/styles/reset.scss
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
@layer base {
|
|
3
2
|
html, button, body, div, span, applet, object, iframe,
|
|
4
3
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
5
4
|
a, abbr, acronym, address, big, cite, code,
|
|
@@ -82,5 +81,4 @@ input::-webkit-outer-spin-button,
|
|
|
82
81
|
input::-webkit-inner-spin-button {
|
|
83
82
|
-webkit-appearance: none;
|
|
84
83
|
margin: 0;
|
|
85
|
-
}
|
|
86
84
|
}
|