@rindo/core 4.20.0 → 4.22.0

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/cli/index.cjs +1 -1
  2. package/cli/index.js +1 -1
  3. package/cli/package.json +1 -1
  4. package/compiler/lib.es2023.array.d.ts +5 -5
  5. package/compiler/package.json +1 -1
  6. package/compiler/rindo.js +3534 -273
  7. package/dev-server/client/index.js +1 -1
  8. package/dev-server/client/package.json +1 -1
  9. package/dev-server/connector.html +2 -2
  10. package/dev-server/index.js +1 -1
  11. package/dev-server/package.json +1 -1
  12. package/dev-server/server-process.js +2 -2
  13. package/internal/app-data/index.cjs +1 -1
  14. package/internal/app-data/index.js +1 -1
  15. package/internal/app-data/package.json +1 -1
  16. package/internal/client/index.js +25 -13
  17. package/internal/client/package.json +1 -1
  18. package/internal/client/patch-browser.js +1 -1
  19. package/internal/hydrate/index.js +27 -19
  20. package/internal/hydrate/package.json +1 -1
  21. package/internal/hydrate/runner.d.ts +10 -4
  22. package/internal/hydrate/runner.js +389 -239
  23. package/internal/package.json +1 -1
  24. package/internal/rindo-public-compiler.d.ts +43 -4
  25. package/internal/rindo-public-runtime.d.ts +4 -0
  26. package/internal/testing/index.js +24 -12
  27. package/internal/testing/package.json +1 -1
  28. package/mock-doc/index.cjs +32 -1
  29. package/mock-doc/index.d.ts +8 -0
  30. package/mock-doc/index.js +32 -1
  31. package/mock-doc/package.json +1 -1
  32. package/package.json +9 -7
  33. package/screenshot/index.js +1 -1
  34. package/screenshot/package.json +1 -1
  35. package/screenshot/pixel-match.js +1 -1
  36. package/sys/node/index.js +47 -45
  37. package/sys/node/package.json +1 -1
  38. package/sys/node/worker.js +2 -2
  39. package/testing/index.js +39 -1
  40. package/testing/package.json +1 -1
@@ -3,6 +3,7 @@
3
3
  import { Readable } from 'node:stream';
4
4
 
5
5
  export declare function createWindowFromHtml(templateHtml: string, uniqueId: string): any;
6
+ export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
6
7
  export interface HydrateDocumentOptions {
7
8
  /**
8
9
  * Build ID that will be added to `<html data-rindo-build="BUILD_ID">`. By default
@@ -137,10 +138,10 @@ export interface SerializeDocumentOptions extends HydrateDocumentOptions {
137
138
  */
138
139
  removeHtmlComments?: boolean;
139
140
  /**
140
- * If set to `false` Rindo will ignore the fact that a component has a `shadow: true`
141
- * flag and serializes it as a scoped component. If set to `true` the component will
142
- * be rendered within a Declarative Shadow DOM.
143
- * @default false
141
+ * If set to `true` the component will be rendered within a Declarative Shadow DOM.
142
+ * If set to `false` Rindo will ignore the contents of the shadow root and render the
143
+ * element as given in provided template.
144
+ * @default true
144
145
  */
145
146
  serializeShadowRoot?: boolean;
146
147
  /**
@@ -149,6 +150,11 @@ export interface SerializeDocumentOptions extends HydrateDocumentOptions {
149
150
  * @default true
150
151
  */
151
152
  fullDocument?: boolean;
153
+ /**
154
+ * Style modes to render the component in.
155
+ * @see https://rindojs.web.app/docs/styling#style-modes
156
+ */
157
+ modes?: ResolutionHandler[];
152
158
  }
153
159
  export interface HydrateFactoryOptions extends SerializeDocumentOptions {
154
160
  serializeToHtml: boolean;