@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.
Files changed (167) hide show
  1. package/dist/builder.js +1 -2
  2. package/dist/loader.js +0 -13
  3. package/dist/{main-BfEQkhXS.js → main-EZaj64lH.js} +1204 -1208
  4. package/dist/martyrs/dist/{main-BfEQkhXS.js → main-EZaj64lH.js} +78 -78
  5. package/dist/martyrs/dist/main-EZaj64lH.js.map +1 -0
  6. package/dist/martyrs/dist/{web-BqTV9va1.js → web-ClbcbWYJ.js} +2 -2
  7. package/dist/martyrs/dist/{web-BqTV9va1.js.map → web-ClbcbWYJ.js.map} +1 -1
  8. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +3 -3
  9. package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -0
  10. package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +2 -2
  11. package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
  12. package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
  13. package/dist/martyrs/src/components/Feed/Feed.vue.js +2 -2
  14. package/dist/martyrs/src/components/Field/{Field.vue2.js → Field.vue.js} +2 -2
  15. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -0
  16. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +2 -2
  17. package/dist/martyrs/src/components/Loader/{Loader.vue2.js → Loader.vue.js} +2 -2
  18. package/dist/martyrs/src/components/Loader/Loader.vue.js.map +1 -0
  19. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
  20. package/dist/martyrs/src/components/Media/Media.vue.js +1 -1
  21. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  22. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  23. package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
  24. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
  25. package/dist/martyrs/src/components/SelectMulti/{SelectMulti.vue2.js → SelectMulti.vue.js} +2 -2
  26. package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue.js.map +1 -0
  27. package/dist/martyrs/src/components/Slider/Slider.vue.js +91 -97
  28. package/dist/martyrs/src/components/Slider/Slider.vue.js.map +1 -1
  29. package/dist/martyrs/src/components/Upload/{Upload.vue2.js → Upload.vue.js} +2 -2
  30. package/dist/martyrs/src/components/Upload/Upload.vue.js.map +1 -0
  31. package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +1 -1
  32. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  33. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  34. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
  35. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
  36. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
  37. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
  38. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  39. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +2 -2
  40. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
  41. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  42. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
  43. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +2 -2
  44. package/dist/martyrs/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
  45. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
  46. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
  47. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  48. package/dist/martyrs/src/modules/constructor/components/elements/Audio.vue.js +1 -1
  49. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +1 -1
  50. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  51. package/dist/martyrs/src/modules/constructor/components/elements/Video.vue.js +1 -1
  52. package/dist/martyrs/src/modules/constructor/components/elements/VideoPlayer.vue.js +1 -1
  53. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
  54. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +1 -1
  55. package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
  56. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +2 -2
  57. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +2 -2
  58. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +2 -2
  59. package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
  60. package/dist/martyrs/src/modules/core/views/components/sections/{Filters.vue2.js → Filters.vue.js} +2 -2
  61. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +1 -0
  62. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js +1 -1
  63. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  64. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  65. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +6 -6
  66. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  67. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +3 -3
  68. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +2 -2
  69. package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
  70. package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
  71. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  72. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +3 -3
  73. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
  74. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  75. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +3 -3
  76. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +3 -3
  77. package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +2 -2
  78. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
  79. package/dist/martyrs/src/modules/music/components/blocks/ActionButtons.vue.js +1 -1
  80. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  81. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  82. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  83. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  84. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +3 -3
  85. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +4 -4
  86. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +2 -2
  87. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  88. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +4 -4
  89. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
  90. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +2 -2
  91. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  92. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
  93. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +2 -2
  94. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
  95. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  96. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +1 -1
  97. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  98. package/dist/martyrs/src/modules/music/components/player/PlayerControls.vue.js +1 -1
  99. package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +1 -1
  100. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +3 -3
  101. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +3 -3
  102. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +2 -2
  103. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  104. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  105. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  106. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
  107. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
  108. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
  109. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  110. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  111. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
  112. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
  113. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +2 -2
  114. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  115. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
  116. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  117. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  118. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  119. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  120. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  121. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  122. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  123. package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
  124. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  125. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +5 -5
  126. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  127. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +5 -5
  128. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +2 -2
  129. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +2 -2
  130. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +3 -3
  131. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +4 -4
  132. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  133. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  134. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  135. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  136. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +2 -2
  137. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  138. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
  139. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  140. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  141. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  142. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +3 -3
  143. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  144. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  145. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  146. package/dist/martyrs.css +1 -1
  147. package/dist/martyrs.es.js +1 -1
  148. package/dist/style.css +3 -5
  149. package/dist/{web-BqTV9va1.js → web-ClbcbWYJ.js} +1 -1
  150. package/package.json +17 -17
  151. package/src/components/Slider/Slider.vue +111 -150
  152. package/src/jit/loader.js +2 -17
  153. package/src/jit/plugin.js +1 -2
  154. package/src/styles/config.scss +0 -2
  155. package/src/styles/layout.scss +1 -3
  156. package/src/styles/reset.scss +0 -2
  157. package/dist/martyrs/dist/main-BfEQkhXS.js.map +0 -1
  158. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  159. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
  160. package/dist/martyrs/src/components/Field/Field.vue2.js.map +0 -1
  161. package/dist/martyrs/src/components/Loader/Loader.vue2.js.map +0 -1
  162. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
  163. package/dist/martyrs/src/components/Select/Select.vue2.js.map +0 -1
  164. package/dist/martyrs/src/components/SelectMulti/SelectMulti.vue2.js.map +0 -1
  165. package/dist/martyrs/src/components/Upload/Upload.vue2.js.map +0 -1
  166. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +0 -1
  167. package/src/modules/governance/reactcode/package-lock.json +0 -4229
@@ -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-BfEQkhXS.js";
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; /* Firefox */
23
- -ms-overflow-style: none; /* IE and Edge */
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; /* Chrome, Safari, Opera */
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;
@@ -1,4 +1,4 @@
1
- import { W as p } from "./main-BfEQkhXS.js";
1
+ import { W as p } from "./main-EZaj64lH.js";
2
2
  class f extends p {
3
3
  constructor() {
4
4
  super(...arguments), this.group = "CapacitorStorage";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/martyrs",
3
- "version": "0.2.575",
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
- <!-- Native Carousel -->
3
- <div class="carousel" ref="carouselRef">
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, computed } from 'vue'
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 autoplayInterval = ref(null)
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
- // Clear previous timeout
58
- if (scrollTimeout.value) {
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
- const scrollPosition = container.scrollLeft
78
- const slideWidth = slides[0].offsetWidth
79
-
80
- // Find current slide index based on scroll position
81
- const index = Math.round(scrollPosition / slideWidth)
82
-
83
- // Ensure index is within bounds
84
- const boundedIndex = Math.max(0, Math.min(index, slides.length - 1))
85
-
86
- // Update selected index
87
- selectedIndex.value = boundedIndex
88
- }
89
-
90
- // Setup autoplay functionality
91
- const setupAutoplay = () => {
92
- if (autoplayInterval.value) {
93
- clearInterval(autoplayInterval.value)
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
- // Initialize native carousel after component is mounted
104
- if (carouselRef.value) {
105
- // Listen for scroll end using intersection observer for better performance
106
- const container = carouselRef.value.querySelector('.carousel__container')
107
- const slides = container.querySelectorAll('.carousel__slide')
108
-
109
- // Create intersection observer to detect when slides are visible
110
- const observer = new IntersectionObserver((entries) => {
111
- entries.forEach(entry => {
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
- // Resume autoplay after interaction ends
155
- container.addEventListener('mouseup', () => {
156
- setupAutoplay()
157
- })
158
-
159
- container.addEventListener('touchend', () => {
160
- setupAutoplay()
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
- // Clean up all resources
173
- if (carouselRef.value) {
174
- // Clean up intersection observer
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; /* Firefox */
214
- -ms-overflow-style: none; /* IE and Edge */
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; /* Chrome, Safari, Opera */
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
- * 1. Извлекает токены для JIT engine
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
- // Порядок: base < components < utilities (последний = высший приоритет)
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
 
@@ -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
- }
@@ -1,4 +1,3 @@
1
- @layer base {
2
1
  * {
3
2
  box-sizing: border-box;
4
3
  }
@@ -170,5 +169,4 @@ hr {
170
169
 
171
170
  // display: none !important;
172
171
  // }
173
- // }
174
- }
172
+ // }
@@ -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
  }