@arcgis/lumina 4.31.0-next.97 → 4.31.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.
- package/dist/LitElement.d.ts +20 -3
- package/dist/chunk-A4JIXA23.js +31 -0
- package/dist/chunk-A4JIXA23.js.map +1 -0
- package/dist/chunk-CTQVJVF7.js +39 -0
- package/dist/chunk-CTQVJVF7.js.map +1 -0
- package/dist/chunk-DEEVUK5Y.js +28 -0
- package/dist/chunk-DEEVUK5Y.js.map +1 -0
- package/dist/chunk-EVAF2JRB.js +16 -0
- package/dist/chunk-FOOMFQOW.js +31 -0
- package/dist/chunk-FOOMFQOW.js.map +1 -0
- package/dist/chunk-HHA4SRXI.js +28 -0
- package/dist/chunk-HHA4SRXI.js.map +1 -0
- package/dist/chunk-KAFHPLZ3.js +39 -0
- package/dist/chunk-KAFHPLZ3.js.map +1 -0
- package/dist/chunk-NENDOZLN.js +17 -0
- package/dist/chunk-NENDOZLN.js.map +1 -0
- package/dist/chunk-SWNWS2UY.js +28 -0
- package/dist/chunk-SWNWS2UY.js.map +1 -0
- package/dist/chunk-TITMTQYB.js +28 -0
- package/dist/chunk-TITMTQYB.js.map +1 -0
- package/dist/chunk-VDVC6NX7.js +38 -0
- package/dist/chunk-VDVC6NX7.js.map +1 -0
- package/dist/chunk-WASYSR3I.js +31 -0
- package/dist/chunk-WASYSR3I.js.map +1 -0
- package/dist/config.js.map +1 -0
- package/dist/devOnlyDetectIncorrectLazyUsages.d.ts +4 -1
- package/dist/index.js +92 -34
- package/dist/index.js.map +1 -0
- package/dist/jsx/jsx.d.ts +21 -23
- package/dist/lazyLoad.d.ts +1 -1
- package/dist/lazyLoadSpec.d.ts +0 -0
- package/dist/lifecycleSupport.d.ts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/stencil-ssr-compatibility/index.js +1 -1
- package/dist/stencil-ssr-compatibility/index.js.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/typings/jsxGlobals.ts +38 -0
- package/dist/wrapperUtils.d.ts +9 -0
- package/package.json +5 -24
package/dist/runtime.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { LitElement } from "./LitElement";
|
|
|
3
3
|
/**
|
|
4
4
|
* `@arcgis/lumina` package may be bundled once but used by multiple packages with
|
|
5
5
|
* different configuration options. For that reason, the configuration options
|
|
6
|
-
*
|
|
6
|
+
* cannot be a global object, but has to be an object that you pass around.
|
|
7
7
|
*/
|
|
8
8
|
export type Runtime = RuntimeOptions & {
|
|
9
9
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { getWindow } from "@lit-labs/ssr/lib/dom-shim.js";
|
|
3
3
|
import { render } from "@lit-labs/ssr/lib/render.js";
|
|
4
4
|
import { html } from "@lit-labs/ssr/lib/server-template.js";
|
|
5
|
-
import { unsafeStatic, withStatic } from "lit/static
|
|
5
|
+
import { unsafeStatic, withStatic } from "lit-html/static.js";
|
|
6
6
|
import { collectResult } from "@lit-labs/ssr/lib/render-result.js";
|
|
7
7
|
import { RenderResultReadable } from "@lit-labs/ssr/lib/render-result-readable.js";
|
|
8
8
|
var staticHtml = withStatic(html);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/stencil-ssr-compatibility/index.ts"],"sourcesContent":["/**\n * Lots of silencing of ESLint in this file to be compatible with Stencil's\n * unsafe typings.\n */\n\nimport { getWindow } from \"@lit-labs/ssr/lib/dom-shim.js\";\nimport { render, type RenderInfo } from \"@lit-labs/ssr/lib/render.js\";\nimport type { html as coreHtml } from \"lit-html\";\nimport { html } from \"@lit-labs/ssr/lib/server-template.js\";\nimport { unsafeStatic, withStatic } from \"lit/static-html.js\";\nimport { collectResult, type RenderResult } from \"@lit-labs/ssr/lib/render-result.js\";\nimport { RenderResultReadable } from \"@lit-labs/ssr/lib/render-result-readable.js\";\nimport type { Readable } from \"node:stream\";\n\nconst staticHtml = withStatic(html as typeof coreHtml);\n\ntype InternalWindow = {\n document: InternalDocument;\n};\n\ntype InternalDocument = {\n defaultView: InternalWindow;\n templateHtml: string;\n buildId: string;\n outerHtml?: string;\n documentElement?: {\n outerHTML: string;\n };\n};\n\n/**\n * @deprecated\n * Use `render` from `@lit-labs/ssr` instead.\n *\n * @see https://lit.dev/docs/ssr/server-usage/\n */\nexport interface HydrateResults {\n buildId: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n diagnostics: any[];\n url: string;\n host: string;\n hostname: string;\n href: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n html: string;\n components: HydrateComponent[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n anchors: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n imgs: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n scripts: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n styles: any[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n staticData: any[];\n title: string;\n hydratedCount: number;\n httpStatus: number;\n}\n\nexport interface HydrateComponent {\n tag: string;\n mode: string;\n count: number;\n depth: number;\n}\n\n/**\n * @deprecated\n * Use `getWindow` from `@lit-labs/ssr/lib/dom-shim` instead.\n *\n * @see https://lit.dev/docs/ssr/server-usage/\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function createWindowFromHtml(templateHtml: string, uniqueId: string = Math.random().toString()): any {\n const window = getWindow({ includeJSBuiltIns: true }) as InternalWindow;\n window.document.defaultView = window;\n window.document.templateHtml = templateHtml;\n window.document.buildId = uniqueId;\n return window;\n}\n\n/**\n * @deprecated\n * Use `RenderResultReadable` from `@lit-labs/ssr` instead.\n *\n * @see https://lit.dev/docs/ssr/server-usage/\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function streamToString(html: any, options?: Partial<RenderInfo>): Readable {\n const { result } = getRenderResult(html, options);\n return new RenderResultReadable(result);\n}\n\nfunction getRenderResult(\n rawSource: unknown,\n options?: Partial<RenderInfo>,\n): { result: RenderResult; tagNames: string[]; maybeDocument: Partial<InternalDocument> | undefined } {\n const maybeDocument =\n typeof rawSource === \"object\" && rawSource !== null\n ? \"document\" in rawSource\n ? (rawSource as InternalWindow).document\n : (rawSource as Partial<InternalDocument>)\n : undefined;\n const source =\n maybeDocument && \"templateHtml\" in maybeDocument\n ? maybeDocument.templateHtml\n : maybeDocument && \"documentElement\" in maybeDocument\n ? (maybeDocument.documentElement?.outerHTML ?? maybeDocument)\n : rawSource;\n const renderTemplate = typeof source === \"string\" ? staticHtml`${unsafeStatic(source)}` : source;\n const tagNames: string[] = [];\n const result = render(renderTemplate, {\n customElementRendered(tagName) {\n tagNames.push(tagName);\n },\n ...options,\n });\n\n return { result, maybeDocument, tagNames };\n}\n\n/**\n * @deprecated\n * Use `render` from `@lit-labs/ssr` instead.\n *\n * @see https://lit.dev/docs/ssr/server-usage/\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function renderToString(html: any, options?: Partial<RenderInfo>): Promise<HydrateResults>;\nexport function renderToString(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n html: any,\n options: Partial<RenderInfo> | undefined,\n asStream: true,\n): Readable;\n// eslint-disable-next-line @typescript-eslint/promise-function-async\nexport function renderToString(\n html: unknown,\n options?: Partial<RenderInfo>,\n asStream = false,\n): Promise<HydrateResults> | Readable {\n if (asStream) {\n return streamToString(html, options);\n } else {\n return resultsToString(html, options);\n }\n}\n\nasync function resultsToString(html: unknown, options?: Partial<RenderInfo>): Promise<HydrateResults> {\n const { result, tagNames, maybeDocument } = getRenderResult(html, options);\n const collected = await collectResult(result);\n\n const renderResult: HydrateResults = {\n buildId: maybeDocument?.buildId ?? Math.random().toString(),\n diagnostics: [],\n url: globalThis?.location?.href ?? \"https://hydrate.stenciljs.com/\",\n host: globalThis?.location?.host ?? \"hydrate.stenciljs.com\",\n hostname: globalThis?.location?.hostname ?? \"hydrate.stenciljs.com\",\n href: globalThis?.location?.href ?? \"https://hydrate.stenciljs.com/\",\n port: globalThis?.location?.port ?? \"\",\n pathname: globalThis?.location?.pathname ?? \"/\",\n search: globalThis?.location?.search ?? \"\",\n hash: globalThis?.location?.hash ?? \"\",\n html: collected,\n httpStatus: 200,\n hydratedCount: tagNames.length,\n anchors: [],\n components: tagNames.map((tag) => ({\n tag,\n mode: \"$\",\n count: 1,\n depth: 1,\n })),\n imgs: [],\n scripts: [],\n staticData: [],\n styles: [],\n title: globalThis?.document?.title ?? \"Vite + TS\",\n };\n if (maybeDocument && \"templateHtml\" in maybeDocument) {\n maybeDocument.outerHtml = collected;\n }\n\n return renderResult;\n}\n\n/**\n * @deprecated\n * Use `render` from `@lit-labs/ssr` instead.\n *\n * @see https://lit.dev/docs/ssr/server-usage/\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function hydrateDocument(doc: any, options?: Partial<RenderInfo>): Promise<HydrateResults>;\nexport function hydrateDocument(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n doc: any,\n options: Partial<RenderInfo> | undefined,\n asStream: true,\n): Readable;\n// eslint-disable-next-line @typescript-eslint/promise-function-async\nexport function hydrateDocument(\n doc: unknown,\n options?: Partial<RenderInfo>,\n asStream?: true,\n): Promise<HydrateResults> | Readable {\n return renderToString(doc, options, asStream!);\n}\n\n/**\n * @deprecated\n * Use `render` from `@lit-labs/ssr` instead.\n *\n * @see https://lit.dev/docs/ssr/server-usage/\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function serializeDocumentToString(doc: any, _unused?: unknown): string {\n const maybeDocument = doc as Partial<InternalDocument>;\n return maybeDocument.outerHtml ?? maybeDocument.templateHtml ?? String(maybeDocument);\n}\n"],"mappings":";AAKA,SAAS,iBAAiB;AAC1B,SAAS,cAA+B;AAExC,SAAS,YAAY;AACrB,SAAS,cAAc,kBAAkB;AACzC,SAAS,qBAAwC;AACjD,SAAS,4BAA4B;AAGrC,IAAM,aAAa,WAAW,IAAuB;AAiE9C,SAAS,qBAAqB,cAAsB,WAAmB,KAAK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AU,QAAQ;AAAA,IACpC,UAAU,YAAY,UAAU,YAAY;AAAA,IAC5C,MAAM,YAAY,UAAU,QAAQ;AAAA,IACpC,MAAM,YAAY,UAAU,QAAQ;AAAA,IACpC,UAAU,YAAY,UAAU,YAAY;AAAA,IAC5C,QAAQ,YAAY,UAAU,UAAU;AAAA,IACxC,MAAM,YAAY,UAAU,QAAQ;AAAA,IACpC,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,eAAe,SAAS;AAAA,IACxB,SAAS,CAAC;AAAA,IACV,YAAY,SAAS,IAAI,CAAC,SAAS;AAAA,MACjC;AAAA,MACA,MAAM;AAAA,MACN,OAAO;AAAA,MACP,OAAO;AAAA,IACT,EAAE;AAAA,IACF,MAAM,CAAC;AAAA,IACP,SAAS,CAAC;AAAA,IACV,YAAY,CAAC;AAAA,IACb,QAAQ,CAAC;AAAA,IACT,OAAO,YAAY,UAAU,SAAS;AAAA,EACxC;AACA,MAAI,iBAAiB,kBAAkB,eAAe;AACpD,kBAAc,YAAY;AAAA,EAC5B;AAEA,SAAO;AACT;AAiBO,SAAS,gBACd,KACA,SACA,UACoC;AACpC,SAAO,eAAe,KAAK,SAAS,QAAS;AAC/C;AASO,SAAS,0BAA0B,KAAU,SAA2B;AAC7E,QAAM,gBAAgB;AACtB,SAAO,cAAc,aAAa,cAAc,gBAAgB,OAAO,aAAa;AACtF;","names":["html"]}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const litElementSymbol: unique symbol;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
/**
|
|
5
|
+
* This interface will be extended in each source file that defines a LitElement.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* declare global {
|
|
10
|
+
* interface DeclareElements {
|
|
11
|
+
* "arcgis-root": ArcgisRoot;
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
17
|
+
export interface DeclareElements {}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Extend this interface with Stencil web components that you wish to use
|
|
21
|
+
* in Lit
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* import type { JSX as CalciteJSX } from "@esri/calcite-components/dist/types/components";
|
|
26
|
+
* import type { JSX as CommonComponentsJsx } from "@arcgis/common-components/dist/types/components";
|
|
27
|
+
*
|
|
28
|
+
* declare global {
|
|
29
|
+
* interface ImportStencilElements
|
|
30
|
+
* extends CalciteJSX.IntrinsicElements,
|
|
31
|
+
* CommonComponentsJsx.IntrinsicElements {
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
37
|
+
export interface ImportStencilElements {}
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a mock custom element class that contains the prototype of the custom element and the tag name.
|
|
3
|
+
* The prototype is lazy loaded, so it will throw an error if the custom element is not found.
|
|
4
|
+
* This method is used by custom elements wrapper packages to get the prototype of the custom element.
|
|
5
|
+
*
|
|
6
|
+
* @param tagName - The tag name of the custom element
|
|
7
|
+
* @returns - a mock custom element class that contains the prototype of the custom element and the tag name
|
|
8
|
+
*/
|
|
9
|
+
export declare function getMockCustomElement<T>(tagName: string): new () => T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/lumina",
|
|
3
|
-
"version": "4.31.0
|
|
3
|
+
"version": "4.31.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -17,33 +17,14 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"dist/"
|
|
19
19
|
],
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
"registry": "https://registry.npmjs.org/",
|
|
22
|
-
"access": "public"
|
|
23
|
-
},
|
|
24
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsup",
|
|
27
|
-
"build:dev": "tsup --sourcemap",
|
|
28
|
-
"watch": "yarn build:dev --watch",
|
|
29
|
-
"clean": "rimraf ./dist ./build ./turbo ./node_modules"
|
|
30
|
-
},
|
|
31
21
|
"dependencies": {
|
|
32
|
-
"@arcgis/components-controllers": "4.31.0
|
|
33
|
-
"@arcgis/components-utils": "4.31.0
|
|
22
|
+
"@arcgis/components-controllers": "4.31.0",
|
|
23
|
+
"@arcgis/components-utils": "4.31.0",
|
|
34
24
|
"@lit-labs/ssr": "^3.2.2",
|
|
35
25
|
"@lit-labs/ssr-client": "^1.1.7",
|
|
36
26
|
"csstype": "^3.1.3",
|
|
37
27
|
"lit": "^3.1.2",
|
|
38
28
|
"tslib": "^2.7.0"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
"@arcgis/typescript-config": "4.31.0-next.97",
|
|
42
|
-
"@types/node": "^20.2.5",
|
|
43
|
-
"eslint": "^8.55.0",
|
|
44
|
-
"rimraf": "^5.0.0",
|
|
45
|
-
"tsup": "^8.2.4",
|
|
46
|
-
"typescript": "~5.4.0"
|
|
47
|
-
},
|
|
48
|
-
"gitHead": "fa478c4673fe1ea0963e65bf8d75ca63df5f21b8"
|
|
49
|
-
}
|
|
29
|
+
}
|
|
30
|
+
}
|