@egjs/vue3-flicking 4.15.0 → 4.16.0-beta.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.
Files changed (40) hide show
  1. package/LICENSE +19 -0
  2. package/declaration/FlickingProps.d.ts +1 -1
  3. package/declaration/VuePanel.d.ts +1 -1
  4. package/declaration/VueRenderer.d.ts +1 -1
  5. package/declaration/types.d.ts +3 -3
  6. package/dev/archive/App.vue +156 -0
  7. package/dev/archive/BasicDemo.vue +171 -0
  8. package/dev/archive/MainApp.vue +73 -0
  9. package/dev/archive/ReactiveDemo.vue +120 -0
  10. package/dev/archive/components/Test.vue +3 -0
  11. package/dev/archive/components/Test2.vue +3 -0
  12. package/dev/archive/demo-common.css +208 -0
  13. package/dev/archive/main.ts +15 -0
  14. package/dev/archive/router.ts +29 -0
  15. package/dev/basic-sample/App.vue +32 -0
  16. package/dev/basic-sample/index.html +15 -0
  17. package/dev/basic-sample/main.ts +13 -0
  18. package/dev/index.html +18 -0
  19. package/dev/plugin-check/App.vue +245 -0
  20. package/dev/plugin-check/index.html +15 -0
  21. package/dev/plugin-check/main.ts +13 -0
  22. package/dev/scratch/App.vue +32 -0
  23. package/dev/scratch/index.html +15 -0
  24. package/dev/scratch/main.ts +13 -0
  25. package/dev/vite-env.d.ts +9 -0
  26. package/dist/flicking.cjs.js +446 -542
  27. package/dist/flicking.cjs.js.map +1 -1
  28. package/dist/flicking.esm.js +450 -541
  29. package/dist/flicking.esm.js.map +1 -1
  30. package/package.json +16 -22
  31. package/src/Flicking.ts +55 -62
  32. package/src/FlickingProps.ts +3 -2
  33. package/src/VueElementProvider.ts +3 -1
  34. package/src/VueRenderer.ts +3 -8
  35. package/src/reactive.ts +1 -2
  36. package/src/types.ts +27 -30
  37. package/vite.config.ts +34 -0
  38. package/vite.dev.config.ts +49 -0
  39. package/public/favicon.ico +0 -0
  40. package/public/index.html +0 -18
package/vite.config.ts ADDED
@@ -0,0 +1,34 @@
1
+ import { createViteConfig } from "../../config/vite-build-helper";
2
+ // @ts-expect-error: resolveJsonModule issue in build environment
3
+ import pkg from "./package.json";
4
+
5
+ const name = "VueFlicking";
6
+ const external = {
7
+ vue: "Vue",
8
+ "vue-class-component": "VueClassComponent",
9
+ "@egjs/flicking": "Flicking",
10
+ "@egjs/list-differ": "eg.ListDiffer",
11
+ "@egjs/axes": "eg.Axes",
12
+ "@egjs/component": "eg.Component"
13
+ };
14
+
15
+ // Determine build target based on environment variable
16
+ // usage: VITE_BUILD_FORMAT=cjs vite build
17
+ const buildFormat = process.env.VITE_BUILD_FORMAT || "esm";
18
+
19
+ let input = "src/index.ts";
20
+ let formats: any[] = ["es"];
21
+
22
+ if (buildFormat === "cjs") {
23
+ input = "src/index.umd.ts";
24
+ formats = ["cjs"];
25
+ }
26
+
27
+ export default createViteConfig({
28
+ input,
29
+ name,
30
+ packageJson: pkg,
31
+ external,
32
+ formats,
33
+ output: "dist/flicking"
34
+ });
@@ -0,0 +1,49 @@
1
+ import path from "node:path";
2
+ import vue from "@vitejs/plugin-vue";
3
+ import { defineConfig } from "vite";
4
+
5
+ export default defineConfig(({ mode }) => {
6
+ const useBuild = mode === "production";
7
+
8
+ return {
9
+ plugins: [vue()],
10
+ root: path.resolve(__dirname, "dev"),
11
+ server: {
12
+ port: 3002,
13
+ open: true,
14
+ fs: {
15
+ allow: [".."]
16
+ }
17
+ },
18
+ resolve: {
19
+ alias: useBuild
20
+ ? {
21
+ // 빌드 검증 모드 - 빌드 결과물 사용
22
+ "@dev/flicking": path.resolve(__dirname, "../flicking/dist/flicking.esm.js"),
23
+ "@dev/vue3-flicking": path.resolve(__dirname, "dist/flicking.esm.js"),
24
+ "@dev/plugins": path.resolve(__dirname, "../flicking-plugins/dist/plugins.esm.js"),
25
+ "@dev/flicking-css": path.resolve(__dirname, "../flicking/dist/flicking.css"),
26
+ "@dev/plugins-css": path.resolve(__dirname, "../flicking-plugins/dist/flicking-plugins.css"),
27
+ // 소스코드 내부의 @egjs/flicking 참조용
28
+ "@egjs/flicking": path.resolve(__dirname, "../flicking/dist/flicking.esm.js")
29
+ }
30
+ : {
31
+ // 개발 모드 - 모든 소스 직접 참조 (HMR!)
32
+ "@dev/flicking": path.resolve(__dirname, "../flicking/src/index.ts"),
33
+ "@dev/vue3-flicking": path.resolve(__dirname, "src/index.ts"),
34
+ "@dev/plugins": path.resolve(__dirname, "../flicking-plugins/src/index.ts"),
35
+ "@dev/flicking-css": path.resolve(__dirname, "../flicking/sass/flicking.sass"),
36
+ "@dev/plugins-css": path.resolve(__dirname, "../flicking-plugins/css/all.css"),
37
+ // 소스코드 내부의 @egjs/flicking 참조용
38
+ "@egjs/flicking": path.resolve(__dirname, "../flicking/src/index.ts")
39
+ },
40
+ extensions: [".ts", ".js", ".vue", ".json"]
41
+ },
42
+ optimizeDeps: {
43
+ include: ["vue", "@egjs/axes", "@egjs/component", "@egjs/imready", "@egjs/list-differ"]
44
+ },
45
+ define: {
46
+ __DEV__: JSON.stringify(!useBuild)
47
+ }
48
+ };
49
+ });
Binary file
package/public/index.html DELETED
@@ -1,18 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.2/css/bulma.min.css">
9
- <title><%= htmlWebpackPlugin.options.title %></title>
10
- </head>
11
- <body>
12
- <noscript>
13
- <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
14
- </noscript>
15
- <div id="app"></div>
16
- <!-- built files will be auto injected -->
17
- </body>
18
- </html>