@supersoniks/concorde 4.1.0 → 4.2.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.
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +68 -68
- package/concorde-core.es.js +458 -456
- package/dist/concorde-core.bundle.js +68 -68
- package/dist/concorde-core.es.js +458 -456
- package/docs/assets/{index-BTo6ly4d.js → index-B0IJ9I_B.js} +418 -320
- package/docs/assets/{index-B669R8JF.css → index-B3QHEJTV.css} +1 -1
- package/docs/index.html +2 -2
- package/docs/src/docs/_misc/bind.md +74 -0
- package/docs/src/docs/_misc/key.md +135 -0
- package/docs/src/docs/_misc/on-assign.md +5 -5
- package/docs/src/docs/_misc/wait-for-ancestors.md +160 -0
- package/docs/src/docs/search/docs-search.json +590 -0
- package/docs/src/tsconfig-model.json +1 -1
- package/docs/src/tsconfig.json +324 -314
- package/package.json +1 -4
- package/scripts/pre-build.mjs +0 -0
- package/src/core/components/functional/example/example.ts +0 -0
- package/src/core/components/ui/captcha/captcha.ts +12 -6
- package/src/core/utils/PublisherProxy.ts +8 -6
- package/src/core/utils/route.ts +21 -3
- package/src/tsconfig.json +0 -9
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite.config.mts +0 -0
- package/README.md +0 -163
- package/php/get-challenge.php +0 -34
- package/php/some-service.php +0 -42
- package/src/core/components/ui/modal/modal.stories.ts +0 -140
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersoniks/concorde",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "",
|
|
@@ -217,9 +217,6 @@
|
|
|
217
217
|
"./modal-title": "./src/core/components/ui/modal/modal-title.ts",
|
|
218
218
|
"./ui/modal-title": "./src/core/components/ui/modal/modal-title.ts",
|
|
219
219
|
"./ui/modal/modal-title": "./src/core/components/ui/modal/modal-title.ts",
|
|
220
|
-
"./modal.stories": "./src/core/components/ui/modal/modal.stories.ts",
|
|
221
|
-
"./ui/modal.stories": "./src/core/components/ui/modal/modal.stories.ts",
|
|
222
|
-
"./ui/modal/modal.stories": "./src/core/components/ui/modal/modal.stories.ts",
|
|
223
220
|
"./modal": "./src/core/components/ui/modal/modal.ts",
|
|
224
221
|
"./ui/modal": "./src/core/components/ui/modal/modal.ts",
|
|
225
222
|
"./pop": "./src/core/components/ui/pop/pop.ts",
|
package/scripts/pre-build.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -3,7 +3,10 @@ import { dp, HTML } from "@supersoniks/concorde/utils";
|
|
|
3
3
|
import { css, html, LitElement, nothing } from "lit";
|
|
4
4
|
import { customElement, property } from "lit/decorators.js";
|
|
5
5
|
import { ConcordeWindow } from "@supersoniks/concorde/core/_types/types";
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
DataProvider,
|
|
8
|
+
Publisher,
|
|
9
|
+
} from "@supersoniks/concorde/core/utils/PublisherProxy";
|
|
7
10
|
import {
|
|
8
11
|
generateKey,
|
|
9
12
|
encryptToBase64,
|
|
@@ -72,7 +75,8 @@ export class Captcha extends Subscriber(LitElement) {
|
|
|
72
75
|
script.type = "module";
|
|
73
76
|
this.setAttribute("async", "");
|
|
74
77
|
this.setAttribute("defer", "");
|
|
75
|
-
script.src =
|
|
78
|
+
script.src =
|
|
79
|
+
"https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js";
|
|
76
80
|
scriptAdded = true;
|
|
77
81
|
document.head.appendChild(script);
|
|
78
82
|
}
|
|
@@ -84,7 +88,7 @@ export class Captcha extends Subscriber(LitElement) {
|
|
|
84
88
|
captchaToken: string;
|
|
85
89
|
}>(
|
|
86
90
|
this.getAncestorAttributeValue("headersDataProvider") ??
|
|
87
|
-
this.getAncestorAttributeValue("formDataProvider")
|
|
91
|
+
this.getAncestorAttributeValue("formDataProvider"),
|
|
88
92
|
);
|
|
89
93
|
|
|
90
94
|
if (
|
|
@@ -93,14 +97,14 @@ export class Captcha extends Subscriber(LitElement) {
|
|
|
93
97
|
) {
|
|
94
98
|
this.formPublisher.needsCaptchaValidation.set(true);
|
|
95
99
|
(this.formPublisher.captchaToken as Publisher<string>).onAssign(
|
|
96
|
-
this.onCaptchaTokenChanged
|
|
100
|
+
this.onCaptchaTokenChanged,
|
|
97
101
|
);
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
disconnectedCallback(): void {
|
|
101
105
|
if (this.formPublisher) {
|
|
102
106
|
(this.formPublisher.captchaToken as Publisher<string>).offAssign(
|
|
103
|
-
this.onCaptchaTokenChanged
|
|
107
|
+
this.onCaptchaTokenChanged,
|
|
104
108
|
);
|
|
105
109
|
this.formPublisher.captchaToken.set("");
|
|
106
110
|
this.formPublisher.needsCaptchaValidation.set(false);
|
|
@@ -115,7 +119,9 @@ export class Captcha extends Subscriber(LitElement) {
|
|
|
115
119
|
if (!form) return;
|
|
116
120
|
const formData = new FormData(form);
|
|
117
121
|
this.formPublisher.captchaKey.set(this.key);
|
|
118
|
-
this.formPublisher.captchaToken.set(
|
|
122
|
+
this.formPublisher.captchaToken.set(
|
|
123
|
+
formData.get("altcha")?.toString() || "",
|
|
124
|
+
);
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
async generateEncryptedKey() {
|
|
@@ -31,7 +31,7 @@ function isLeaf(value: any) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function isComplex(value: any) {
|
|
34
|
-
return typeof value === "object" && value
|
|
34
|
+
return typeof value === "object" && value !== null;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
declare const __BUILD_DATE__: string;
|
|
@@ -315,11 +315,13 @@ export class PublisherProxy<T = any> {
|
|
|
315
315
|
* et qu'elle est primitive
|
|
316
316
|
*/
|
|
317
317
|
if (
|
|
318
|
-
this._value_ &&
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
318
|
+
(isComplex(this._value_) &&
|
|
319
|
+
isComplex(newValue) &&
|
|
320
|
+
newValue &&
|
|
321
|
+
isLeaf(this._value_) &&
|
|
322
|
+
isLeaf(newValue) &&
|
|
323
|
+
(this._value_ as any).__value === (newValue as any).__value) ||
|
|
324
|
+
(!isComplex(newValue) && newValue === (this._value_ as any).__value)
|
|
323
325
|
) {
|
|
324
326
|
return true;
|
|
325
327
|
}
|
package/src/core/utils/route.ts
CHANGED
|
@@ -30,10 +30,28 @@ export class Route<RoutesData = any> {
|
|
|
30
30
|
matchesLocation() {
|
|
31
31
|
return this.matchesCurrentPath();
|
|
32
32
|
}
|
|
33
|
+
|
|
33
34
|
matchesCurrentPath() {
|
|
34
35
|
return this.extract() !== null;
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
removeQuery() {
|
|
39
|
+
const url = new URL(this.route, window.location.origin);
|
|
40
|
+
url.search = "";
|
|
41
|
+
this.route = url.href.replace(window.location.origin, "");
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
withoutQuery() {
|
|
46
|
+
return this.clone().removeQuery();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
clone() {
|
|
50
|
+
const clonedRoute = new Route();
|
|
51
|
+
clonedRoute.route = this.route;
|
|
52
|
+
return clonedRoute;
|
|
53
|
+
}
|
|
54
|
+
|
|
37
55
|
fill(properties: Object) {
|
|
38
56
|
this.route = new URLPattern(this.route).stringify(properties);
|
|
39
57
|
return this;
|
|
@@ -98,7 +116,7 @@ export class Routes {
|
|
|
98
116
|
static register<RouteData = any>(
|
|
99
117
|
routes: Partial<RouteData>,
|
|
100
118
|
baseUrlOrOpt: { baseUrl?: string; prefix?: string } | string = "",
|
|
101
|
-
prefix = ""
|
|
119
|
+
prefix = "",
|
|
102
120
|
) {
|
|
103
121
|
const newRoutes: Partial<RouteData> = {};
|
|
104
122
|
Object.keys(routes).forEach((key) => {
|
|
@@ -125,7 +143,7 @@ export class Routes {
|
|
|
125
143
|
}
|
|
126
144
|
static get<RouteData extends Record<keyof RouteData, string | undefined>>(
|
|
127
145
|
name: keyof RouteData,
|
|
128
|
-
args?: RouteArgs
|
|
146
|
+
args?: RouteArgs,
|
|
129
147
|
) {
|
|
130
148
|
const routes = Routes.routes as Partial<RouteData>;
|
|
131
149
|
let route = routes[name] || "";
|
|
@@ -134,7 +152,7 @@ export class Routes {
|
|
|
134
152
|
}
|
|
135
153
|
const url = new URL(
|
|
136
154
|
route,
|
|
137
|
-
route.startsWith("#") ? window.location.href : window.location.origin
|
|
155
|
+
route.startsWith("#") ? window.location.href : window.location.origin,
|
|
138
156
|
);
|
|
139
157
|
if (args?.query) {
|
|
140
158
|
Object.entries(args.query).forEach(([key, value]) => {
|
package/src/tsconfig.json
CHANGED
|
@@ -605,15 +605,6 @@
|
|
|
605
605
|
"./ui/modal/modal-title": [
|
|
606
606
|
"/sites/concorde/src/core/components/ui/modal/modal-title.ts"
|
|
607
607
|
],
|
|
608
|
-
"./modal.stories": [
|
|
609
|
-
"/sites/concorde/src/core/components/ui/modal/modal.stories.ts"
|
|
610
|
-
],
|
|
611
|
-
"./ui/modal.stories": [
|
|
612
|
-
"/sites/concorde/src/core/components/ui/modal/modal.stories.ts"
|
|
613
|
-
],
|
|
614
|
-
"./ui/modal/modal.stories": [
|
|
615
|
-
"/sites/concorde/src/core/components/ui/modal/modal.stories.ts"
|
|
616
|
-
],
|
|
617
608
|
"./modal": [
|
|
618
609
|
"/sites/concorde/src/core/components/ui/modal/modal.ts"
|
|
619
610
|
],
|
package/src/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./components.ts","./concorde-loaded.ts","./dataprovider.ts","./decorators.ts","./directives.ts","./index.ts","./mixins.ts","./utils.ts","./core/core.ts","./core/_types/types.ts","./core/components/functional/functional.ts","./core/components/functional/date/date.ts","./core/components/functional/example/example.ts","./core/components/functional/fetch/fetch.ts","./core/components/functional/if/if.test.ts","./core/components/functional/if/if.ts","./core/components/functional/list/list.demo.ts","./core/components/functional/list/list.spec.ts","./core/components/functional/list/list.ts","./core/components/functional/mix/mix.ts","./core/components/functional/queue/queue.demo.ts","./core/components/functional/queue/queue.ts","./core/components/functional/router/redirect.ts","./core/components/functional/router/router.demo.ts","./core/components/functional/router/router.spec.ts","./core/components/functional/router/router.ts","./core/components/functional/sdui/SDUIDescriptorTransformer.ts","./core/components/functional/sdui/sdui-utils.ts","./core/components/functional/sdui/sdui.ts","./core/components/functional/sdui/types.ts","./core/components/functional/sonic-scope/sonic-scope.ts","./core/components/functional/states/states.demo.ts","./core/components/functional/states/states.spec.ts","./core/components/functional/states/states.ts","./core/components/functional/submit/submit.ts","./core/components/functional/subscriber/subscriber.ts","./core/components/functional/translation/translation.ts","./core/components/functional/value/value.ts","./core/components/ui/ui.ts","./core/components/ui/_css/scroll.ts","./core/components/ui/_css/shadow.ts","./core/components/ui/_css/size.ts","./core/components/ui/_css/type.ts","./core/components/ui/alert/alert.ts","./core/components/ui/alert-messages/alert-messages.ts","./core/components/ui/badge/badge.ts","./core/components/ui/button/button.ts","./core/components/ui/captcha/altchaStyles.ts","./core/components/ui/captcha/captcha.ts","./core/components/ui/card/card-footer.ts","./core/components/ui/card/card-header-descripton.ts","./core/components/ui/card/card-header.ts","./core/components/ui/card/card-main.ts","./core/components/ui/card/card.ts","./core/components/ui/divider/divider.ts","./core/components/ui/form/checkbox/checkbox.ts","./core/components/ui/form/css/form-control.ts","./core/components/ui/form/fieldset/fieldset.ts","./core/components/ui/form/fieldset/legend-description.ts","./core/components/ui/form/fieldset/legend.ts","./core/components/ui/form/form-actions/form-actions.ts","./core/components/ui/form/form-layout/form-layout.ts","./core/components/ui/form/input/input.ts","./core/components/ui/form/input/password-helper.ts","./core/components/ui/form/input/same-value-helper.ts","./core/components/ui/form/input-autocomplete/input-autocomplete.ts","./core/components/ui/form/radio/radio.ts","./core/components/ui/form/select/select.ts","./core/components/ui/form/switch/switch.ts","./core/components/ui/form/textarea/textarea.ts","./core/components/ui/group/group.ts","./core/components/ui/icon/icon.stories.ts","./core/components/ui/icon/icon.ts","./core/components/ui/icon/icons.ts","./core/components/ui/image/image.ts","./core/components/ui/link/link.ts","./core/components/ui/loader/loader.stories.ts","./core/components/ui/loader/loader.ts","./core/components/ui/loader/styles/fixed.ts","./core/components/ui/loader/styles/inline.ts","./core/components/ui/menu/menu-item.ts","./core/components/ui/menu/menu.ts","./core/components/ui/modal/modal-actions.ts","./core/components/ui/modal/modal-close.ts","./core/components/ui/modal/modal-content.ts","./core/components/ui/modal/modal-subtitle.ts","./core/components/ui/modal/modal-title.ts","./core/components/ui/modal/modal.
|
|
1
|
+
{"root":["./components.ts","./concorde-loaded.ts","./dataprovider.ts","./decorators.ts","./directives.ts","./index.ts","./mixins.ts","./utils.ts","./core/core.ts","./core/_types/types.ts","./core/components/functional/functional.ts","./core/components/functional/date/date.ts","./core/components/functional/example/example.ts","./core/components/functional/fetch/fetch.ts","./core/components/functional/if/if.test.ts","./core/components/functional/if/if.ts","./core/components/functional/list/list.demo.ts","./core/components/functional/list/list.spec.ts","./core/components/functional/list/list.ts","./core/components/functional/mix/mix.ts","./core/components/functional/queue/queue.demo.ts","./core/components/functional/queue/queue.ts","./core/components/functional/router/redirect.ts","./core/components/functional/router/router.demo.ts","./core/components/functional/router/router.spec.ts","./core/components/functional/router/router.ts","./core/components/functional/sdui/SDUIDescriptorTransformer.ts","./core/components/functional/sdui/sdui-utils.ts","./core/components/functional/sdui/sdui.ts","./core/components/functional/sdui/types.ts","./core/components/functional/sonic-scope/sonic-scope.ts","./core/components/functional/states/states.demo.ts","./core/components/functional/states/states.spec.ts","./core/components/functional/states/states.ts","./core/components/functional/submit/submit.ts","./core/components/functional/subscriber/subscriber.ts","./core/components/functional/translation/translation.ts","./core/components/functional/value/value.ts","./core/components/ui/ui.ts","./core/components/ui/_css/scroll.ts","./core/components/ui/_css/shadow.ts","./core/components/ui/_css/size.ts","./core/components/ui/_css/type.ts","./core/components/ui/alert/alert.ts","./core/components/ui/alert-messages/alert-messages.ts","./core/components/ui/badge/badge.ts","./core/components/ui/button/button.ts","./core/components/ui/captcha/altchaStyles.ts","./core/components/ui/captcha/captcha.ts","./core/components/ui/card/card-footer.ts","./core/components/ui/card/card-header-descripton.ts","./core/components/ui/card/card-header.ts","./core/components/ui/card/card-main.ts","./core/components/ui/card/card.ts","./core/components/ui/divider/divider.ts","./core/components/ui/form/checkbox/checkbox.ts","./core/components/ui/form/css/form-control.ts","./core/components/ui/form/fieldset/fieldset.ts","./core/components/ui/form/fieldset/legend-description.ts","./core/components/ui/form/fieldset/legend.ts","./core/components/ui/form/form-actions/form-actions.ts","./core/components/ui/form/form-layout/form-layout.ts","./core/components/ui/form/input/input.ts","./core/components/ui/form/input/password-helper.ts","./core/components/ui/form/input/same-value-helper.ts","./core/components/ui/form/input-autocomplete/input-autocomplete.ts","./core/components/ui/form/radio/radio.ts","./core/components/ui/form/select/select.ts","./core/components/ui/form/switch/switch.ts","./core/components/ui/form/textarea/textarea.ts","./core/components/ui/group/group.ts","./core/components/ui/icon/icon.stories.ts","./core/components/ui/icon/icon.ts","./core/components/ui/icon/icons.ts","./core/components/ui/image/image.ts","./core/components/ui/link/link.ts","./core/components/ui/loader/loader.stories.ts","./core/components/ui/loader/loader.ts","./core/components/ui/loader/styles/fixed.ts","./core/components/ui/loader/styles/inline.ts","./core/components/ui/menu/menu-item.ts","./core/components/ui/menu/menu.ts","./core/components/ui/modal/modal-actions.ts","./core/components/ui/modal/modal-close.ts","./core/components/ui/modal/modal-content.ts","./core/components/ui/modal/modal-subtitle.ts","./core/components/ui/modal/modal-title.ts","./core/components/ui/modal/modal.ts","./core/components/ui/pop/pop.ts","./core/components/ui/progress/progress.ts","./core/components/ui/table/table-caption.ts","./core/components/ui/table/table-tbody.ts","./core/components/ui/table/table-td.ts","./core/components/ui/table/table-tfoot.ts","./core/components/ui/table/table-th.ts","./core/components/ui/table/table-thead.ts","./core/components/ui/table/table-tr.ts","./core/components/ui/table/table.ts","./core/components/ui/theme/theme.ts","./core/components/ui/theme/theme-collection/core-variables.ts","./core/components/ui/theme/theme-collection/dark.ts","./core/components/ui/theme/theme-collection/light.ts","./core/components/ui/toast/message-subscriber.ts","./core/components/ui/toast/toast-item.ts","./core/components/ui/toast/toast.ts","./core/components/ui/toast/types.ts","./core/components/ui/tooltip/tooltip.ts","./core/decorators/Subscriber.ts","./core/decorators/lifecycle.ts","./core/decorators/subscriber/ancestorAttribute.ts","./core/decorators/subscriber/autoFill.ts","./core/decorators/subscriber/autoSubscribe.ts","./core/decorators/subscriber/bind.ts","./core/decorators/subscriber/common.ts","./core/decorators/subscriber/onAssign.ts","./core/directives/DataProvider.ts","./core/directives/Wording.ts","./core/mixins/Fetcher.ts","./core/mixins/FormCheckable.ts","./core/mixins/FormElement.ts","./core/mixins/FormInput.ts","./core/mixins/Subscriber.ts","./core/mixins/TemplatesContainer.ts","./core/mixins/mixins.ts","./core/utils/Arrays.ts","./core/utils/DataBindObserver.ts","./core/utils/Electron.ts","./core/utils/Format.ts","./core/utils/HTML.ts","./core/utils/LocationHandler.ts","./core/utils/Objects.ts","./core/utils/PublisherProxy.ts","./core/utils/Utils.ts","./core/utils/aesCrypto.ts","./core/utils/api.ts","./core/utils/route.spec.ts","./core/utils/route.ts","./core/utils/url-pattern.ts","./test-utils/TestUtils.ts"],"version":"5.9.2"}
|
package/vite.config.mts
CHANGED
|
File without changes
|
package/README.md
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
# Concorde Framework
|
|
2
|
-
|
|
3
|
-
Framework de composants Web basé sur Lit Element avec un système de thèmes, de data binding et de composants réutilisables.
|
|
4
|
-
|
|
5
|
-
## 📁 Structure du projet
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
concorde/
|
|
9
|
-
├── src/ # Code source principal
|
|
10
|
-
│ ├── core/ # Cœur du framework
|
|
11
|
-
│ │ ├── components/ # Composants UI et fonctionnels
|
|
12
|
-
│ │ ├── mixins/ # Mixins réutilisables
|
|
13
|
-
│ │ ├── utils/ # Utilitaires
|
|
14
|
-
│ │ └── _types/ # Types TypeScript
|
|
15
|
-
│ ├── docs/ # Composants de documentation
|
|
16
|
-
│ └── index.ts # Point d'entrée principal
|
|
17
|
-
├── docs/ # Documentation générée
|
|
18
|
-
├── dist/ # Fichiers de build
|
|
19
|
-
├── public/ # Assets publics
|
|
20
|
-
├── mcp-server/ # 🆕 Serveur MCP pour l'IA
|
|
21
|
-
│ ├── concorde-mcp-server.js # Serveur Node.js
|
|
22
|
-
│ ├── concorde-mcp-server.py # Serveur Python
|
|
23
|
-
│ ├── test-mcp.js # Tests Node.js
|
|
24
|
-
│ ├── test-mcp.py # Tests Python
|
|
25
|
-
│ ├── install-mcp-nodejs.sh # Installation Node.js
|
|
26
|
-
│ ├── install-mcp.sh # Installation Python
|
|
27
|
-
│ ├── cursor-mcp-config*.json # Configurations Cursor
|
|
28
|
-
│ └── README.md # Documentation MCP
|
|
29
|
-
├── package.json # Configuration npm
|
|
30
|
-
├── vite.config.mts # Configuration Vite
|
|
31
|
-
└── tailwind.config.js # Configuration Tailwind
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## 🚀 Serveur MCP pour l'IA
|
|
35
|
-
|
|
36
|
-
Le dossier `mcp-server/` contient un serveur MCP (Model Context Protocol) qui permet à l'IA de Cursor d'accéder facilement à toute la documentation et au code de Concorde.
|
|
37
|
-
|
|
38
|
-
### Installation rapide
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Version Node.js (recommandée)
|
|
42
|
-
cd mcp-server
|
|
43
|
-
./install-mcp-nodejs.sh
|
|
44
|
-
|
|
45
|
-
# Version Python
|
|
46
|
-
cd mcp-server
|
|
47
|
-
./install-mcp.sh
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Configuration Cursor
|
|
51
|
-
|
|
52
|
-
```json
|
|
53
|
-
{
|
|
54
|
-
"mcpServers": {
|
|
55
|
-
"concorde": {
|
|
56
|
-
"command": "node",
|
|
57
|
-
"args": ["/usr2/sites/concorde/mcp-server/concorde-mcp-server.js"],
|
|
58
|
-
"env": {
|
|
59
|
-
"NODE_PATH": "/usr2/sites/concorde"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Fonctionnalités
|
|
67
|
-
|
|
68
|
-
- **35+ composants** analysés automatiquement
|
|
69
|
-
- **6 outils MCP** pour interagir avec l'IA
|
|
70
|
-
- **Documentation complète** de chaque composant
|
|
71
|
-
- **Génération de code** HTML automatique
|
|
72
|
-
- **Exemples d'utilisation** extraits de la documentation
|
|
73
|
-
|
|
74
|
-
## 🎨 Composants disponibles
|
|
75
|
-
|
|
76
|
-
### Composants UI (20)
|
|
77
|
-
- **Formulaires** : input, select, checkbox, radio, textarea
|
|
78
|
-
- **Navigation** : button, link, menu
|
|
79
|
-
- **Feedback** : alert, badge, modal, toast, tooltip
|
|
80
|
-
- **Layout** : card, table, divider, group
|
|
81
|
-
- **Media** : icon, image, loader, progress
|
|
82
|
-
|
|
83
|
-
### Composants fonctionnels (15)
|
|
84
|
-
- **Data** : fetch, list, queue, subscriber, value
|
|
85
|
-
- **Navigation** : router, redirect, states
|
|
86
|
-
- **Logic** : if, submit, mix, translation
|
|
87
|
-
- **Advanced** : sdui (Server Driven UI)
|
|
88
|
-
|
|
89
|
-
## 🛠️ Développement
|
|
90
|
-
|
|
91
|
-
### Installation
|
|
92
|
-
```bash
|
|
93
|
-
npm install
|
|
94
|
-
# ou
|
|
95
|
-
yarn install
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Développement
|
|
99
|
-
```bash
|
|
100
|
-
npm run dev
|
|
101
|
-
# ou
|
|
102
|
-
yarn dev
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Build
|
|
106
|
-
```bash
|
|
107
|
-
npm run build
|
|
108
|
-
# ou
|
|
109
|
-
yarn build
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Tests
|
|
113
|
-
```bash
|
|
114
|
-
npm test
|
|
115
|
-
# ou
|
|
116
|
-
yarn test
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## 📚 Documentation
|
|
120
|
-
|
|
121
|
-
- **[Documentation principale](docs/)** - Documentation générée
|
|
122
|
-
- **[Serveur MCP](mcp-server/README.md)** - Documentation du serveur MCP
|
|
123
|
-
- **[Composants](src/core/components/)** - Code source des composants
|
|
124
|
-
- **[Exemples](docs/)** - Exemples d'utilisation
|
|
125
|
-
|
|
126
|
-
## 🎯 Utilisation avec l'IA
|
|
127
|
-
|
|
128
|
-
Une fois le serveur MCP configuré, vous pouvez demander à l'IA de Cursor :
|
|
129
|
-
|
|
130
|
-
- "Crée un bouton Concorde avec une icône"
|
|
131
|
-
- "Génère un formulaire de connexion"
|
|
132
|
-
- "Montre-moi comment utiliser le composant modal"
|
|
133
|
-
- "Quelles sont les propriétés du composant input ?"
|
|
134
|
-
- "Crée une liste avec des données dynamiques"
|
|
135
|
-
|
|
136
|
-
## 🔧 Technologies
|
|
137
|
-
|
|
138
|
-
- **Lit Element** - Web Components
|
|
139
|
-
- **TypeScript** - Langage principal
|
|
140
|
-
- **Tailwind CSS** - Styles utilitaires
|
|
141
|
-
- **Vite** - Build tool
|
|
142
|
-
- **Vitest** - Tests
|
|
143
|
-
- **MCP** - Protocole pour l'IA
|
|
144
|
-
|
|
145
|
-
## 📄 Licence
|
|
146
|
-
|
|
147
|
-
MIT License - Voir le fichier [LICENSE](LICENSE) pour plus de détails.
|
|
148
|
-
|
|
149
|
-
## 🤝 Contribution
|
|
150
|
-
|
|
151
|
-
Pour contribuer au projet :
|
|
152
|
-
|
|
153
|
-
1. Fork le projet
|
|
154
|
-
2. Créer une branche feature
|
|
155
|
-
3. Modifier le code
|
|
156
|
-
4. Tester avec `npm test`
|
|
157
|
-
5. Créer une Pull Request
|
|
158
|
-
|
|
159
|
-
## 📞 Support
|
|
160
|
-
|
|
161
|
-
- **Issues** : [GitHub Issues](https://github.com/supersoniks/concorde/issues)
|
|
162
|
-
- **Documentation** : [docs/](docs/)
|
|
163
|
-
- **Serveur MCP** : [mcp-server/README.md](mcp-server/README.md)
|
package/php/get-challenge.php
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
/* *
|
|
3
|
-
* Call get-challenge on auto-hosted latcha service at https://altcha.supersoniks.org
|
|
4
|
-
* */
|
|
5
|
-
|
|
6
|
-
// Autoriser toutes les origines
|
|
7
|
-
header("Access-Control-Allow-Origin: *");
|
|
8
|
-
|
|
9
|
-
// Autoriser les méthodes HTTP spécifiques
|
|
10
|
-
header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
|
|
11
|
-
|
|
12
|
-
// Autoriser certains en-têtes spécifiques
|
|
13
|
-
header("Access-Control-Allow-Headers: Content-Type, Authorization");
|
|
14
|
-
|
|
15
|
-
// Si la méthode est OPTIONS, terminer la requête ici
|
|
16
|
-
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
|
|
17
|
-
http_response_code(200);
|
|
18
|
-
exit();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function getChallenge($key){
|
|
22
|
-
$maxNumber=20000;
|
|
23
|
-
$queryString = $params = [
|
|
24
|
-
'key' => $key,
|
|
25
|
-
'maxNumber' => $maxNumber
|
|
26
|
-
];
|
|
27
|
-
// Générer la chaîne de requête
|
|
28
|
-
$queryString = http_build_query($params);
|
|
29
|
-
$url = "https://altcha.supersoniks.org/get-challenge?key=".$queryString;
|
|
30
|
-
$response = file_get_contents($url);
|
|
31
|
-
return $response;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
echo getChallenge($_GET['key']);
|
package/php/some-service.php
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
/* *
|
|
3
|
-
* Call verify-solution on auto-hosted latcha service at https://altcha.supersoniks.org
|
|
4
|
-
* */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// Autoriser toutes les origines
|
|
8
|
-
header("Access-Control-Allow-Origin: *");
|
|
9
|
-
|
|
10
|
-
// Autoriser les méthodes HTTP spécifiques
|
|
11
|
-
header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
|
|
12
|
-
|
|
13
|
-
// Autoriser certains en-têtes spécifiques
|
|
14
|
-
header("Access-Control-Allow-Headers: Content-Type, Authorization, x-altcha-spam-filter");
|
|
15
|
-
|
|
16
|
-
// Si la méthode est OPTIONS, terminer la requête ici
|
|
17
|
-
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
|
|
18
|
-
http_response_code(200);
|
|
19
|
-
exit();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function verifySolution($key, $solution){
|
|
23
|
-
$queryString = $params = [
|
|
24
|
-
'key' => $key,
|
|
25
|
-
'altcha' => $solution
|
|
26
|
-
];
|
|
27
|
-
// Générer la chaîne de requête
|
|
28
|
-
$queryString = http_build_query($params);
|
|
29
|
-
$url = "https://altcha.supersoniks.org/verify-solution?".$queryString;
|
|
30
|
-
$response = file_get_contents($url);
|
|
31
|
-
return $response;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Get json posted data
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
// Get the posted data
|
|
39
|
-
|
|
40
|
-
$data = json_decode(file_get_contents("php://input"));
|
|
41
|
-
|
|
42
|
-
echo verifySolution($data->captchakey, $data->captchatoken);
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import "./modal";
|
|
2
|
-
import "./modal-actions";
|
|
3
|
-
import "./modal-close";
|
|
4
|
-
import "./modal-content";
|
|
5
|
-
import "./modal-subtitle";
|
|
6
|
-
import "./modal-title";
|
|
7
|
-
import "../button/button";
|
|
8
|
-
import { html } from "lit";
|
|
9
|
-
|
|
10
|
-
// More on default export: https://storybook.js.org/docs/web-components/writing-stories/introduction#default-export
|
|
11
|
-
export default {
|
|
12
|
-
component: "sonic-modal",
|
|
13
|
-
title: "core/components/ui/Modal",
|
|
14
|
-
argTypes: {
|
|
15
|
-
styles: { table: { category: "Internals or others" } },
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const Template: any = ({}: any) => {
|
|
20
|
-
return html`
|
|
21
|
-
<sonic-button
|
|
22
|
-
onclick="
|
|
23
|
-
document.getElementById('modalExample').show()
|
|
24
|
-
"
|
|
25
|
-
>
|
|
26
|
-
Simple modal
|
|
27
|
-
</sonic-button>
|
|
28
|
-
|
|
29
|
-
<sonic-modal id="modalExample">
|
|
30
|
-
<sonic-modal-close></sonic-modal-close>
|
|
31
|
-
<sonic-modal-title
|
|
32
|
-
>Lorem ipsum dolor sit amet <sonic-badge type="danger" size="sm">+33</sonic-badge></sonic-modal-title
|
|
33
|
-
>
|
|
34
|
-
<sonic-modal-subtitle>Donec sed vestibulum augue.</sonic-modal-subtitle>
|
|
35
|
-
<sonic-modal-content>
|
|
36
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget quam eu mi luctus faucibus.
|
|
37
|
-
</sonic-modal-content>
|
|
38
|
-
<sonic-modal-actions formDataProvider="youpla">
|
|
39
|
-
<sonic-button FormCheckable hideModal="false" minWidth="8rem" value="true" name="click">
|
|
40
|
-
Click don't close
|
|
41
|
-
</sonic-button>
|
|
42
|
-
<sonic-button minWidth="8rem" type="success">Confirmer</sonic-button>
|
|
43
|
-
</sonic-modal-actions>
|
|
44
|
-
</sonic-modal>
|
|
45
|
-
`;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const Example = Template.bind({});
|
|
49
|
-
|
|
50
|
-
const modalLongSize: any = () => {
|
|
51
|
-
return html`
|
|
52
|
-
<sonic-button onclick="document.getElementById('modalText').show()"> Long text </sonic-button>
|
|
53
|
-
<sonic-modal align="left" id="modalText">
|
|
54
|
-
<sonic-modal-close></sonic-modal-close>
|
|
55
|
-
<sonic-modal-title>Infos et tarifs </sonic-modal-title>
|
|
56
|
-
<sonic-modal-content>
|
|
57
|
-
<div class="prose">
|
|
58
|
-
<p>
|
|
59
|
-
<strong>Horaires d’ouverture </strong><br />
|
|
60
|
-
Du mercredi au samedi de 13h30 à 19h et le dimanche de 13h30 à 18h<br />
|
|
61
|
-
+ horaires spécifiques pour événements ou festivals
|
|
62
|
-
</p>
|
|
63
|
-
<p>
|
|
64
|
-
<strong> Billetterie <br /></strong>
|
|
65
|
-
La participation à certains événements et activités est soumise à un système de billetterie avec achats ou
|
|
66
|
-
réservations disponibles en ligne ou au guichet. <strong><br /></strong>
|
|
67
|
-
</p>
|
|
68
|
-
<p>
|
|
69
|
-
Les tarifs (Tarif plein / Tarif Réduit / Tarif Spécifique) sont indiqués pour chaque événement et peuvent
|
|
70
|
-
varier selon la nature de l’événement. Les tarifs sont identiques en ligne et au guichet. Il est néanmoins
|
|
71
|
-
conseillé de réserver les billets en avance pour s’assurer une place.
|
|
72
|
-
</p>
|
|
73
|
-
<p>
|
|
74
|
-
L’accès au Skatepark, Fablab et Halle C sont soumis à adhésions. Les adhésions sont gratuites et
|
|
75
|
-
nominatives. Elle donnent accès aux espaces dans la limite des places disponibles.
|
|
76
|
-
</p>
|
|
77
|
-
<p>
|
|
78
|
-
<strong>+ d’infos <br /></strong>billetterie@laconditionpublique.com <br />+33 (0)328334833
|
|
79
|
-
</p>
|
|
80
|
-
<br />
|
|
81
|
-
<p>
|
|
82
|
-
<strong>Accès <br /></strong>14, place Faidherbe <br />59100 Roubaix <br />Métro / Tram : Arrêt
|
|
83
|
-
Eurotéléport, Ligne 2 <br />Bus / V’Lille : Arrêt Condition Publique
|
|
84
|
-
</p>
|
|
85
|
-
<p>
|
|
86
|
-
Accès handicapés : nous contacter avant votre venue au 03 28 33 48 33 ou par mail
|
|
87
|
-
billetterie@laconditionpublique.com
|
|
88
|
-
</p>
|
|
89
|
-
</div>
|
|
90
|
-
</sonic-modal-content>
|
|
91
|
-
</sonic-modal>
|
|
92
|
-
`;
|
|
93
|
-
};
|
|
94
|
-
export const LongTextScrollable = modalLongSize.bind({});
|
|
95
|
-
|
|
96
|
-
const modalForceAction: any = () => {
|
|
97
|
-
return html`
|
|
98
|
-
<sonic-button onclick="document.getElementById('force').show()"> Action obligatoire </sonic-button>
|
|
99
|
-
<sonic-modal .hideOnOverlayClick=${false} .hideOnEscape=${false} id="force">
|
|
100
|
-
<sonic-modal-title>Voulez-vous accepter les cookies ? </sonic-modal-title>
|
|
101
|
-
<sonic-modal-content>
|
|
102
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget quam eu mi luctus faucibus.
|
|
103
|
-
</sonic-modal-content>
|
|
104
|
-
<sonic-modal-actions formDataProvider="youpla">
|
|
105
|
-
<sonic-button> Nope </sonic-button>
|
|
106
|
-
<sonic-button minWidth="8rem" type="success">Carrément</sonic-button>
|
|
107
|
-
</sonic-modal-actions>
|
|
108
|
-
</sonic-modal>
|
|
109
|
-
`;
|
|
110
|
-
};
|
|
111
|
-
export const ForceAction = modalForceAction.bind({});
|
|
112
|
-
|
|
113
|
-
const customWidthModal: any = () => {
|
|
114
|
-
return html`
|
|
115
|
-
<sonic-button onclick="document.getElementById('CustomWidth').show()"> Custom width </sonic-button>
|
|
116
|
-
<sonic-modal maxHeight="50vh" maxWidth="90vw" width="100%" height="100%" id="CustomWidth">
|
|
117
|
-
<sonic-modal-close></sonic-modal-close>
|
|
118
|
-
<sonic-image
|
|
119
|
-
cover
|
|
120
|
-
objectPosition="center 20%"
|
|
121
|
-
src="https://thegoodlife.thegoodhub.com/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
122
|
-
></sonic-image>
|
|
123
|
-
</sonic-modal>
|
|
124
|
-
`;
|
|
125
|
-
};
|
|
126
|
-
export const customWidth = customWidthModal.bind({});
|
|
127
|
-
|
|
128
|
-
const modalFullscreen: any = () => {
|
|
129
|
-
return html`
|
|
130
|
-
<sonic-button onclick="document.getElementById('Fullscreen').show()"> Fullscreen </sonic-button>
|
|
131
|
-
<sonic-modal fullscreen id="Fullscreen">
|
|
132
|
-
<sonic-modal-close></sonic-modal-close>
|
|
133
|
-
<sonic-image
|
|
134
|
-
cover
|
|
135
|
-
src="https://thegoodlife.thegoodhub.com/wp-content/uploads/sites/2/2022/03/compagnies-aeriennes-nostalgie-coeur-insert-03-dr.jpg"
|
|
136
|
-
></sonic-image>
|
|
137
|
-
</sonic-modal>
|
|
138
|
-
`;
|
|
139
|
-
};
|
|
140
|
-
export const Fullscreen = modalFullscreen.bind({});
|