@xwadex/fesd 0.0.2 → 0.0.3

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 (43) hide show
  1. package/package.json +4 -1
  2. package/20240328-video4-setting.png +0 -0
  3. package/CHANGELOG.md +0 -41
  4. package/index.html +0 -25
  5. package/prepros.config +0 -883
  6. package/src/fesd/anchor4/anchor4.js +0 -179
  7. package/src/fesd/aost4/_aost4.sass +0 -64
  8. package/src/fesd/aost4/aost4.js +0 -138
  9. package/src/fesd/article4/article4.js +0 -280
  10. package/src/fesd/article4/article4.md +0 -1
  11. package/src/fesd/category-slider/_category-slider.sass +0 -33
  12. package/src/fesd/category-slider/category-slider.js +0 -332
  13. package/src/fesd/collapse4/collapse4.js +0 -159
  14. package/src/fesd/detect4/detect4.js +0 -70
  15. package/src/fesd/dropdown4/_dropdown4.sass +0 -185
  16. package/src/fesd/dropdown4/cityData.js +0 -830
  17. package/src/fesd/dropdown4/dropdown4.js +0 -647
  18. package/src/fesd/image-preview/_image-preview.sass +0 -26
  19. package/src/fesd/image-preview/image-preview.js +0 -209
  20. package/src/fesd/image-validate/_image-validate.sass +0 -21
  21. package/src/fesd/image-validate/image-validate.js +0 -84
  22. package/src/fesd/marquee4/_marquee4.sass +0 -45
  23. package/src/fesd/marquee4/marquee4.js +0 -371
  24. package/src/fesd/modal4/_modal4.sass +0 -134
  25. package/src/fesd/modal4/modal4.js +0 -236
  26. package/src/fesd/modal4/modernModal.js +0 -182
  27. package/src/fesd/multipurpose4/_multipurpose4.sass +0 -282
  28. package/src/fesd/multipurpose4/multipurpose4.js +0 -562
  29. package/src/fesd/ripple4/_ripple4.sass +0 -44
  30. package/src/fesd/ripple4/ripple4.js +0 -138
  31. package/src/fesd/share4/share4.js +0 -191
  32. package/src/fesd/shared/shared.js +0 -59
  33. package/src/fesd/shared/utils.js +0 -98
  34. package/src/fesd/tab4/_tab4.sass +0 -25
  35. package/src/fesd/tab4/tab4.js +0 -473
  36. package/src/fesd/video4/README.md +0 -3
  37. package/src/fesd/video4/_video4.sass +0 -117
  38. package/src/fesd/video4/video4.js +0 -237
  39. package/src/fesd/video4/videoPlayer.js +0 -195
  40. package/src/fesd.js +0 -53
  41. package/src/fesd.sass +0 -29
  42. package/src/fesdDB.js +0 -282
  43. package/vite.config.js +0 -37
package/src/fesdDB.js DELETED
@@ -1,282 +0,0 @@
1
- const FESD_DB = {
2
- library: {},
3
- // 紀錄使用的瀏覽器及裝置資訊
4
- is: {},
5
- // 各套件設定 (Beta.)
6
- video4: {
7
- SETTINGS: {
8
- videoId: null,
9
- videoType: null,
10
- videoAutoplay: 'off',
11
- videoMode: 'onBox',
12
- videoButton: '.playButton',
13
- videoCover: 'on',
14
- videoLayoutNo: 0,
15
- videoTarget: 'video-template',
16
- videoTargetRoute: 'https://cdn.wdd.idv.tw/fesd/video4_lightbox.html',
17
- videoVimeoHash: null,
18
- },
19
- ATTRS: {
20
- id: 'video-id',
21
- type: 'video-type',
22
- autoplay: 'video-autoplay',
23
- hash: 'vimeo-hash',
24
- },
25
- EVENTS: {
26
- init: null,
27
- afterInit: null,
28
- beforeDestroy: null,
29
- afterUpdate: null,
30
- },
31
- // video4 target 內放置結構 index 對應 videoLayoutNo
32
- LAYOUT: ['<div class="playButton"></div><div class="overlay"></div>'],
33
- // videoPlayer customElements 內結構
34
- TEMPLATE() {
35
- return `<div class="player-container"><div class="player-wrapper"></div></div>`;
36
- },
37
- },
38
- share4: {
39
- SETTINGS: {
40
- success: null,
41
- text: null,
42
- className: null,
43
- duration: 1500,
44
- },
45
- },
46
- modal4: {
47
- SETTINGS: {
48
- target: null,
49
- route: null,
50
- action: 'toggle',
51
- container: 'body',
52
- },
53
- ATTRS: {
54
- id: 'data-modal-id',
55
- close: 'data-modal-close',
56
- destroy: 'data-modal-destroy',
57
- },
58
- EVENTS: {
59
- init: null,
60
- success: null,
61
- error: null,
62
- complete: null,
63
- open: null,
64
- close: null,
65
- destroy: null,
66
- update: null,
67
- },
68
- TEMPLATE(type) {
69
- return `
70
- <div class="modal-scroller">
71
- <div class="modal-wrapper" ${type === 'destroy' ? 'data-modal-destroy' : 'data-modal-close'}>
72
- <div class="modal-content" stop-propagation>
73
- </div>
74
- </div>
75
- `;
76
- },
77
- },
78
- marquee4: {
79
- SETTINGS: {
80
- direction: 'left', // 方向 - top || right || bottom || left
81
- behavior: 'normal', // 模式 - normal || alternate || endStop
82
- duration: 50000, // 持續時間(毫秒) - Number
83
- durationBreakpoints: {}, // 持續時間斷點 - Object
84
- autoplay: 300, // 自動撥放延遲時間(毫秒) - Number || false
85
- pauseOnMouseenter: false, // 滑鼠移入暫停 - Boolean
86
- continual: true, // 連續不間斷 - Boolean
87
- gap: 30, // 跑馬燈內容之間的距離 - Number
88
- },
89
- },
90
- dropdown4: {
91
- SETTINGS: {
92
- scrollbar: {
93
- 'scrollbar-track-color': 'transparent',
94
- 'scrollbar-thumb-color': 'rgba(0,0,0,.4)',
95
- 'scrollbar-thumb-hover-color': 'rgba(0,0,0,.55)',
96
- 'scrollbar-radius': '10px',
97
- },
98
- },
99
- TEMPLATE(filter, filterPlaceholder) {
100
- return `
101
- <div class="select-wrapper">
102
- <div class="select-display"></div>
103
- <i class="dropdown-icon"></i>
104
- <div class="dropdown">
105
- ${
106
- filter
107
- ? `<div class="filter-bar">
108
- <input class="filter-input" type="text" placeholder="${filterPlaceholder}" disabled>
109
- </div>`
110
- : ''
111
- }
112
- <div class="dropdown-scroller">
113
- <ul class="dropdown-list"></ul>
114
- </div>
115
- </div>
116
- </div>
117
- `;
118
- },
119
- },
120
- article4: {
121
- SETTINGS: {
122
- basic_rwd: 900,
123
- },
124
- },
125
- aost4: {
126
- SETTINGS: {
127
- scroller: window,
128
- class: 'aost-show',
129
- delay: 0,
130
- start: 80,
131
- end: 0,
132
- mirror: false,
133
- repeat: false, // false | true | 'up' | 'down'
134
- direction: 'vertical', // 'vertical' | 'horizontal'
135
- breakpoints: {
136
- 1160: 'data-aost-offset-1160',
137
- 1024: 'data-aost-offset-1024',
138
- 600: 'data-aost-offset-600',
139
- },
140
- },
141
- EVENTS: {
142
- init: null,
143
- enter: null,
144
- leave: null,
145
- },
146
- },
147
- anchor4: {
148
- SETTINGS: {
149
- target: null,
150
- container: null,
151
- spacer: null,
152
- gap: 0,
153
- speed: 800,
154
- delay: 0,
155
- direction: 'vertical',
156
- easing: 'easeInOutCirc',
157
- },
158
- EVENTS: {
159
- afterInit: null,
160
- beforeDestroy: null,
161
- afterUpdate: null,
162
- beforeScroll: null,
163
- afterScroll: null,
164
- },
165
- },
166
- multipurpose4: {
167
- SETTINGS: {
168
- type: 'drag',
169
- drag: {
170
- center: true,
171
- draggable: true,
172
- navigation: true,
173
- selected: false,
174
- },
175
- collapse: {
176
- selected: false,
177
- placeholder: '類別',
178
- },
179
- dropdown: {
180
- target: 'dropdown-el',
181
- placeholder: '',
182
- value: '',
183
- },
184
- breakpoint: {},
185
- },
186
- TEMPLATE: {
187
- drag() {
188
- return `<div class="drag-container">
189
- <ul class="wrapper">
190
- </ul>
191
- </div>`;
192
- },
193
- collapse(collapse) {
194
- return `<div class="drag-container">
195
- <ul class="wrapper">
196
- </ul>
197
- <div class="collapse-placeholder">${collapse.placeholder}</div>
198
- </div>
199
- <div class="collapse-container">
200
- <ul class="wrapper">
201
- </ul>
202
- </div>`;
203
- },
204
- dropdown(dropdown) {
205
- return `<dropdown-el${dropdown.placeholder ? ` d4-placeholder="${dropdown.placeholder}"` : ''}${dropdown.value ? ` d4-value="${dropdown.value}"` : ''}></dropdown-el>`;
206
- },
207
- },
208
- },
209
- tab4: {
210
- SETTINGS: {
211
- // 樣式 normal / process
212
- type: 'normal',
213
- // 進場方式 fade / slide
214
- display: 'fade',
215
- // 預設頁面
216
- defaultPage: '',
217
- // 滑動扣除高度
218
- anchorGap: 0,
219
- tabGroup: 'true',
220
- // 動畫設定
221
- transition: {
222
- duration: 500,
223
- timing: 'ease',
224
- delay: 0,
225
- },
226
- // 步驟狀態綁定
227
- stepOutput: '.step-show',
228
- },
229
- },
230
- collapse4: {
231
- SETTINGS: {
232
- collapseClass: 'collapse',
233
- block: '[collapse-block]',
234
- target: '[collapse-target]',
235
- single: true,
236
- defaultOpen: false,
237
- targetStopPropagation: false,
238
- defaultActiveMark: 'collapse-active',
239
- transition: {
240
- property: 'height',
241
- duration: '400ms',
242
- function: 'ease',
243
- delay: '0s',
244
- },
245
- // expand
246
- breakpoints: {
247
- 320: {},
248
- },
249
- },
250
- // ATTRS: {
251
- // wrapper: 'collapse-wrapper',
252
- // block: 'collapse-block',
253
- // target: 'collapse-target',
254
- // },
255
- EVENTS: {
256
- init: null,
257
- afterInit: null,
258
- destroy: null,
259
- beforeDestroy: null,
260
- update: null,
261
- afterUpdate: null,
262
- },
263
- },
264
- ripple4: {
265
- SETTINGS: {
266
- // 是否要加 hover 效果?
267
- hover: true,
268
- // 使用 hover 時是否要啟用點擊 ripple 效果?
269
- click: false,
270
- // ripple's 的顏色
271
- color: '#fff',
272
- // ripple's 透明度
273
- opacity: '1',
274
- // ripple 毫秒
275
- duration: 600,
276
- // hover 毫秒 ?
277
- speed: 600,
278
- },
279
- },
280
- };
281
-
282
- export default FESD_DB;
package/vite.config.js DELETED
@@ -1,37 +0,0 @@
1
- import { resolve } from 'path';
2
-
3
- // vite.config.js
4
- export default {
5
- // config options
6
- base: './',
7
- build: {
8
- lib: {
9
- entry: 'src/fesd.js',
10
- name: 'fesd',
11
- formats: ['es'],
12
- fileName: format => `fesd.js`,
13
- },
14
- sourcemap: true,
15
- rollupOptions: {
16
- input: {
17
- fesd: resolve(__dirname, 'src/fesd.js'),
18
- },
19
- output: {
20
- entryFileNames: `assets/[name]-bundle.js`,
21
- chunkFileNames: `assets/[name]-bundle.js`,
22
- assetFileNames: assetInfo => {
23
- if (assetInfo.type === 'asset' && /\.(jpe?g|png|gif|svg)$/i.test(assetInfo.name)) {
24
- return 'assets/img/[name].[ext]';
25
- }
26
- if (assetInfo.type === 'asset' && /\.(ttf|woff|woff2|eot)$/i.test(assetInfo.name)) {
27
- return 'assets/fonts/[name].[ext]';
28
- }
29
- if (assetInfo.type === 'asset' && /\.(css)$/i.test(assetInfo.name)) {
30
- return 'assets/fesd-bundle.[ext]';
31
- }
32
- return 'assets/[ext]/[name].[ext]';
33
- },
34
- },
35
- },
36
- },
37
- };