@supersoniks/concorde 3.0.0 → 3.0.2

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.
@@ -3733,35 +3733,5 @@
3733
3733
  }
3734
3734
  }
3735
3735
  }
3736
- },
3737
- {
3738
- "search": "Taxonomy",
3739
- "files": {
3740
- "la-billetterie/components/event/atoms/taxonomy/taxonomy.md": {
3741
- "title": "Taxonomy",
3742
- "hashes": {
3743
- "taxonomy": {
3744
- "count": 1,
3745
- "title": "",
3746
- "type": "page"
3747
- }
3748
- }
3749
- }
3750
- }
3751
- },
3752
- {
3753
- "search": "Évènements",
3754
- "files": {
3755
- "la-billetterie/components/event/event.md": {
3756
- "title": "Évènements",
3757
- "hashes": {
3758
- "évènements": {
3759
- "count": 1,
3760
- "title": "",
3761
- "type": "page"
3762
- }
3763
- }
3764
- }
3765
- }
3766
3736
  }
3767
3737
  ]
@@ -1,7 +1,7 @@
1
1
  import { html, LitElement, nothing } from "lit";
2
2
  import { customElement, state } from "lit/decorators.js";
3
3
  import { PublisherManager } from "@supersoniks/concorde/utils";
4
- // import {tailwind} from "@supersoniks/concorde/la-billetterie/tailwind";
4
+ import { tailwind } from "../tailwind";
5
5
  import search from "./docs-search.json";
6
6
  import "@supersoniks/concorde/core/components/ui/divider/divider";
7
7
  import "@supersoniks/concorde/core/components/ui/icon/icon";
@@ -12,7 +12,7 @@ const win: any = window;
12
12
  const fuzzysort = win.fuzzysort;
13
13
  @customElement(tagName)
14
14
  export class DocsSearch extends LitElement {
15
- // static styles = [tailwind];
15
+ static styles = [tailwind];
16
16
  @state({ type: Boolean }) hidePopMenu = true;
17
17
  search(val) {
18
18
  if (!val || val.length < 3) {
@@ -0,0 +1,25 @@
1
+ @import "tailwindcss/base";
2
+ @import "tailwindcss/components";
3
+ @import "tailwindcss/utilities";
4
+
5
+ .custom-scroll {
6
+ overflow: auto !important;
7
+ }
8
+
9
+ .custom-scroll:hover::-webkit-scrollbar-thumb {
10
+ box-shadow: inset 0 0 2rem 2rem var(--sc-base-900);
11
+ }
12
+
13
+ .custom-scroll::-webkit-scrollbar {
14
+ width: 0.5rem;
15
+ height: 0.5rem;
16
+ border: solid 0.15rem transparent;
17
+ border-radius: var(--sc-rounded);
18
+ background: transparent;
19
+ }
20
+
21
+ .custom-scroll::-webkit-scrollbar-thumb {
22
+ opacity: 0;
23
+ transition: box-shadow 0.2s;
24
+ border: solid 0.15rem transparent;
25
+ }
@@ -0,0 +1,6 @@
1
+ import { css, unsafeCSS } from "lit";
2
+ import tailwindImport from "./css/tailwind.css?inline";
3
+
4
+ export const tailwind = css`
5
+ ${unsafeCSS(tailwindImport)}
6
+ `;
package/src/mixins.ts CHANGED
@@ -12,7 +12,7 @@ export const Subscriber = mySubscriber.default;
12
12
  import * as myTemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
13
13
  export const TemplatesContainer = myTemplatesContainer.default;
14
14
 
15
- import {ConcordeWindow} from "./core/_types/types";
15
+ import { ConcordeWindow } from "./core/_types/types";
16
16
  declare const window: ConcordeWindow;
17
17
 
18
18
  window["concorde-mixins"] = window["concorde-mixins"] || {};
@@ -0,0 +1,186 @@
1
+ module.exports = {
2
+ content: [
3
+ "./src/**/*.{js,ts,scss,md}",
4
+ "./json/**/*.json",
5
+ "./index.html",
6
+ ],
7
+ theme: {
8
+ borderRadius: {
9
+ DEFAULT: "var(--sc-rounded)",
10
+ none: "0",
11
+ sm: "var(--sc-rounded-sm)",
12
+ md: "var(--sc-rounded-md)",
13
+ lg: "var(--sc-rounded-lg)",
14
+ xl: "var(--sc-rounded-xl)",
15
+ full: "9999px",
16
+ },
17
+ colors: {
18
+ transparent: "transparent",
19
+ current: "currentColor",
20
+ content: "var(--sc-base-content)",
21
+ neutral: {
22
+ 0: "var(--sc-base)",
23
+ 50: "var(--sc-base-50)",
24
+ 100: "var(--sc-base-100)",
25
+ 200: "var(--sc-base-200)",
26
+ 300: "var(--sc-base-300)",
27
+ 400: "var(--sc-base-400)",
28
+ 500: "var(--sc-base-500)",
29
+ 600: "var(--sc-base-600)",
30
+ 700: "var(--sc-base-700)",
31
+ 800: "var(--sc-base-800)",
32
+ 900: "var(--sc-base-900)",
33
+ content: "var(--sc-base)",
34
+ },
35
+ primary: {
36
+ DEFAULT: "var(--sc-primary)",
37
+ content: "var(--sc-primary-content)",
38
+ },
39
+ success: {
40
+ DEFAULT: "var(--sc-success)",
41
+ content: "var(--sc-success-content)",
42
+ },
43
+ danger: {
44
+ DEFAULT: "var(--sc-danger)",
45
+ content: "var(--sc-danger-content)",
46
+ },
47
+ warning: {
48
+ DEFAULT: "var(--sc-warning)",
49
+ content: "var(--sc-warning-content)",
50
+ },
51
+ info: {
52
+ DEFAULT: "var(--sc-info)",
53
+ content: "var(--sc-info-content)",
54
+ },
55
+ contrast: {
56
+ DEFAULT: "var(--sc-contrast)",
57
+ content: "var(--sc-contrast-content)",
58
+ },
59
+ },
60
+ extend: {
61
+ extend: {
62
+ maxWidth: {
63
+ 'prose': '70ch',
64
+ }
65
+ },
66
+ borderWidth: {
67
+ DEFAULT: "var(--sc-border-width)",
68
+ },
69
+ fontFamily: {
70
+ headings: ["var(--sc-headings-font-family)"],
71
+ body: ["var(--sc-font-family-base)"],
72
+ monospace: ["var(--sc-font-family-monospace, monospace)"],
73
+ },
74
+ fontWeight: {
75
+ headings: "var(--sc-headings-font-weight)",
76
+ },
77
+ animation: {
78
+ heartbeat: "heartbeat 1.15s ease-in-out infinite",
79
+ },
80
+ keyframes: {
81
+ heartbeat: {
82
+ "0%": {
83
+ transform: "scale(1)",
84
+ },
85
+
86
+ "14%": {
87
+ transform: "scale(1.3)",
88
+ },
89
+
90
+ "28%": {
91
+ transform: "scale(1)",
92
+ },
93
+
94
+ "42%": {
95
+ transform: "scale(1.3)",
96
+ },
97
+
98
+ "70%": {
99
+ transform: "scale(1)",
100
+ },
101
+ },
102
+ },
103
+ typography: {
104
+ DEFAULT: {
105
+ fontFamily: ["var(--sc-font-family-base)", "sans-serif"],
106
+ css: {
107
+ "--tw-prose-body": "var(--sc-base-content)",
108
+ "--tw-prose-headings": "var(--sc-base-900)",
109
+ "--tw-prose-lead": "var(--sc-base-content)",
110
+ "--tw-prose-links": "var(--sc-base-900)",
111
+ "--tw-prose-bold": "var(--sc-base-content)",
112
+ "--tw-prose-counters": "var(--sc-base-500)",
113
+ "--tw-prose-bullets": "var(--sc-base-300)",
114
+ "--tw-prose-hr": "var(--sc-base-200)",
115
+ "--tw-prose-quotes": "var(--sc-base-content)",
116
+ "--tw-prose-quote-borders": "var(--sc-base-200)",
117
+ "--tw-prose-captions": "var(--sc-base-500)",
118
+ "--tw-prose-code": "var(--sc-base-900)",
119
+ "--tw-prose-pre-code": "var(--sc-base-200)",
120
+ "--tw-prose-pre-bg": "var(--sc-base-800)",
121
+ "--tw-prose-th-borders": "var(--sc-base-300)",
122
+ "--tw-prose-td-borders": "var(--sc-base-200)",
123
+ "--tw-prose-invert-body": "var(--sc-base-300)",
124
+ "--tw-prose-invert-headings": "var(--sc-base)",
125
+ "--tw-prose-invert-lead": "var(--sc-base-400)",
126
+ "--tw-prose-invert-links": "var(--sc-base)",
127
+ "--tw-prose-invert-bold": "var(--sc-base)",
128
+ "--tw-prose-invert-counters": "var(--sc-base-400)",
129
+ "--tw-prose-invert-bullets": "var(--sc-base-600)",
130
+ "--tw-prose-invert-hr": "var(--sc-base-700)",
131
+ "--tw-prose-invert-quotes": "var(--sc-base-100)",
132
+ "--tw-prose-invert-quote-borders": "var(--sc-base-700)",
133
+ "--tw-prose-invert-captions": "var(--sc-base-400)",
134
+ "--tw-prose-invert-code": "var(--sc-base)",
135
+ "--tw-prose-invert-pre-code": "var(--sc-base-300)",
136
+ "--tw-prose-invert-pre-bg": "var(--sc-base-900)",
137
+ "--tw-prose-invert-th-borders": "var(--sc-base-600)",
138
+ "--tw-prose-invert-td-borders": "var(--sc-base-700)",
139
+ "line-height": "1.5",
140
+ 'ol': {
141
+ 'margin-top': "1em",
142
+ 'margin-bottom': "1em",
143
+ },
144
+ 'ul': {
145
+ 'margin-top': "1em",
146
+ 'margin-bottom': "1em",
147
+ },
148
+ "p": {
149
+ 'margin-top': "1em",
150
+ 'margin-bottom': "1em",
151
+ },
152
+ "strong a": {
153
+ fontWeight: "bolder",
154
+ },
155
+ 'iframe[src*="youtu"]': {
156
+ borderRadius: "var(--sc-rounded-md)",
157
+ },
158
+ li: {
159
+ "margin-bottom": "0.5em",
160
+ "list-style-type": "disc",
161
+ },
162
+ a: {
163
+ textDecoration: "underline",
164
+ },
165
+ },
166
+ },
167
+ },
168
+ fontSize: {
169
+ xs: "0.75rem" /* 12px */,
170
+ sm: "0.875rem" /* 14px */,
171
+ base: "1rem" /* 14px */,
172
+ lg: "1.125rem" /* 18px */,
173
+ xl: "1.25rem" /* 20px */,
174
+ "2xl": "1.5rem" /* 24px */,
175
+ "3xl": "1.875rem" /* 30px */,
176
+ "4xl": "2.25rem" /* 36px */,
177
+ "5xl": "3rem" /* 48px */,
178
+ "6xl": "3.75rem" /* 60px */,
179
+ "7xl": "4.5rem" /* 72px */,
180
+ "8xl": "6rem" /* 96px */,
181
+ "9xl": "8rem" /* 128px */,
182
+ }
183
+ },
184
+ },
185
+ plugins: [require("@tailwindcss/typography")],
186
+ };
package/vite/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import fs from "fs";
2
- import path, { resolve } from "path";
2
+ import path from "path";
3
3
 
4
4
  console.log("🚀 creation d'un référence de tagsNames de WebComponents");
5
5
 
@@ -39,7 +39,6 @@ componentsFiles.forEach((file) => {
39
39
  });
40
40
  }
41
41
  });
42
- // fs.writeFileSync(path.resolve("src/tag-list.json"), JSON.stringify(components));
43
42
 
44
43
  /**
45
44
  * Rollup plugin to scope components by replacing the prefix "sonic" with a custom prefix
@@ -57,23 +56,16 @@ const scopeComponents = (prefix, filesFilter) => {
57
56
  name: "replace-text",
58
57
 
59
58
  //Add e resolver to the plugin
60
- // resolveId(source) {
61
- // console.log(process.env.NODE_ENV);
62
- // // if (process.env.NODE_ENV === "development") {
63
- // return source;
64
- // // }
65
- // //get extension from source
66
- // let extension = path.extname(source);
67
- // extension = extension ? "" : ".ts";
68
- // // remap source beginig with @supersoniks/concorde to the local path
69
-
70
- // return path.resolve(
71
- // source.replace("@supersoniks/concorde", __dirname + "/../src") +
72
- // extension
73
- // );
74
- // }
75
- // },
76
-
59
+ resolveId(source) {
60
+ let extension = path.extname(source);
61
+ extension = extension ? "" : ".ts";
62
+ // remap source beginig with @supersoniks/concorde to the local path
63
+
64
+ return path.resolve(
65
+ source.replace("@supersoniks/concorde", __dirname + "/../src") +
66
+ extension
67
+ );
68
+ },
77
69
  transform(code, id) {
78
70
  if (
79
71
  id.indexOf("node_modules") != -1 &&
@@ -96,13 +88,19 @@ const scopeComponents = (prefix, filesFilter) => {
96
88
  };
97
89
 
98
90
  const config = (
99
- componentsScope = "sonic",
100
- tsConfig = null,
101
- viteConfig = {}
91
+ options = {
92
+ componentPrefix: "sonic",
93
+ tsConfig: null,
94
+ viteConfig: {},
95
+ }
102
96
  ) => {
103
97
  //log current directory from where the script is running
104
98
 
99
+ const componentsScope = options.componentPrefix;
100
+ const tsConfig = options.tsConfig;
101
+ const viteConfig = options.viteConfig;
105
102
  const result = { ...viteConfig };
103
+
106
104
  result.plugins = [
107
105
  ...(result.plugins || []),
108
106
  scopeComponents(componentsScope),
@@ -123,6 +121,8 @@ const config = (
123
121
  };
124
122
  result.optimizeDeps = {
125
123
  ...(result.optimizeDeps || {}),
124
+ exclude: ["@supersoniks/concorde"],
125
+ include: ["url-pattern", "url-pattern/*", "url-pattern/*/*"],
126
126
  esbuildOptions: {
127
127
  ...(result.optimizeDeps?.esbuildOptions || {}),
128
128
  tsconfigRaw: tsConfig,
package/vite.config.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import postcssLit from "rollup-plugin-postcss-lit";
2
+
1
3
  // import minifyHTML from "rollup-plugin-minify-html-literals";
2
4
  import { defineConfig } from "vite";
3
5
  import path from "path";
@@ -28,12 +30,12 @@ export const config = {
28
30
  outDir: "dist",
29
31
  isLibrary: true,
30
32
  },
31
- // docs: {
32
- // entry: path.resolve(__dirname, "./src/docs.ts"),
33
- // name: "concorde-core",
34
- // outDir: "../../concorde_doc",
35
- // isLibrary: false,
36
- // },
33
+ docs: {
34
+ entry: path.resolve(__dirname, "./src/docs.ts"),
35
+ name: "concorde-core",
36
+ outDir: "docs",
37
+ isLibrary: false,
38
+ },
37
39
  };
38
40
  let libName = process.env.LIB_NAME;
39
41
  if (!libName) libName = "core";
@@ -64,6 +66,7 @@ fs.writeFileSync(
64
66
 
65
67
  // https://vitejs.dev/config/
66
68
  export default defineConfig({
69
+ base: "./",
67
70
  define: {
68
71
  // Définir une constante contenant la date de build
69
72
  __BUILD_DATE__: JSON.stringify(__BUILD_DATE__.toString()),
@@ -76,12 +79,11 @@ export default defineConfig({
76
79
  },
77
80
  ],
78
81
  },
79
- server: {
80
- port: 3000,
81
- },
82
- esbuild: {
83
- minify: false,
84
- },
85
82
  build: build,
86
- plugins: [CustomHmr()],
83
+ plugins: [
84
+ CustomHmr(),
85
+ postcssLit({
86
+ include: ["src/**/*.css", "src/**/*.css?*"],
87
+ }),
88
+ ],
87
89
  });
@@ -1,3 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
File without changes