tungsten 0.3.12 → 0.3.14

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 (32) hide show
  1. package/dist/.build-complete +1 -1
  2. package/dist/FrameworkConfig.d.ts +0 -1
  3. package/dist/FrameworkConfig.d.ts.map +1 -1
  4. package/dist/ReqRes.d.ts +163 -1
  5. package/dist/ReqRes.d.ts.map +1 -1
  6. package/dist/ReqRes.js +5 -0
  7. package/dist/api/Request.d.ts +1 -1
  8. package/dist/api/Request.d.ts.map +1 -1
  9. package/dist/api/Response.d.ts +1 -1
  10. package/dist/api/Response.d.ts.map +1 -1
  11. package/dist/helpers/getFetchCompatibleHeaders.d.ts +1 -1
  12. package/dist/helpers/getFetchCompatibleHeaders.d.ts.map +1 -1
  13. package/dist/hydrate/hydrate.d.ts +2 -0
  14. package/dist/hydrate/hydrate.d.ts.map +1 -1
  15. package/dist/hydrate/hydrate.js +25 -28
  16. package/dist/markOptionSelected.d.ts +15 -0
  17. package/dist/markOptionSelected.d.ts.map +1 -0
  18. package/dist/markOptionSelected.js +31 -0
  19. package/dist/postcssPlugins/TransformCssNames.d.ts.map +1 -1
  20. package/dist/postcssPlugins/TransformCssNames.js +12 -2
  21. package/dist/postcssPlugins/scopeAnimationValue.d.ts.map +1 -1
  22. package/dist/postcssPlugins/scopeAnimationValue.js +6 -0
  23. package/dist/postcssPlugins/unwrapIgnoreMarker.d.ts +2 -0
  24. package/dist/postcssPlugins/unwrapIgnoreMarker.d.ts.map +1 -0
  25. package/dist/postcssPlugins/unwrapIgnoreMarker.js +9 -0
  26. package/dist/render/componentNodeToRenderingTree.js +1 -0
  27. package/dist/render/processRenderingNodeHtml.d.ts.map +1 -1
  28. package/dist/render/processRenderingNodeHtml.js +3 -30
  29. package/dist/testing/hydrateTestApp.js +2 -5
  30. package/dist/update/integrateUpdateVdom.d.ts.map +1 -1
  31. package/dist/update/integrateUpdateVdom.js +8 -11
  32. package/package.json +2 -1
@@ -1 +1 @@
1
- 1786886454316
1
+ 1788167068365
@@ -32,7 +32,6 @@ export type FrameworkConfigBase = {
32
32
  suppressEnvOverwriteWarnings?: boolean;
33
33
  warnOnFrameworkChange?: boolean;
34
34
  hmr?: boolean | 'reload';
35
- csr?: boolean;
36
35
  };
37
36
  export type FrameworkConfigWithRootComponent = FrameworkConfigBase & {
38
37
  useRootComponent?: true;
@@ -1 +1 @@
1
- {"version":3,"file":"FrameworkConfig.d.ts","sourceRoot":"","sources":["../src/FrameworkConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,KAAK,WAAW,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC5C,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACtC,KAAK,kBAAkB,GAAG,MAAM,CAAA;AAEhC,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;AAenF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA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,cAAc,EAAE,cAAc,CAAA;IAC9B,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC,aAAa,EAAE,UAAU,GAAG,SAAS,CAAA;IACrC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC9B,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAClC,sBAAsB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1C,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IAGf,qBAAqB,EAAE,OAAO,CAAA;IAC9B,6BAA6B,EAAE,OAAO,CAAA;IACtC,4BAA4B,EAAE,OAAO,CAAA;IAErC,qBAAqB,EAAE,OAAO,CAAA;IAC9B,GAAG,EAAE,OAAO,GAAG,QAAQ,CAAA;IACvB,GAAG,EAAE,OAAO,CAAA;CACf,CAAA;AAED,MAAM,MAAM,wCAAwC,GAC9C,2BAA2B,GAAG;IAC5B,gBAAgB,EAAE,IAAI,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACxB,CAAA;AAEL,MAAM,MAAM,2CAA2C,GACjD,2BAA2B,GAAG;IAC5B,gBAAgB,EAAE,KAAK,CAAA;CAC1B,CAAA;AAEL,MAAM,MAAM,uBAAuB,GAC7B,wCAAwC,GAAG,2CAA2C,CAAA;AAI5F,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAC3C,2BAA2B,EAC3B,YAAY,GAAG,gBAAgB,CAC9B,CAAA"}
package/dist/ReqRes.d.ts CHANGED
@@ -1,4 +1,166 @@
1
- import { Request, Response } from 'express';
1
+ declare global {
2
+ namespace Express {
3
+ interface Request {
4
+ }
5
+ interface Response {
6
+ }
7
+ }
8
+ }
9
+ export interface IncomingHeaders {
10
+ 'set-cookie'?: string[] | undefined;
11
+ [name: string]: string | string[] | undefined;
12
+ }
13
+ export interface OutgoingHeaders {
14
+ [name: string]: number | string | string[] | undefined;
15
+ }
16
+ export interface ParsedQuery {
17
+ [key: string]: undefined | string | ParsedQuery | (string | ParsedQuery)[];
18
+ }
19
+ export interface MediaType {
20
+ value: string;
21
+ quality: number;
22
+ type: string;
23
+ subtype: string;
24
+ }
25
+ export interface CookieOptions {
26
+ maxAge?: number | undefined;
27
+ signed?: boolean | undefined;
28
+ expires?: Date | undefined;
29
+ httpOnly?: boolean | undefined;
30
+ path?: string | undefined;
31
+ domain?: string | undefined;
32
+ secure?: boolean | undefined;
33
+ encode?: ((val: string) => string) | undefined;
34
+ sameSite?: boolean | 'lax' | 'strict' | 'none' | undefined;
35
+ priority?: 'low' | 'medium' | 'high';
36
+ partitioned?: boolean | undefined;
37
+ }
38
+ export interface RangeParserRange {
39
+ start: number;
40
+ end: number;
41
+ }
42
+ export interface RangeParserRanges extends Array<RangeParserRange> {
43
+ type: string;
44
+ }
45
+ export type RangeParserResult = -1 | -2;
46
+ export type Errback = (err: Error) => void;
47
+ export type NextFunction = (err?: any) => void;
48
+ export interface Request extends Express.Request {
49
+ get(name: 'set-cookie'): string[] | undefined;
50
+ get(name: string): string | undefined;
51
+ header(name: 'set-cookie'): string[] | undefined;
52
+ header(name: string): string | undefined;
53
+ accepts(): string[];
54
+ accepts(type: string): string | false;
55
+ accepts(type: string[]): string | false;
56
+ accepts(...type: string[]): string | false;
57
+ acceptsCharsets(): string[];
58
+ acceptsCharsets(charset: string): string | false;
59
+ acceptsCharsets(charset: string[]): string | false;
60
+ acceptsCharsets(...charset: string[]): string | false;
61
+ acceptsEncodings(): string[];
62
+ acceptsEncodings(encoding: string): string | false;
63
+ acceptsEncodings(encoding: string[]): string | false;
64
+ acceptsEncodings(...encoding: string[]): string | false;
65
+ acceptsLanguages(): string[];
66
+ acceptsLanguages(lang: string): string | false;
67
+ acceptsLanguages(lang: string[]): string | false;
68
+ acceptsLanguages(...lang: string[]): string | false;
69
+ range(size: number, options?: {
70
+ combine?: boolean | undefined;
71
+ }): RangeParserRanges | RangeParserResult | undefined;
72
+ is(type: string | string[]): string | false | null;
73
+ accepted: MediaType[];
74
+ body: any;
75
+ cookies: any;
76
+ signedCookies: any;
77
+ params: Record<string, string>;
78
+ query: ParsedQuery;
79
+ readonly protocol: string;
80
+ readonly secure: boolean;
81
+ readonly ip: string | undefined;
82
+ readonly ips: string[];
83
+ readonly subdomains: string[];
84
+ readonly path: string;
85
+ readonly hostname: string;
86
+ readonly host: string;
87
+ readonly fresh: boolean;
88
+ readonly stale: boolean;
89
+ readonly xhr: boolean;
90
+ originalUrl: string;
91
+ baseUrl: string;
92
+ app: unknown;
93
+ route: any;
94
+ res?: Response | undefined;
95
+ next?: NextFunction | undefined;
96
+ headers: IncomingHeaders;
97
+ rawHeaders: string[];
98
+ httpVersion: string;
99
+ httpVersionMajor: number;
100
+ httpVersionMinor: number;
101
+ trailers: Record<string, string | undefined>;
102
+ rawTrailers: string[];
103
+ method: string;
104
+ url: string;
105
+ complete: boolean;
106
+ socket: unknown;
107
+ destroy(error?: Error): void;
108
+ setEncoding(encoding: string): this;
109
+ on(event: string, listener: (...args: any[]) => void): this;
110
+ once(event: string, listener: (...args: any[]) => void): this;
111
+ off(event: string, listener: (...args: any[]) => void): this;
112
+ }
113
+ export interface Response extends Express.Response {
114
+ status(code: number): this;
115
+ sendStatus(code: number): this;
116
+ links(links: any): this;
117
+ send(body?: any): this;
118
+ json(body?: any): this;
119
+ jsonp(body?: any): this;
120
+ sendFile(path: string, fn?: Errback): void;
121
+ sendFile(path: string, options: any, fn?: Errback): void;
122
+ download(path: string, fn?: Errback): void;
123
+ download(path: string, filename: string, fn?: Errback): void;
124
+ contentType(type: string): this;
125
+ type(type: string): this;
126
+ format(obj: any): this;
127
+ attachment(filename?: string): this;
128
+ set(field: any): this;
129
+ set(field: string, value?: string | string[]): this;
130
+ header(field: any): this;
131
+ header(field: string, value?: string | string[]): this;
132
+ get(field: string): string | undefined;
133
+ clearCookie(name: string, options?: CookieOptions): this;
134
+ cookie(name: string, val: any, options?: CookieOptions): this;
135
+ location(url: string): this;
136
+ redirect(url: string): void;
137
+ redirect(status: number, url: string): void;
138
+ render(view: string, options?: object, callback?: (err: Error, html: string) => void): void;
139
+ render(view: string, callback?: (err: Error, html: string) => void): void;
140
+ vary(field: string): this;
141
+ append(field: string, value?: string[] | string): this;
142
+ locals: Record<string, any>;
143
+ charset: string;
144
+ app: unknown;
145
+ req: Request;
146
+ statusCode: number;
147
+ statusMessage: string;
148
+ headersSent: boolean;
149
+ setHeader(name: string, value: number | string | readonly string[]): this;
150
+ getHeader(name: string): number | string | string[] | undefined;
151
+ getHeaders(): OutgoingHeaders;
152
+ getHeaderNames(): string[];
153
+ hasHeader(name: string): boolean;
154
+ removeHeader(name: string): void;
155
+ write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
156
+ end(chunk?: any, callback?: () => void): this;
157
+ writeHead(statusCode: number, headers?: OutgoingHeaders | (number | string | string[])[]): this;
158
+ flushHeaders(): void;
159
+ socket: unknown;
160
+ on(event: string, listener: (...args: any[]) => void): this;
161
+ once(event: string, listener: (...args: any[]) => void): this;
162
+ off(event: string, listener: (...args: any[]) => void): this;
163
+ }
2
164
  export type ReqRes = {
3
165
  req: Request;
4
166
  res: Response;
@@ -1 +1 @@
1
- {"version":3,"file":"ReqRes.d.ts","sourceRoot":"","sources":["../src/ReqRes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAE3C,MAAM,MAAM,MAAM,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAA;CAAE,CAAA;AACpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,IAAI,CAAA"}
1
+ {"version":3,"file":"ReqRes.d.ts","sourceRoot":"","sources":["../src/ReqRes.ts"],"names":[],"mappings":"AAUA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO,CAAC;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AK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI,CAAA;IAC7D,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI,CAAA;CAC/D;AAED,MAAM,MAAM,MAAM,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAA;CAAE,CAAA;AACpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,IAAI,CAAA"}
package/dist/ReqRes.js CHANGED
@@ -1 +1,6 @@
1
+ // In-house structural mirror of express's Request/Response.
2
+ // Deliberately importless: importing from 'express' pulls @types/node ambients into every
3
+ // public type that reaches Instance/registerGlobalData, i.e. most of indexInner.
4
+ // Runtime objects are still express's - these types only have to be a supertype of them.
5
+ // Conformance against the real express types is asserted in ReqRes.sxyt.ts.
1
6
  export {};
@@ -1,2 +1,2 @@
1
- export type { Request } from 'express';
1
+ export type { Request } from '../ReqRes.js';
2
2
  //# sourceMappingURL=Request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Request.d.ts","sourceRoot":"","sources":["../../src/api/Request.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"Request.d.ts","sourceRoot":"","sources":["../../src/api/Request.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
@@ -1,2 +1,2 @@
1
- export type { Response } from 'express';
1
+ export type { Response } from '../ReqRes.js';
2
2
  //# sourceMappingURL=Response.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Response.d.ts","sourceRoot":"","sources":["../../src/api/Response.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"Response.d.ts","sourceRoot":"","sources":["../../src/api/Response.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA"}
@@ -1,3 +1,3 @@
1
- import type { Request } from 'express';
1
+ import type { Request } from '../ReqRes.js';
2
2
  export declare function getFetchCompatibleHeaders(req: Request): Headers;
3
3
  //# sourceMappingURL=getFetchCompatibleHeaders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFetchCompatibleHeaders.d.ts","sourceRoot":"","sources":["../../src/helpers/getFetchCompatibleHeaders.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAKtC,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAY/D"}
1
+ {"version":3,"file":"getFetchCompatibleHeaders.d.ts","sourceRoot":"","sources":["../../src/helpers/getFetchCompatibleHeaders.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAK3C,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAY/D"}
@@ -8,7 +8,9 @@ import '../hmr/applyHmrModule.js';
8
8
  export type HydrateMeta = {
9
9
  insideForm: boolean;
10
10
  mismatches: TaggedAttributeMismatch[];
11
+ selectValue: unknown;
11
12
  };
13
+ export declare function makeDefaultHydrateMeta(): HydrateMeta;
12
14
  export declare function hydrate(appRoutes: AppRoutes, RootComponent: TungstenBaseComponentType | null, instanceConfig: InstanceConfig): Promise<void>;
13
15
  export declare function hydrateRootComponent<ComponentType extends TungstenBaseComponentType<any, any>>(instance: Instance, RootComponent: ComponentType, domPointer: DomPointer, meta: HydrateMeta, props?: InstanceType<ComponentType>['props'], // eslint-disable-line no-type-assertion/no-type-assertion -- default only reached when Props is empty, same as the hardcoded {} this replaces
14
16
  routeParams?: Record<string, string>, routeData?: unknown): Promise<InstanceType<ComponentType>>;
@@ -1 +1 @@
1
- {"version":3,"file":"hydrate.d.ts","sourceRoot":"","sources":["../../src/hydrate/hydrate.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAQnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAoBxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAM7C,OAAO,EAAE,yBAAyB,EAAoD,MAAM,mBAAmB,CAAA;AAE/G,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAmBlD,OAAO,EAC4B,KAAK,uBAAuB,EAC9D,MAAM,oCAAoC,CAAA;AAQ3C,OAAO,0BAA0B,CAAA;AASjC,MAAM,MAAM,WAAW,GAAG;IACtB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,uBAAuB,EAAE,CAAA;CACxC,CAAA;AAKD,wBAAsB,OAAO,CACzB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,yBAAyB,GAAG,IAAI,EAC/C,cAAc,EAAE,cAAc,iBA2DjC;AAyBD,wBAAsB,oBAAoB,CACtC,aAAa,SAAS,yBAAyB,CAAC,GAAG,EAAE,GAAG,CAAC,EAEzD,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,WAAW,EAIjB,KAAK,GAAE,YAAY,CAAC,aAAa,CAAC,CAAC,OAAO,CAA8C,EAAE,8IAA8I;AACxO,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,SAAS,CAAC,EAAE,OAAO,GACpB,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CA6DtC"}
1
+ {"version":3,"file":"hydrate.d.ts","sourceRoot":"","sources":["../../src/hydrate/hydrate.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAQnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAoBxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAM7C,OAAO,EAAE,yBAAyB,EAAoD,MAAM,mBAAmB,CAAA;AAE/G,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAoBlD,OAAO,EAC4B,KAAK,uBAAuB,EAC9D,MAAM,oCAAoC,CAAA;AAQ3C,OAAO,0BAA0B,CAAA;AASjC,MAAM,MAAM,WAAW,GAAG;IACtB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,uBAAuB,EAAE,CAAA;IAGrC,WAAW,EAAE,OAAO,CAAA;CACvB,CAAA;AACD,wBAAgB,sBAAsB,IAAI,WAAW,CAEpD;AAID,wBAAsB,OAAO,CACzB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,yBAAyB,GAAG,IAAI,EAC/C,cAAc,EAAE,cAAc,iBA2DjC;AAyBD,wBAAsB,oBAAoB,CACtC,aAAa,SAAS,yBAAyB,CAAC,GAAG,EAAE,GAAG,CAAC,EAEzD,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,WAAW,EAIjB,KAAK,GAAE,YAAY,CAAC,aAAa,CAAC,CAAC,OAAO,CAA8C,EAAE,8IAA8I;AACxO,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,SAAS,CAAC,EAAE,OAAO,GACpB,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CA6DtC"}
@@ -29,6 +29,7 @@ import { MatchedRoute } from "../routing/MatchedRoute.js";
29
29
  import { isDev } from "../isDev.js";
30
30
  import { warn } from "../appOutput.js";
31
31
  import { reconcileHydratedAttributes } from "./reconcileHydratedAttributes.js";
32
+ import { markOptionSelected } from "../markOptionSelected.js";
32
33
  import { renderHydrationMismatchBanner } from "./renderHydrationMismatchBanner.js";
33
34
  import { setCurrentInstance } from "../hmr/instanceRegistry.js";
34
35
  // side-effect only: pulls applyHmrModule.js (and its clean, non-dynamic-import dependencies)
@@ -43,12 +44,13 @@ function debug(...texts) {
43
44
  //console.log(...texts)
44
45
  //console.log(getStackTrace().split('\n')[2])
45
46
  }
46
- function makeDefaultHydrateMeta() {
47
+ export function makeDefaultHydrateMeta() {
47
48
  return {
48
49
  insideForm: false,
49
- mismatches: []
50
+ mismatches: [],
51
+ selectValue: undefined
50
52
  };
51
- } // can we opto this out in production?
53
+ }
52
54
  export async function hydrate(appRoutes, RootComponent, instanceConfig) {
53
55
  debug('hydrate start');
54
56
  //console.log('hydration global data ', __tungsten_global_data__)
@@ -502,31 +504,6 @@ async function hydrateNodeSingle(node, parentElement, domPointer, instance, meta
502
504
  debug('hydarating atts');
503
505
  hydrateAttributes(node, domNode, meta);
504
506
  //!!! node.domElement = domNode
505
- const props = node[$props];
506
- if (node[$type] === 'textarea') {
507
- if ('value' in props) {
508
- if (props.children !== undefined && !(Array.isArray(node[$props].children) && node[$props].children.length === 0)) {
509
- if (isDev) {
510
- warn('textarea element has both value attribute and children, children will be ignored.');
511
- }
512
- }
513
- //if (props.value !== undefined)
514
- props.children = props.value;
515
- delete props.value;
516
- }
517
- }
518
- /// !!! TODO
519
- // This code relies on the select node being the immediate parent.
520
- // This may not be the case (there could be a wrapping component), and could be improved
521
- // if (node[$type] === 'option') {
522
- // if (ContentNodeIsHtml(parentNode) && parentNode[$type] === 'select') {
523
- // if (parentNode[$props].value !== undefined) {
524
- // if (props.value === parentNode[$props].value) {
525
- // props.selected = 'selected'
526
- // }
527
- // }
528
- // }
529
- // }
530
507
  // look up any refs
531
508
  //const props = node[$props]
532
509
  //const ref = node[$props].ref
@@ -535,6 +512,9 @@ async function hydrateNodeSingle(node, parentElement, domPointer, instance, meta
535
512
  }
536
513
  debug('valid children', validChildren(node[$props].children), node[$props].children);
537
514
  const children = node[$props].children;
515
+ // the value is only known once hydrateAttributes() has resolved any bind above
516
+ const outerSelectValue = meta.selectValue;
517
+ if (node[$type] === 'select') meta.selectValue = node[$props].value;
538
518
  let renderedChildren = $contentNull;
539
519
  if (node[$type] === 'body' && instance.config.csr) {
540
520
  // CSR: body shipped empty on purpose, nothing to hydrate against - create fresh.
@@ -556,6 +536,7 @@ async function hydrateNodeSingle(node, parentElement, domPointer, instance, meta
556
536
  const childDomPointer = new DomPointer(domNode);
557
537
  renderedChildren = await hydrateNode(children, parentElement, childDomPointer, instance, meta);
558
538
  }
539
+ meta.selectValue = outerSelectValue;
559
540
  if (node[$type] === 'select' && node[$props].value !== undefined && node[$props].value !== null) {
560
541
  domNode.value = String(node[$props].value);
561
542
  }
@@ -599,6 +580,22 @@ async function hydrateNodeComponent(node, parentElement, domPointer, instance, m
599
580
  function hydrateAttributes(node, domNode, meta) {
600
581
  // handle bind attributes and merge together event handlers
601
582
  processAttributes(node);
583
+ // The two prop rewrites the server does before it writes any markup (processRenderingNodeHtml).
584
+ // They have to happen here, after bind has supplied a value and before the reconcile below,
585
+ // or what the client renders differs from the served markup and reads as a mismatch.
586
+ if (ContentNodeElementIsHtml(node)) {
587
+ const props = node[$props];
588
+ if (node[$type] === 'textarea' && 'value' in props) {
589
+ if (props.children !== undefined && !(Array.isArray(props.children) && props.children.length === 0)) {
590
+ if (isDev) {
591
+ warn('textarea element has both value attribute and children, children will be ignored.');
592
+ }
593
+ }
594
+ props.children = props.value;
595
+ delete props.value;
596
+ }
597
+ if (node[$type] === 'option') markOptionSelected(props, meta.selectValue);
598
+ }
602
599
  // Bring the server's attributes into line with what this render produced.
603
600
  // Runs in production as well as development: leaving a known-wrong value in
604
601
  // place is not better in production, it is only quieter. Only genuine
@@ -0,0 +1,15 @@
1
+ type OptionProps = {
2
+ children?: unknown;
3
+ value?: unknown;
4
+ selected?: unknown;
5
+ };
6
+ /**
7
+ * Marks an <option> as the one its enclosing <select> has chosen, given that select's value.
8
+ *
9
+ * Every renderer needs this, not just the server: markup is the only way the server can express
10
+ * a selection, so the client's content tree has to carry the same prop or hydration reconciles
11
+ * the server's `selected` attribute away as an attribute the client never rendered.
12
+ */
13
+ export declare function markOptionSelected(props: OptionProps, selectValue: unknown): void;
14
+ export {};
15
+ //# sourceMappingURL=markOptionSelected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markOptionSelected.d.ts","sourceRoot":"","sources":["../src/markOptionSelected.ts"],"names":[],"mappings":"AAGA,KAAK,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AA6B9E;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI,CAQjF"}
@@ -0,0 +1,31 @@
1
+ import { $props, $type } from "./contentNodeSymbols.js";
2
+ // An option with no value attribute is identified by its label text, so gather it the way the
3
+ // browser does: script content and raw HTML are not label text, anything else contributes.
4
+ function collectOptionText(node) {
5
+ if (node === undefined || node === null || typeof node === 'boolean') return '';
6
+ if (Array.isArray(node)) {
7
+ let text = '';
8
+ for (const child of node) text += collectOptionText(child);
9
+ return text;
10
+ }
11
+ if (typeof node === 'string' || typeof node === 'number') return String(node);
12
+ if (typeof node !== 'object') return '';
13
+ const element = node; // eslint-disable-line no-type-assertion/no-type-assertion -- content and rendering nodes are both { [$type], [$props] }
14
+ if (element[$type] === 'script' || typeof element[$props]?.__html === 'string') return '';
15
+ return collectOptionText(element[$props]?.children);
16
+ }
17
+ function normalizeOptionText(text) {
18
+ return text.replace(/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g, '').replace(/[\t\n\f\r ]+/g, ' ');
19
+ }
20
+ /**
21
+ * Marks an <option> as the one its enclosing <select> has chosen, given that select's value.
22
+ *
23
+ * Every renderer needs this, not just the server: markup is the only way the server can express
24
+ * a selection, so the client's content tree has to carry the same prop or hydration reconciles
25
+ * the server's `selected` attribute away as an attribute the client never rendered.
26
+ */
27
+ export function markOptionSelected(props, selectValue) {
28
+ if (selectValue === undefined || selectValue === null) return;
29
+ const optionValue = props.value !== undefined && props.value !== null ? String(props.value) : normalizeOptionText(collectOptionText(props.children));
30
+ if (optionValue === String(selectValue)) props.selected = 'selected';
31
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"TransformCssNames.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/TransformCssNames.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAoE9C,KAAK,IAAI,GAAG;IACR,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACrB,CAAA;AAYD,eAAO,MAAM,iBAAiB;WAAU,IAAI;;mBAezB,IAAI;;;CAqJtB,CAAA"}
1
+ {"version":3,"file":"TransformCssNames.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/TransformCssNames.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAqE9C,KAAK,IAAI,GAAG;IACR,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACrB,CAAA;AAaD,eAAO,MAAM,iBAAiB;WAAU,IAAI;;mBAezB,IAAI;;;CA4KtB,CAAA"}
@@ -11,6 +11,7 @@ extract classes -> localise
11
11
  */
12
12
  import { parseSelectorsRich } from "./parseSelectorsRich.js";
13
13
  import { scopeAnimationValue } from "./scopeAnimationValue.js";
14
+ import { unwrapIgnoreMarker } from "./unwrapIgnoreMarker.js";
14
15
  import { componentBumpClass } from "../componentClassName.js";
15
16
  import { throwError, warnMessage } from "../throwError.js";
16
17
  import { warn } from "../output.js";
@@ -61,8 +62,9 @@ function separatePseudo(selector) {
61
62
  // matches @keyframes and its vendor prefixed forms, e.g. @-webkit-keyframes
62
63
  // at-rule and property names are case insensitive in css, hence the i flag on both
63
64
  const keyframesAtRule = /(^|-)keyframes$/i;
64
- // the declarations that name an animation, e.g. `animation: fade 2s` / `animation-name: fade`
65
- const animationDecl = /^animation(-name)?$/i;
65
+ // the declarations that name an animation, e.g. `animation: fade 2s` / `animation-name: fade`,
66
+ // and their vendor prefixed forms, e.g. `-webkit-animation`
67
+ const animationDecl = /^(-\w+-)?animation(-name)?$/i;
66
68
  const bump = '.' + componentBumpClass + '.' + componentBumpClass + '.' + componentBumpClass;
67
69
  export const TransformCssNames = opts => {
68
70
  //console.log('TransformCssNames')
@@ -85,10 +87,18 @@ export const TransformCssNames = opts => {
85
87
  // keyframe offsets (0%, from, to) are Rules within the at-rule, but they are positions
86
88
  // rather than selectors, so they are collected here and passed over by the selector walk
87
89
  const keyframeOffsets = new Set();
90
+ // a custom property registration applies to the whole document, so it cannot be scoped
91
+ // to a module at all - it belongs in a global stylesheet, which skips this plugin
92
+ root.walkAtRules('property', atRule => {
93
+ throwError('TransformCssNames', `@property ${atRule.params.trim()} in module '${moduleName}' registers a custom` + ` property for the whole document, so it cannot come from a component` + ` stylesheet. Move it to a global stylesheet` + (sourceFile === undefined ? '' : ` (${sourceFile})`));
94
+ });
88
95
  // the animation name is scoped like a class, so two modules can each define `fade`
89
96
  root.walkAtRules(keyframesAtRule, atRule => {
90
97
  const name = atRule.params.trim();
91
98
  if (name === '') return;
99
+ // the marker only says where a name is used, it cannot define one - keyframes a
100
+ // module defines are always its own
101
+ if (unwrapIgnoreMarker(name) !== undefined) throwError('TransformCssNames', `@${atRule.name} ${name} in module '${moduleName}' is marked to be left global,` + ` but keyframes a module defines are always scoped to it. Drop the marker, or` + ` define the animation in a global stylesheet and reference it from here` + (sourceFile === undefined ? '' : ` (${sourceFile})`));
92
102
  const newName = transformClass(escapeModuleName(moduleName), name);
93
103
  names.keyframes[name] = newName;
94
104
  atRule.params = newName;
@@ -1 +1 @@
1
- {"version":3,"file":"scopeAnimationValue.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/scopeAnimationValue.ts"],"names":[],"mappings":"AA2BA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAW9F"}
1
+ {"version":3,"file":"scopeAnimationValue.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/scopeAnimationValue.ts"],"names":[],"mappings":"AA4BA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAkB9F"}
@@ -1,4 +1,5 @@
1
1
  import { splitCssValue } from "./splitCssValue.js";
2
+ import { unwrapIgnoreMarker } from "./unwrapIgnoreMarker.js";
2
3
  // every keyword the animation shorthand accepts. A word that is none of these, and does not
3
4
  // read as a time, a number or a function, is the animation name
4
5
  const animationKeywords = new Set(['none', 'forwards', 'backwards', 'both',
@@ -30,6 +31,11 @@ export function scopeAnimationValue(value, scopeName) {
30
31
  named = false;
31
32
  return part;
32
33
  }
34
+ const ignored = unwrapIgnoreMarker(part);
35
+ if (ignored !== undefined) {
36
+ named = true;
37
+ return ignored;
38
+ }
33
39
  if (named || !isAnimationName(part)) return part;
34
40
  named = true;
35
41
  return scopeName(part);
@@ -0,0 +1,2 @@
1
+ export declare function unwrapIgnoreMarker(word: string): string | undefined;
2
+ //# sourceMappingURL=unwrapIgnoreMarker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unwrapIgnoreMarker.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/unwrapIgnoreMarker.ts"],"names":[],"mappings":"AAMA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAInE"}
@@ -0,0 +1,9 @@
1
+ // The value side of the `:i()` selector marker, naming something to leave global. A colon cannot
2
+ // open a declaration value in css, sass or scss alike, so the marker drops it here
3
+ const ignoreMarker = /^(?:i|ignore)\((.*)\)$/i;
4
+ // returns the marked name, or undefined when the word carries no marker
5
+ export function unwrapIgnoreMarker(word) {
6
+ const marked = ignoreMarker.exec(word);
7
+ if (marked === null) return undefined;
8
+ return (marked[1] ?? '').trim();
9
+ }
@@ -17,6 +17,7 @@ export async function componentNodeToRenderingTree(componentNode, parentComponen
17
17
  } else {
18
18
  location = render.location;
19
19
  if (typeof render === 'object' && 'placeholder') {
20
+ // not sure what this is
20
21
  placeholder = render.placeholder;
21
22
  }
22
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"processRenderingNodeHtml.d.ts","sourceRoot":"","sources":["../../src/render/processRenderingNodeHtml.ts"],"names":[],"mappings":"AAEA,OAAO,EACiB,KAAK,iBAAiB,EAE7C,MAAM,qBAAqB,CAAA;AAqC5B,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,IAAI,QAwDhE"}
1
+ {"version":3,"file":"processRenderingNodeHtml.d.ts","sourceRoot":"","sources":["../../src/render/processRenderingNodeHtml.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAQ5D,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,IAAI,QA+ChE"}
@@ -1,29 +1,9 @@
1
- import { RenderingNodeElementIsComponent, RenderingNodeElementIsHtml } from "../RenderingNode.js";
2
1
  import { bindableHtmlElements } from "../components/bindable/bindableHtmlElements.js";
3
2
  import { cliWarn } from "../cliOutput.js";
4
3
  import { debug } from "./debug.js";
5
4
  import { $props, $type } from "../contentNodeSymbols.js";
6
5
  import { checkedValueToBoolean } from "../checkedValueToBoolean.js";
7
- function collectOptionText(node) {
8
- if (node === undefined || node === null || node === false || node === true) return '';
9
- if (Array.isArray(node)) {
10
- let text = '';
11
- for (const child of node) text += collectOptionText(child);
12
- return text;
13
- }
14
- if (typeof node === 'string' || typeof node === 'number') return String(node);
15
- if (RenderingNodeElementIsHtml(node)) {
16
- if (node[$type] === 'script' || typeof node[$props].__html === 'string') return '';
17
- return collectOptionText(node[$props].children);
18
- }
19
- if (RenderingNodeElementIsComponent(node)) {
20
- return collectOptionText(node[$props].children);
21
- }
22
- return '';
23
- }
24
- function normalizeOptionText(text) {
25
- return text.replace(/^[\t\n\f\r ]+|[\t\n\f\r ]+$/g, '').replace(/[\t\n\f\r ]+/g, ' ');
26
- }
6
+ import { markOptionSelected } from "../markOptionSelected.js";
27
7
  export function processRenderingNodeHtml(node, lastSelect) {
28
8
  const props = node[$props];
29
9
  debug('processRenderingNodeHtml', node);
@@ -57,15 +37,8 @@ export function processRenderingNodeHtml(node, lastSelect) {
57
37
  delete props.value;
58
38
  }
59
39
  }
60
- if (node[$type] === 'option') {
61
- if (lastSelect !== null) {
62
- if (lastSelect[$props].value !== undefined && lastSelect[$props].value !== null) {
63
- const optionValue = props.value !== undefined && props.value !== null ? String(props.value) : normalizeOptionText(collectOptionText(props.children));
64
- if (optionValue === String(lastSelect[$props].value)) {
65
- props.selected = 'selected';
66
- }
67
- }
68
- }
40
+ if (node[$type] === 'option' && lastSelect !== null) {
41
+ markOptionSelected(props, lastSelect[$props].value);
69
42
  }
70
43
  debug('post processRenderingNodeHtml', node);
71
44
  }
@@ -8,7 +8,7 @@ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a),
8
8
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
9
9
  import { $props, $type } from "../contentNodeSymbols.js";
10
10
  import { Instance } from "../Instance/Instance.js";
11
- import { hydrateRootComponent } from "../hydrate/hydrate.js";
11
+ import { hydrateRootComponent, makeDefaultHydrateMeta } from "../hydrate/hydrate.js";
12
12
  import { contentTreeToRenderingTree } from "../render/contentTreeToRenderingTree.js";
13
13
  import { renderingNodeToHtml } from "../render/renderingTreeToHtml.js";
14
14
  import { initStores } from "../Servers/initStores.js";
@@ -221,10 +221,7 @@ export async function hydrateTestApp(RootComponent, ...args) {
221
221
  const store = override.registration.getStore(instance.stores);
222
222
  await override.initialize(store);
223
223
  }
224
- const meta = {
225
- insideForm: false,
226
- mismatches: []
227
- };
224
+ const meta = makeDefaultHydrateMeta();
228
225
  const domPointer = new DomPointer(container, 0);
229
226
  const component = await hydrateRootComponent(instance, RootComponent, domPointer, meta, clientProps, options?.routeParams, options?.routeData);
230
227
  return new HydrateTestAppImplementation(document, container, component, instance, scheduler, ownsContainer, html, meta.mismatches);
@@ -1 +1 @@
1
- {"version":3,"file":"integrateUpdateVdom.d.ts","sourceRoot":"","sources":["../../src/update/integrateUpdateVdom.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EACH,WAAW,EAAwC,eAAe,EAElE,uBAAuB,EAG1B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAIlD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGjD,OAAO,EAAE,YAAY,EAAgB,MAAM,eAAe,CAAA;AAE1D,OAAO,EACe,mBAAmB,EAIT,4BAA4B,EAI3D,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAYhD,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AACzF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,C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AAC,CAqD7C;AAED,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,mBAAmB,CAAC,yBAAyB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAC/D,IAAI,CAON;AA8QD,wBAAsB,wBAAwB,CAC1C,UAAU,EAAE,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,GAC5E,OAAO,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAiC3C;AAED,wBAAsB,qBAAqB,CACvC,UAAU,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,yBAAyB,CAAC,GAAG,EAAE,GAAG,CAAC,GAC1F,OAAO,CAAC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAyCjD"}
@@ -17,6 +17,7 @@ import { $key, $props, $routeData, $routeParams, $type } from "../contentNodeSym
17
17
  import { printComponentNamesInSource } from "../render/printComponentNameInSource.js";
18
18
  import { bindableHtmlElementsNumber, bindableHtmlElementsString } from "../components/bindable/bindableHtmlElements.js";
19
19
  import { checkedValueToBoolean } from "../checkedValueToBoolean.js";
20
+ import { markOptionSelected } from "../markOptionSelected.js";
20
21
  import { innerHtmlFromProps } from "../innerHtmlFromProps.js";
21
22
  import { validChildren } from "../validChildren.js";
22
23
  import { setCurrentComponent } from 'tungsten/hooks/setCurrentComponent.js';
@@ -798,17 +799,13 @@ export function processHtmlNode(node, parentNode) {
798
799
  delete props.value;
799
800
  }
800
801
  }
801
- // This code relies on the select node being the immediate parent.
802
- // This may not be the case (there could be a wrapping component), and could be improved
803
- // if (node[$type] === 'option') {
804
- // if (ContentNodeIsHtml(parentNode) && parentNode[$type] === 'select') {
805
- // if (parentNode[$props].value !== undefined) {
806
- // if (props.value === parentNode[$props].value) {
807
- // props.selected = 'selected'
808
- // }
809
- // }
810
- // }
811
- // }
802
+ // Marked here as well as on the server so a client render of a select produces the same
803
+ // markup a served one does.
804
+ // !!! TODO: this relies on the select being the immediate parent, which it need not be
805
+ // (a component can render the options). Hydration carries the value on its meta instead.
806
+ if (node[$type] === 'option' && ContentNodeIsHtml(parentNode) && parentNode[$type] === 'select') {
807
+ markOptionSelected(props, parentNode[$props].value);
808
+ }
812
809
  //console.log('processed:', node)
813
810
  debug('post processHtmlNode', node);
814
811
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tungsten",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,6 +9,7 @@
9
9
  "main": "dist/index.js",
10
10
  "exports": {
11
11
  ".": "./dist/index.js",
12
+ "./ssr": "./dist/ssr.js",
12
13
  "./compat": "./dist/compat/index.js",
13
14
  "./library": "./dist/components/library/index.js",
14
15
  "./react-zone": "./dist/zones/react.js",