@supersoniks/concorde 4.4.2 → 4.5.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 (137) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-core.bundle.js +670 -584
  3. package/concorde-core.es.js +9729 -7104
  4. package/dist/concorde-core.bundle.js +670 -584
  5. package/dist/concorde-core.es.js +9729 -7104
  6. package/package.json +7 -4
  7. package/src/core/components/functional/fetch/fetch.md +0 -0
  8. package/src/core/components/ui/_css/scroll.ts +0 -0
  9. package/src/core/components/ui/_css/size.ts +0 -0
  10. package/src/core/components/ui/alert/alert.ts +0 -0
  11. package/src/core/components/ui/button/button.ts +0 -0
  12. package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
  13. package/src/core/components/ui/divider/divider.ts +0 -0
  14. package/src/core/components/ui/menu/menu.md +0 -0
  15. package/src/core/components/ui/modal/modal-close.ts +0 -0
  16. package/src/core/components/ui/modal/modal-utils.ts +46 -0
  17. package/src/core/components/ui/modal/modal.md +0 -0
  18. package/src/core/components/ui/modal/modal.ts +33 -8
  19. package/src/core/components/ui/table/table-caption.ts +0 -0
  20. package/src/core/decorators/subscriber/onAssign.ts +4 -4
  21. package/src/core/utils/dataProviderKey.spec.ts +8 -0
  22. package/src/core/utils/dataProviderKey.ts +31 -12
  23. package/src/core/utils/route.ts +0 -0
  24. package/src/docs/code.ts +0 -0
  25. package/src/tsconfig.json +9 -0
  26. package/src/tsconfig.tsbuildinfo +1 -1
  27. package/vite/config.js +52 -34
  28. package/vite.config.mts +14 -12
  29. package/docs/assets/index-CW8cIYT9.js +0 -4949
  30. package/docs/assets/index-DZtxIZCW.css +0 -1
  31. package/docs/css/docs.css +0 -0
  32. package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
  33. package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
  34. package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
  35. package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
  36. package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
  37. package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
  38. package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
  39. package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  40. package/docs/fonts/ClashGrotesk-Light.eot +0 -0
  41. package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
  42. package/docs/fonts/ClashGrotesk-Light.woff +0 -0
  43. package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
  44. package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
  45. package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
  46. package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
  47. package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
  48. package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
  49. package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
  50. package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
  51. package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
  52. package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
  53. package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
  54. package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
  55. package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  56. package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
  57. package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
  58. package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
  59. package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
  60. package/docs/img/concorde-icon.svg +0 -5
  61. package/docs/img/concorde-logo.svg +0 -1
  62. package/docs/img/concorde.png +0 -0
  63. package/docs/img/concorde_def.png +0 -0
  64. package/docs/img/concorde_seuil.png.webp +0 -0
  65. package/docs/img/concorde_seuil_invert.png +0 -0
  66. package/docs/img/paul_metrand.jpg +0 -0
  67. package/docs/img/paul_metrand_xs.jpg +0 -0
  68. package/docs/index.html +0 -93
  69. package/docs/src/core/components/functional/date/date.md +0 -290
  70. package/docs/src/core/components/functional/fetch/fetch.md +0 -123
  71. package/docs/src/core/components/functional/if/if.md +0 -16
  72. package/docs/src/core/components/functional/list/list.md +0 -199
  73. package/docs/src/core/components/functional/mix/mix.md +0 -41
  74. package/docs/src/core/components/functional/queue/queue.md +0 -87
  75. package/docs/src/core/components/functional/router/router.md +0 -129
  76. package/docs/src/core/components/functional/sdui/default-library.json +0 -108
  77. package/docs/src/core/components/functional/sdui/example.json +0 -99
  78. package/docs/src/core/components/functional/sdui/sdui.md +0 -356
  79. package/docs/src/core/components/functional/states/states.md +0 -87
  80. package/docs/src/core/components/functional/submit/submit.md +0 -83
  81. package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
  82. package/docs/src/core/components/functional/value/value.md +0 -35
  83. package/docs/src/core/components/ui/alert/alert.md +0 -121
  84. package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
  85. package/docs/src/core/components/ui/badge/badge.md +0 -127
  86. package/docs/src/core/components/ui/button/button.md +0 -182
  87. package/docs/src/core/components/ui/captcha/captcha.md +0 -24
  88. package/docs/src/core/components/ui/card/card.md +0 -97
  89. package/docs/src/core/components/ui/divider/divider.md +0 -35
  90. package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -104
  91. package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -129
  92. package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -77
  93. package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -44
  94. package/docs/src/core/components/ui/form/input/input.md +0 -167
  95. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -131
  96. package/docs/src/core/components/ui/form/radio/radio.md +0 -84
  97. package/docs/src/core/components/ui/form/select/select.md +0 -97
  98. package/docs/src/core/components/ui/form/switch/switch.md +0 -84
  99. package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
  100. package/docs/src/core/components/ui/group/group.md +0 -75
  101. package/docs/src/core/components/ui/icon/icon.md +0 -125
  102. package/docs/src/core/components/ui/icon/icons.json +0 -1
  103. package/docs/src/core/components/ui/image/image.md +0 -107
  104. package/docs/src/core/components/ui/link/link.md +0 -43
  105. package/docs/src/core/components/ui/loader/loader.md +0 -67
  106. package/docs/src/core/components/ui/menu/menu.md +0 -329
  107. package/docs/src/core/components/ui/modal/modal.md +0 -119
  108. package/docs/src/core/components/ui/pop/pop.md +0 -96
  109. package/docs/src/core/components/ui/progress/progress.md +0 -63
  110. package/docs/src/core/components/ui/table/table.md +0 -455
  111. package/docs/src/core/components/ui/toast/toast.md +0 -166
  112. package/docs/src/core/components/ui/tooltip/tooltip.md +0 -82
  113. package/docs/src/docs/_core-concept/overview.md +0 -57
  114. package/docs/src/docs/_core-concept/subscriber.md +0 -76
  115. package/docs/src/docs/_decorators/ancestor-attribute.md +0 -78
  116. package/docs/src/docs/_decorators/auto-subscribe.md +0 -199
  117. package/docs/src/docs/_decorators/bind.md +0 -164
  118. package/docs/src/docs/_decorators/get.md +0 -65
  119. package/docs/src/docs/_decorators/on-assign.md +0 -336
  120. package/docs/src/docs/_decorators/publish.md +0 -54
  121. package/docs/src/docs/_decorators/subscribe.md +0 -36
  122. package/docs/src/docs/_decorators/wait-for-ancestors.md +0 -160
  123. package/docs/src/docs/_getting-started/concorde-outside.md +0 -143
  124. package/docs/src/docs/_getting-started/create-a-component.md +0 -137
  125. package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -174
  126. package/docs/src/docs/_getting-started/pubsub.md +0 -150
  127. package/docs/src/docs/_getting-started/start.md +0 -39
  128. package/docs/src/docs/_getting-started/theming.md +0 -91
  129. package/docs/src/docs/_misc/dataProviderKey.md +0 -135
  130. package/docs/src/docs/_misc/endpoint.md +0 -42
  131. package/docs/src/docs/_misc/templates-demo.md +0 -19
  132. package/docs/src/docs/search/docs-search.json +0 -5197
  133. package/docs/src/tag-list.json +0 -1
  134. package/docs/src/tsconfig-model.json +0 -23
  135. package/docs/src/tsconfig.json +0 -987
  136. package/docs/svg/regular/plane.svg +0 -1
  137. package/docs/svg/solid/plane.svg +0 -1
@@ -1,91 +0,0 @@
1
- # Adding styles
2
-
3
- ## Normal Behavior
4
-
5
- No style crosses the shadow root of a component, except for inheritable properties (which have the "inherit" property possible) and CSS variables.
6
- Properties integrated via a "[slot](https://developer.mozilla.org/en/docs/Web/HTML/Element/slot)" remain stylizable in a conventional way.
7
-
8
- - **During creation / from the inside:**
9
- - We edit the [static "styles" property of the lit component](https://lit.dev/docs/components/styles/), which can also reference shared and dynamic styles.
10
- These styles are scoped and do not impact the outside.
11
- - We use CSS variables as the value of properties intended to be customized from the outside.
12
- For each variable, we define a default value to have a simple but consistent base style.
13
- - We only rewrite inheritable properties with hard values if they are truly specific to the component.
14
- - The `<style>` tag as a direct child can be used as a last resort, especially if there is a need for particularly dynamic customization. Performance is reduced.
15
- - **During use / from the outside:**
16
- We define values for **inheritable CSS properties** (e.g., font-\_, color...) using tools like Tailwind.
17
- We modify the value of **CSS variables** used by the component.
18
-
19
- ## Choosing Style Presets via Reactive Properties:
20
-
21
- The declaration of reactive properties is useful for selecting a particular configuration that mostly affects a set of properties.
22
-
23
- For example, a `size` property (xs, sm, md, xl) will affect margins, font, line heights to align them with the corresponding CSS vars, which can be customized using the methods mentioned earlier if necessary.
24
-
25
- It is recommended to use the `{reflect: true}` property for reactive properties that have an associated style on the `:host()`. For example: `:host([type='primary']){...}`
26
-
27
- ☢️ **Caution:** Passing class names via reactive properties / HTML attributes of the component should be avoided as it can quickly lead to difficult-to-manage situations.
28
-
29
- #### CSS "display" Property
30
-
31
- By default, the display property is `inline`.
32
- Therefore, be careful to define it according to the needs, as one might mistakenly expect it to be `block` as with a regular `<div>`.
33
-
34
- ☢️ **Caution:** Defining the `display` property as `contents` may seem attractive at first, but:
35
-
36
- - It almost always leads to the creation of wrappers to style the content (instead of using `:host`).
37
- - It is no longer possible to directly add classes to the component or style it from the outside.
38
- Ultimately, the amount of code to write increases significantly.
39
-
40
- ## TAILWIND Functional Classes
41
-
42
- [tailwind](https://tailwindcss.com/) has been integrated into Concorde and is available in scoped components (with Shadow DOM).
43
- To use it, you need to import the following:
44
-
45
- <sonic-code language="javascript">
46
- <template>
47
- import { tailwind } from "@supersoniks/concorde/la-billetterie/ui/theme/theme";
48
- </template>
49
- </sonic-code>
50
-
51
- Then include the `tailwind` style in the static `styles` property of the component:
52
-
53
- <sonic-code language="javascript">
54
- <template>
55
- static styles = [tailwind];
56
- </template>
57
- </sonic-code>
58
-
59
- Finally, use it in the HTML within the render function:
60
-
61
- <sonic-code language="html">
62
- <template>
63
- <p class="m-2">A paragraph with margin</p>
64
- </template>
65
- </sonic-code>
66
-
67
- The colors from Concorde's theme are referenced in Tailwind's theme.
68
-
69
- ## Operation without Shadow DOM
70
-
71
- ### Usefulness
72
-
73
- This operation is particularly useful when it comes to **adding behavior to a simple existing element**.
74
- It may also become necessary to establish **compatibility with a traditional JS library**.
75
-
76
- For example, with a text input:
77
-
78
- - Trigger automatic data or filter update when typing text.
79
- - Automatic formatting.
80
- - Constraints that cannot be handled by native methods.
81
-
82
- ### Consequences
83
-
84
- If there is no shadow DOM (see the **noShadowDom** property of **Subscriber**):
85
-
86
- - Styling using the static "styles" property of the lit component will not be applied.
87
- - The element and its content can be styled in a traditional manner.
88
-
89
- For example, the components `queue`, `list`, and `fetch` do not have a shadow DOM.
90
-
91
- ℹ️ **Note:** Specifically in this case, it may be useful to set the `display` property to `contents`.
@@ -1,135 +0,0 @@
1
- # DataProviderKey
2
-
3
- The `DataProviderKey<T>` utility provides type-safe navigation through composite data structures. Each property or index access extends the path, and the final key can be retrieved via `toString()` or the `path` property.
4
-
5
- For a **single HTTP path string** (no dot-syntax), see [Endpoint](#docs/_misc/endpoint.md/endpoint).
6
-
7
- ## Principle
8
-
9
- `DataProviderKey` uses a Proxy to intercept property access and build a cumulative path string. TypeScript infers the nested type at each level, so `myKey.items[0]` is correctly typed as `DataProviderKey<Item>` when `items` is `Item[]`.
10
-
11
- ## Usage
12
-
13
- ### Import
14
-
15
- <sonic-code language="typescript">
16
- <template>
17
- import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
18
- </template>
19
- </sonic-code>
20
-
21
- ### Basic example
22
-
23
- <sonic-code language="typescript">
24
- <template>
25
- type Item = { id: string; name: string };
26
- //
27
- type Data = {
28
- items: Item[];
29
- count: number;
30
- };
31
- //
32
- const myKey = new DataProviderKey&lt;Data&gt;("data").items[0];
33
- // Equivalent to: new DataProviderKey&lt;Item&gt;("data.items.0")
34
- myKey.toString(); // "data.items.0"
35
- myKey.path; // same value
36
- // myKey is typed as DataProviderKey&lt;Item&gt;
37
- </template>
38
- </sonic-code>
39
-
40
- ### Object property access
41
-
42
- <sonic-code language="typescript">
43
- <template>
44
- const key = new DataProviderKey&lt;Data&gt;("data");
45
- const countKey = key.count;
46
- countKey.path; // "data.count"
47
- countKey.toString(); // "data.count"
48
- </template>
49
- </sonic-code>
50
-
51
- ### Array index access
52
-
53
- <sonic-code language="typescript">
54
- <template>
55
- const itemsKey = new DataProviderKey&lt;Data&gt;("data").items;
56
- itemsKey.path; // "data.items"
57
- // itemsKey is DataProviderKey&lt;Item[]&gt;
58
- //
59
- const firstItem = itemsKey[0];
60
- firstItem.path; // "data.items.0"
61
- // firstItem is DataProviderKey&lt;Item&gt;
62
- </template>
63
- </sonic-code>
64
-
65
- ### Dynamic paths
66
-
67
- Use placeholders `${prop}` or `{$prop}` in the path string. The path is resolved at runtime from the component's properties. The type remains declarative:
68
-
69
- <sonic-code language="typescript">
70
- <template>
71
- type User = { name: string; email: string };
72
- //
73
- // Path resolved from component.userIndex at runtime
74
- @subscribe(new DataProviderKey&lt;User&gt;("users.${userIndex}"))
75
- @state()
76
- user: User | null = null;
77
- </template>
78
- </sonic-code>
79
-
80
- ## Path retrieval
81
-
82
- The final path is built by concatenating each accessed property with a dot:
83
-
84
- - `new DataProviderKey<T>("base")` → `"base"`
85
- - `key.prop` → `"base.prop"`
86
- - `key.items[0]` → `"base.items.0"`
87
-
88
- Use `toString()` or `path` to get the full path string:
89
-
90
- <sonic-code language="typescript">
91
- <template>
92
- const key = new DataProviderKey&lt;Data&gt;("data").count;
93
- const pathString = key.toString(); // "data.count"
94
- const pathProp = key.path; // "data.count"
95
- </template>
96
- </sonic-code>
97
-
98
- ## Use cases
99
-
100
- - **Type-safe bindings**: paths for `@bind`, `@subscribe`, `@publish`
101
- - **Dynamic paths**: reusable keys with `${...}` placeholders
102
- - **Form fields**: form data paths with compile-time checking
103
-
104
- ## Integration with @subscribe and @publish
105
-
106
- Use `DataProviderKey` with `@subscribe` (read-only) or `@publish` (write-only). The decorated property **must** match the key’s value type:
107
-
108
- <sonic-code language="typescript">
109
- <template>
110
- import { subscribe } from "@supersoniks/concorde/decorators";
111
- import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
112
- //
113
- type FormData = { email: string };
114
- const formKey = new DataProviderKey&lt;FormData&gt;("formData");
115
- //
116
- @customElement("user-form")
117
- export class UserForm extends LitElement {
118
- @subscribe(formKey.email)
119
- @state()
120
- email = "";
121
- //
122
- render() {
123
- return html`&lt;input .value=${this.email} @input=${(e) => this.email = (e.target as HTMLInputElement).value}&gt;`;
124
- }
125
- }
126
- </template>
127
- </sonic-code>
128
-
129
- Both decorators support dynamic paths: `"base.${prop}"` in the constructor. A wrong property type (e.g. `number` for `DataProviderKey<string>`) is a TypeScript error.
130
-
131
- ## Notes
132
-
133
- - Function properties are excluded from navigation (no `key.method()` chaining)
134
- - Primitives have no navigable properties
135
- - The `path` property and `toString()` are equivalent for retrieving the key
@@ -1,42 +0,0 @@
1
- # Endpoint
2
-
3
- `Endpoint<T, U>` describes a single HTTP path (or a path accepted by `API.get`) and carries the expected response type `T`. Unlike [DataProviderKey](#docs/_misc/dataProviderKey.md/dataProviderKey), there is no dot-navigation: the path is one string.
4
-
5
- The optional second generic `U` (default `any`) describes host properties used to resolve dynamic segments in the path (`${…}` / `{$…}`), for example with the [@get](#docs/_decorators/get.md/get) decorator.
6
-
7
- ## Import
8
-
9
- <sonic-code language="typescript">
10
- <template>
11
- import { Endpoint } from "@supersoniks/concorde/utils/endpoint";
12
- </template>
13
- </sonic-code>
14
-
15
- ## Construction
16
-
17
- <sonic-code language="typescript">
18
- <template>
19
- const users = new Endpoint&lt;User[]&gt;("users?limit=10");
20
- users.path; // "users?limit=10"
21
- //
22
- const one = new Endpoint&lt;User, { userId: string }&gt;("users/${userId}");
23
- // `userId` on the host class is observed when used with @get
24
- </template>
25
- </sonic-code>
26
-
27
- ## Normalization
28
-
29
- `Endpoint.normalizePath` trims the string, rejects an empty path, strips leading slashes for paths relative to `serviceURL`, collapses duplicate slashes, and validates absolute `http(s)://` URLs.
30
-
31
- ## Publisher key for payloads
32
-
33
- `getDataProviderKey()` returns a typed publisher key whose `path` matches the endpoint path (payload typing follows `ApiGetResult` for this endpoint). Useful when pairing `@get` with `@publish` / `@subscribe` (see [@get](#docs/_decorators/get.md/get)).
34
-
35
- ## Data-provider paths
36
-
37
- `Endpoint.looksLikeDataProviderPath(path)` returns true for strings shaped like `dataProvider(id)…`, which `API.get` can resolve without HTTP.
38
-
39
- ## See also
40
-
41
- - [@get](#docs/_decorators/get.md/get) — decorator that uses `Endpoint<T>`
42
- - [DataProviderKey](#docs/_misc/dataProviderKey.md/dataProviderKey) — typed publisher paths (dot notation)
@@ -1,19 +0,0 @@
1
- # Templates Demo
2
-
3
- Some test/demos
4
-
5
- ## States
6
-
7
- <sonic-states-demo></sonic-states-demo>
8
-
9
- ## Queue
10
-
11
-
12
- <sonic-queue-demo></sonic-queue-demo>
13
-
14
- ## Ressources liées
15
-
16
- - [Router](#core/components/functional/router/router.md/router)
17
- - [States](#core/components/functional/states/states.md/states)
18
- - [Queue](#core/components/functional/queue/queue.md/queue)
19
-