From c1f505b62c0a640eeac329065e17bb5497caec05 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Sat, 23 Nov 2024 18:34:06 -0500 Subject: [PATCH] spectrum web components example --- package.json | 7 + patches/@greenwood__cli.patch | 94 +++++----- pnpm-lock.yaml | 333 +++++++++++++++++++++++++++++++++- src/layouts/app.html | 27 +++ src/spectrum.js | 9 + 5 files changed, 409 insertions(+), 61 deletions(-) create mode 100644 src/spectrum.js diff --git a/package.json b/package.json index 9092361..44df543 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,13 @@ "start": "pnpm run serve" }, "dependencies": { + "@spectrum-web-components/action-menu": "^1.0.1", + "@spectrum-web-components/button": "^1.0.1", + "@spectrum-web-components/menu": "^1.0.1", + "@spectrum-web-components/shared": "^1.0.1", + "@spectrum-web-components/styles": "^1.0.1", + "@spectrum-web-components/theme": "^1.0.1", + "@spectrum-web-components/top-nav": "^1.0.1", "lit": "^3.1.0" }, "devDependencies": { diff --git a/patches/@greenwood__cli.patch b/patches/@greenwood__cli.patch index f82a512..0d608a1 100644 --- a/patches/@greenwood__cli.patch +++ b/patches/@greenwood__cli.patch @@ -42,10 +42,10 @@ index 05226f66bf42fc0a07588d373b14932cbeb9ff7f..a86924565e964815769e1fc788bf5c6c }; \ No newline at end of file diff --git a/src/lib/walker-package-ranger.js b/src/lib/walker-package-ranger.js -index a92bb3d29496a453f1714e5cd32d1800c94844be..68fd30e718f5493b426b88bc8e6aa13753c2c2c0 100644 +index a92bb3d29496a453f1714e5cd32d1800c94844be..e081405fed7ce326659f2dd806a6801b0b3d2e24 100644 --- a/src/lib/walker-package-ranger.js +++ b/src/lib/walker-package-ranger.js -@@ -1,217 +1,120 @@ +@@ -1,215 +1,111 @@ -/* eslint-disable max-depth,complexity */ -import * as acorn from 'acorn'; -import fs from 'fs'; @@ -60,13 +60,17 @@ index a92bb3d29496a453f1714e5cd32d1800c94844be..68fd30e718f5493b426b88bc8e6aa137 +const extensionFilters = ['map', 'd.ts']; -const updateImportMap = (entry, entryPath) => { +- +- if (path.extname(entryPath) === '') { +- entryPath = `${entryPath}.js`; +- } +function updateImportMap(key, value) { + importMap[key.replace('./', '')] = value.replace('./', ''); +} -- if (path.extname(entryPath) === '') { -- entryPath = `${entryPath}.js`; -- } +- // handle WIn v Unix-style path separators and force to / +- importMap[entry.replace(/\\/g, '/')] = entryPath.replace(/\\/g, '/'); +-}; +// https://nodejs.org/api/packages.html#subpath-patterns +async function walkExportPatterns(dependency, exp, resolvedRoot) { + if (exp.endsWith('*')) { @@ -74,18 +78,14 @@ index a92bb3d29496a453f1714e5cd32d1800c94844be..68fd30e718f5493b426b88bc8e6aa137 + const files = await fs.readdir(dir); + // console.log({ dependency, exp, dir }); -- // handle WIn v Unix-style path separators and force to / -- importMap[entry.replace(/\\/g, '/')] = entryPath.replace(/\\/g, '/'); --}; -+ files -+ .filter((file) => { -+ let shouldNotFilter = true; - -// handle ESM paths that have varying levels of nesting, e.g. export * from '../../something.js' -// https://github.com/ProjectEvergreen/greenwood/issues/820 -async function resolveRelativeSpecifier(specifier, modulePath, dependency) { - const absoluteNodeModulesLocation = await getNodeModulesLocationForPackage(dependency); -- ++ files ++ .filter((file) => { ++ let shouldNotFilter = true; + - // handle WIn v Unix-style path separators and force to / - return `${dependency}${path.join(path.dirname(modulePath), specifier).replace(/\\/g, '/').replace(absoluteNodeModulesLocation.replace(/\\/g, '/', ''), '')}`; -} @@ -137,9 +137,7 @@ index a92bb3d29496a453f1714e5cd32d1800c94844be..68fd30e718f5493b426b88bc8e6aa137 - if (!importMap[sourceValue]) { - updateImportMap(sourceValue, `/node_modules/${sourceValue}`); - } -+async function walkPackageForExports(dependency, packageJson, resolvedRoot) { -+ const { exports, module, main } = packageJson; - +- - await walkPackageJson(path.join(absoluteNodeModulesLocation, 'package.json')); - } else if (isBarePath) { - updateImportMap(sourceValue, `/node_modules/${sourceValue}`); @@ -148,7 +146,8 @@ index a92bb3d29496a453f1714e5cd32d1800c94844be..68fd30e718f5493b426b88bc8e6aa137 - sourceValue = !hasExtension - ? `${sourceValue}.js` - : sourceValue; -+ console.log('walkPackageForExports', { dependency, exports, module, main }); ++async function walkPackageForExports(dependency, packageJson, resolvedRoot) { ++ const { exports, module, main } = packageJson; - if (fs.existsSync(path.join(absoluteNodeModulesLocation, sourceValue))) { - const entry = `/node_modules/${await resolveRelativeSpecifier(sourceValue, modulePath, dependency)}`; @@ -282,38 +281,16 @@ index a92bb3d29496a453f1714e5cd32d1800c94844be..68fd30e718f5493b426b88bc8e6aa137 - // use the dependency itself as an entry in the importMap - if (entry === '.') { - updateImportMap(dependency, `/node_modules/${path.join(dependency, packageExport)}`); +- } +- } else if (exportMapEntry.endsWith && (exportMapEntry.endsWith('.js') || exportMapEntry.endsWith('.mjs')) && exportMapEntry.indexOf('*') < 0) { +- // is probably a file, so _not_ an export array, package.json, or wildcard export +- packageExport = exportMapEntry; +- } + console.log({ packageJson }); + try { + for (const dependency of Object.keys(packageJson.dependencies || {})) { + const resolved = resolveBareSpecifier(dependency); -+ -+ console.log({ dependency, resolved }); -+ if (resolved) { -+ console.log(resolved.split(`/node_modules/${dependency}/`)[0]); -+ const resolvedRoot = new URL(`./node_modules/${dependency}/`, `${resolved.split(`/node_modules/${dependency}/`)[0]}/`); -+ console.log({ resolvedRoot }) -+ const resolvedPackageJson = (await import(new URL('./package.json', resolvedRoot), { with: { type: 'json' } })).default; -+ -+ console.log({ resolvedPackageJson }); -+ walkPackageForExports(dependency, resolvedPackageJson, resolvedRoot); -+ -+ if (resolvedPackageJson.dependencies) { -+ for (const dependency in resolvedPackageJson.dependencies) { -+ const resolved = resolveBareSpecifier(dependency); -+ -+ if (resolved) { -+ const resolvedRoot = new URL(`./node_modules/${dependency}/`, `${resolved.split(`/node_modules/${dependency}/`)[0]}/`); -+ const resolvedPackageJson = (await import(new URL('./package.json', resolvedRoot), { with: { type: 'json' } })).default; -+ -+ walkPackageForExports(dependency, resolvedPackageJson, resolvedRoot); -+ -+ await walkPackageJson(resolvedPackageJson); - } -- } else if (exportMapEntry.endsWith && (exportMapEntry.endsWith('.js') || exportMapEntry.endsWith('.mjs')) && exportMapEntry.indexOf('*') < 0) { -- // is probably a file, so _not_ an export array, package.json, or wildcard export -- packageExport = exportMapEntry; - } -- + - if (packageExport) { - const packageExportLocation = path.resolve(absoluteNodeModulesLocation, packageExport); - @@ -330,17 +307,33 @@ index a92bb3d29496a453f1714e5cd32d1800c94844be..68fd30e718f5493b426b88bc8e6aa137 - } - } - } -- ++ if (resolved) { ++ const resolvedRoot = new URL(`./node_modules/${dependency}/`, `${resolved.split(`/node_modules/${dependency}/`)[0]}/`); ++ const resolvedPackageJson = (await import(new URL('./package.json', resolvedRoot), { with: { type: 'json' } })).default; + - await walkPackageJson(dependencyPackageJson); - } else { - const packageEntryPointPath = path.join(absoluteNodeModulesLocation, entry); -- ++ walkPackageForExports(dependency, resolvedPackageJson, resolvedRoot); + - // sometimes a main file is actually just an empty string... :/ - if (fs.existsSync(packageEntryPointPath)) { - updateImportMap(dependency, `/node_modules/${path.join(dependency, entry)}`); -- ++ if (resolvedPackageJson.dependencies) { ++ for (const dependency in resolvedPackageJson.dependencies) { ++ const resolved = resolveBareSpecifier(dependency); + - await walkModule(packageEntryPointPath, dependency); - await walkPackageJson(dependencyPackageJson); ++ if (resolved) { ++ const resolvedRoot = new URL(`./node_modules/${dependency}/`, `${resolved.split(`/node_modules/${dependency}/`)[0]}/`); ++ const resolvedPackageJson = (await import(new URL('./package.json', resolvedRoot), { with: { type: 'json' } })).default; ++ ++ walkPackageForExports(dependency, resolvedPackageJson, resolvedRoot); ++ ++ await walkPackageJson(resolvedPackageJson); ++ } ++ } } } } @@ -348,11 +341,8 @@ index a92bb3d29496a453f1714e5cd32d1800c94844be..68fd30e718f5493b426b88bc8e6aa137 + console.error('Error building up import map', e); } -+ console.log({ importMap }); return importMap; - } - -@@ -245,7 +148,6 @@ function mergeImportMap(html = '', map = {}, shouldShim = false) { +@@ -245,7 +141,6 @@ function mergeImportMap(html = '', map = {}, shouldShim = false) { } export { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 86f9569..f038acb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,32 +6,62 @@ settings: patchedDependencies: '@greenwood/cli': - hash: mkksy4qd3fdejrr4ph55fkmyf4 + hash: y4xdnckptpj5fva3zlfpb5qlq4 path: patches/@greenwood__cli.patch importers: .: dependencies: + '@spectrum-web-components/action-menu': + specifier: ^1.0.1 + version: 1.0.1 + '@spectrum-web-components/button': + specifier: ^1.0.1 + version: 1.0.1 + '@spectrum-web-components/menu': + specifier: ^1.0.1 + version: 1.0.1 + '@spectrum-web-components/shared': + specifier: ^1.0.1 + version: 1.0.1 + '@spectrum-web-components/styles': + specifier: ^1.0.1 + version: 1.0.1 + '@spectrum-web-components/theme': + specifier: ^1.0.1 + version: 1.0.1 + '@spectrum-web-components/top-nav': + specifier: ^1.0.1 + version: 1.0.1 lit: specifier: ^3.1.0 version: 3.2.1 devDependencies: '@greenwood/cli': specifier: ~0.30.0 - version: 0.30.2(patch_hash=mkksy4qd3fdejrr4ph55fkmyf4) + version: 0.30.2(patch_hash=y4xdnckptpj5fva3zlfpb5qlq4) '@greenwood/plugin-adapter-vercel': specifier: ~0.30.0 - version: 0.30.2(@greenwood/cli@0.30.2(patch_hash=mkksy4qd3fdejrr4ph55fkmyf4)) + version: 0.30.2(@greenwood/cli@0.30.2(patch_hash=y4xdnckptpj5fva3zlfpb5qlq4)) '@greenwood/plugin-renderer-lit': specifier: ~0.30.0 - version: 0.30.2(@greenwood/cli@0.30.2(patch_hash=mkksy4qd3fdejrr4ph55fkmyf4))(lit@3.2.1) + version: 0.30.2(@greenwood/cli@0.30.2(patch_hash=y4xdnckptpj5fva3zlfpb5qlq4))(lit@3.2.1) rimraf: specifier: ^5.0.0 version: 5.0.10 packages: + '@floating-ui/core@1.6.8': + resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==} + + '@floating-ui/dom@1.6.12': + resolution: {integrity: sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==} + + '@floating-ui/utils@0.2.8': + resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==} + '@greenwood/cli@0.30.2': resolution: {integrity: sha512-FBwoqB6adv+kSelnjeNHzGHwRhxo5USfSc+P2n4evExKf9XUJrWN+l7b/xWI05oISX5oOf56vOgBIXOnfIfr6w==} engines: {node: '>=18.20.0'} @@ -76,6 +106,9 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@lit-labs/observers@2.0.4': + resolution: {integrity: sha512-x95jhDPGb+HtYU3hEdqkcLxb6v2JBP3tcajaiOijs1F/ZmOgRT0pRPn0v+jhhk8mAAbEO12SZJjPCmuysunssQ==} + '@lit-labs/ssr-client@1.1.7': resolution: {integrity: sha512-VvqhY/iif3FHrlhkzEPsuX/7h/NqnfxLwVf0p8ghNIlKegRyRqgeaJevZ57s/u/LiFyKgqksRP5n+LmNvpxN+A==} @@ -146,6 +179,87 @@ packages: rollup: optional: true + '@spectrum-web-components/action-button@1.0.1': + resolution: {integrity: sha512-/QYGoDn2PncjJIwInrctjYIusvQ1nbp21ww5Niy9aNNQjm7M2iCnbWFiwIYkC56GMIrN3DTxBlIFPpT3m8DJtQ==} + + '@spectrum-web-components/action-menu@1.0.1': + resolution: {integrity: sha512-IJllT3PQyXPq6kjs3AMm6MiAwUYczwj4tdLYvxBaq3dBOFR9/+kud5eARzViCi+9pPN6kDg72nYZC8A5vD4VpA==} + + '@spectrum-web-components/base@1.0.1': + resolution: {integrity: sha512-TOlajkkGrHwnxZ4C9v7JiC9IHzqQf0WcvEF+6tACYVkog7eRb03G4AyAZhEtDhwDRsE/bAhEqwRiwB4qpwPW/g==} + + '@spectrum-web-components/button@1.0.1': + resolution: {integrity: sha512-UuS3moob0rArZBg/r/fkl9Wsi0ykmsWMTze7mf7GjgPaE2iLUQBAnjRQv6RKPz3ZmFQ4ORzMJPVIrqjhGh/gOg==} + + '@spectrum-web-components/clear-button@1.0.1': + resolution: {integrity: sha512-qldbr+v60sbjQhg/SblJ3HA1540nSHuumQfoFcJUpXpeT8QJnqmR2XBEOcEDkb3cjtX/PaxDEy6wcEi5wJwwWg==} + + '@spectrum-web-components/close-button@1.0.1': + resolution: {integrity: sha512-jfMHmFmqhUSQBvI5I67ZjzMjr375t8TyGHqEFmZEj6mTyTpKY7qzyrDEBwAsoKvBvhLffh6bkMBWvY3ukWaSgA==} + + '@spectrum-web-components/divider@1.0.1': + resolution: {integrity: sha512-knAM3ut2aVpp1ccAqGc6xQnDLv5dcptyZRVVoxsiuZSFiKhb7cok6QNGbIjVsCqA6WDA2Z6XVIbojt6ESdx5Og==} + + '@spectrum-web-components/field-label@1.0.1': + resolution: {integrity: sha512-0NHt9VDo4EpRna9WI6XN9fSubwynQavybCx61CBsjR7ZO9eLws0GonW90RQR+o6u2/V+V/95Jcp7ccu3dwcBqg==} + + '@spectrum-web-components/icon@1.0.1': + resolution: {integrity: sha512-0Q3rMaQoFIR2ZQfrJQrEGbSAVhqzyFn9Gj+Ij7H9hQGXxlZ+NOZTLdQdUAsnr1mulF1Mf27d+duZxnPprtj2ew==} + + '@spectrum-web-components/icons-ui@1.0.1': + resolution: {integrity: sha512-SEfkMtvibo4T04MjapYIQH5BtJNl4wgi85hxXvqYuwm2IEeMYPql+AA67Hx1JmyuuzAvQKO7gaqpsiNMCk+Awg==} + + '@spectrum-web-components/icons-workflow@1.0.1': + resolution: {integrity: sha512-HkpOkuvmR45bF0FfRCS04CM06w5IhgB+Sx60p/cAWrgZ/RrHPbIRYGPI6SwOf+617ZKdIF6Yh47EFbnCXpCSbw==} + + '@spectrum-web-components/iconset@1.0.1': + resolution: {integrity: sha512-OkT4cIp5lOrifkcintINqUFUPblQYCURFvpZe6RDwsLDP8qVxQvB1GlAN+Nt1HFFvQYMHyONn4HzwOYp3yRmOQ==} + + '@spectrum-web-components/menu@1.0.1': + resolution: {integrity: sha512-07h21MheuvzwrMDPJMLPUEd723MNx6mlZZO8mMsC3lFHNk7sMjTRdkzNd0Xa5C7e+mzQX/yPee1b6QDxw9LKWA==} + + '@spectrum-web-components/modal@1.0.1': + resolution: {integrity: sha512-VGGUQIHAVHBj/GxRePzCmAi96LHau5UFaNj2tX3teA8y44Iy9ONzQUb1GWdIpArdwHu9cCmr1504Er8JTTbPKA==} + + '@spectrum-web-components/overlay@1.0.1': + resolution: {integrity: sha512-cdoygw+3eddb1s87jmnqbvAtzNo5BpdUOYpWZfeAFFdY/gglaDEAkK5mKCH7J+uKGLhE0Kg3bxsM/yxv5t+4zg==} + + '@spectrum-web-components/picker@1.0.1': + resolution: {integrity: sha512-iI7HLfJGz1SRv603gPXMrQ/idtZoRHHiteTfhj5RglHS0U7yD1y/llTIOyp/wYA4TjYTt6ZIaZGBAjrqU7C53w==} + + '@spectrum-web-components/popover@1.0.1': + resolution: {integrity: sha512-DWmRFwwIpVCNuFqAMTmMqOtoV0UFp9nAOYoJ9PI0TJ/690nxKuSSfmLmkw38nSM3r1hU3jtHWeJ0CW7Rmpx89Q==} + + '@spectrum-web-components/progress-circle@1.0.1': + resolution: {integrity: sha512-SvQCKEzxLIALsBjt6lMFhWceR8Gmf/fE7EUm/2vFxgaGCch2YkNP4m4aU5gKGSr6Ca7vJRrLPrGt7ODlHanKLw==} + + '@spectrum-web-components/reactive-controllers@1.0.1': + resolution: {integrity: sha512-v24b930ltKaM8WLP6VCh/TYEbb0//lIMrHHuIaBiuR7CmyNbr9Hro+j3grR6OgsBdpjf6zso1Sf1fQbfFTzuVQ==} + + '@spectrum-web-components/shared@1.0.1': + resolution: {integrity: sha512-byH2V6ssESmVxoS5WxrO7JmdEnOR89hw/gk9VK8XJRa9EQbJQ9uUEoVKEjf5S37OWNbBd+DTVufNjmEXyvwq1g==} + + '@spectrum-web-components/styles@1.0.1': + resolution: {integrity: sha512-lJ/wlrHefhsw5656oNZfxkp0xiWkdWykpfOkra51cgfFcOuWQ3x+daXPnwyxSDaFhdL/erqLH5qzZlVFBOjkvg==} + + '@spectrum-web-components/tabs@1.0.1': + resolution: {integrity: sha512-JTaIBvNn1P2Y1PRntplgPVye7PyaygHrslvzWfDmB4OJD5CVIFfVKX2z/bVM2TEmwABi7SDEK/MMUQ43xpRLbw==} + + '@spectrum-web-components/theme@1.0.1': + resolution: {integrity: sha512-Av8kMdUaSXNY9NVnodhVLN880NzCIGhBvATvbzswjMl5mwyWvWFyUukZRaPwJ+gmm3Zx5NQ39/m32Srm6c8Keg==} + + '@spectrum-web-components/tooltip@1.0.1': + resolution: {integrity: sha512-77X74M7Cr+9qz7Xjb3pZEQtG5Tk3+oa7g71nBq+Y6X5G4SOTJ92p+0/s94SsjKJg1KU1RMZWEgmDHbzfICZdPg==} + + '@spectrum-web-components/top-nav@1.0.1': + resolution: {integrity: sha512-7BOetIQsjl/vJ6/xw3e4jXIp+qLz8s5LKSHYXDBBFpBsBIJdkFaeV9slj6Kt5SumkSxg1C6W+RMpnMjznCAc1g==} + + '@spectrum-web-components/tray@1.0.1': + resolution: {integrity: sha512-GsNqLfymkHAkKq6N0dL62ozoCoOjElgtbiiw6D6r/TFGLrFRN4mVdPluVxw+n2Gyf7jT2VcBRSg3Nd7XX3Ldxw==} + + '@spectrum-web-components/underlay@1.0.1': + resolution: {integrity: sha512-tRVeWzf2ykyzhF49pazTIWnnqK/X6NY70I0kdcAu9yoLTp0zGV1DcOkm3XfNpQToiHO4WbzUL5x8JBLiPlF0oA==} + '@types/accepts@1.3.7': resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==} @@ -528,6 +642,9 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + focus-visible@5.2.1: + resolution: {integrity: sha512-8Bx950VD1bWTQJEH/AM6SpEk+SU55aVnp4Ujhuuxy3eMEBCRwBnTBnVXr9YAPvZL3/CNjCa8u4IWfNmEO53whA==} + for-in@1.0.2: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} engines: {node: '>=0.10.0'} @@ -1346,7 +1463,18 @@ packages: snapshots: - '@greenwood/cli@0.30.2(patch_hash=mkksy4qd3fdejrr4ph55fkmyf4)': + '@floating-ui/core@1.6.8': + dependencies: + '@floating-ui/utils': 0.2.8 + + '@floating-ui/dom@1.6.12': + dependencies: + '@floating-ui/core': 1.6.8 + '@floating-ui/utils': 0.2.8 + + '@floating-ui/utils@0.2.8': {} + + '@greenwood/cli@0.30.2(patch_hash=y4xdnckptpj5fva3zlfpb5qlq4)': dependencies: '@rollup/plugin-commonjs': 25.0.8(rollup@3.29.5) '@rollup/plugin-node-resolve': 15.3.0(rollup@3.29.5) @@ -1377,13 +1505,13 @@ snapshots: - supports-color - utf-8-validate - '@greenwood/plugin-adapter-vercel@0.30.2(@greenwood/cli@0.30.2(patch_hash=mkksy4qd3fdejrr4ph55fkmyf4))': + '@greenwood/plugin-adapter-vercel@0.30.2(@greenwood/cli@0.30.2(patch_hash=y4xdnckptpj5fva3zlfpb5qlq4))': dependencies: - '@greenwood/cli': 0.30.2(patch_hash=mkksy4qd3fdejrr4ph55fkmyf4) + '@greenwood/cli': 0.30.2(patch_hash=y4xdnckptpj5fva3zlfpb5qlq4) - '@greenwood/plugin-renderer-lit@0.30.2(@greenwood/cli@0.30.2(patch_hash=mkksy4qd3fdejrr4ph55fkmyf4))(lit@3.2.1)': + '@greenwood/plugin-renderer-lit@0.30.2(@greenwood/cli@0.30.2(patch_hash=y4xdnckptpj5fva3zlfpb5qlq4))(lit@3.2.1)': dependencies: - '@greenwood/cli': 0.30.2(patch_hash=mkksy4qd3fdejrr4ph55fkmyf4) + '@greenwood/cli': 0.30.2(patch_hash=y4xdnckptpj5fva3zlfpb5qlq4) '@lit-labs/ssr': 3.2.2 '@lit-labs/ssr-client': 1.1.7 lit: 3.2.1 @@ -1421,6 +1549,11 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + '@lit-labs/observers@2.0.4': + dependencies: + '@lit/reactive-element': 2.0.4 + lit-html: 3.2.1 + '@lit-labs/ssr-client@1.1.7': dependencies: '@lit/reactive-element': 2.0.4 @@ -1502,6 +1635,186 @@ snapshots: optionalDependencies: rollup: 3.29.5 + '@spectrum-web-components/action-button@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/button': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + '@spectrum-web-components/icons-ui': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + + '@spectrum-web-components/action-menu@1.0.1': + dependencies: + '@spectrum-web-components/action-button': 1.0.1 + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + '@spectrum-web-components/icons-workflow': 1.0.1 + '@spectrum-web-components/picker': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + + '@spectrum-web-components/base@1.0.1': + dependencies: + lit: 3.2.1 + + '@spectrum-web-components/button@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/clear-button': 1.0.1 + '@spectrum-web-components/close-button': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + '@spectrum-web-components/icons-ui': 1.0.1 + '@spectrum-web-components/progress-circle': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + + '@spectrum-web-components/clear-button@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + + '@spectrum-web-components/close-button@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + + '@spectrum-web-components/divider@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + + '@spectrum-web-components/field-label@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + '@spectrum-web-components/icons-ui': 1.0.1 + '@spectrum-web-components/reactive-controllers': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + + '@spectrum-web-components/icon@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/iconset': 1.0.1 + + '@spectrum-web-components/icons-ui@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + '@spectrum-web-components/iconset': 1.0.1 + + '@spectrum-web-components/icons-workflow@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + + '@spectrum-web-components/iconset@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + + '@spectrum-web-components/menu@1.0.1': + dependencies: + '@lit-labs/observers': 2.0.4 + '@spectrum-web-components/action-button': 1.0.1 + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/divider': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + '@spectrum-web-components/icons-ui': 1.0.1 + '@spectrum-web-components/overlay': 1.0.1 + '@spectrum-web-components/popover': 1.0.1 + '@spectrum-web-components/reactive-controllers': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + + '@spectrum-web-components/modal@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + + '@spectrum-web-components/overlay@1.0.1': + dependencies: + '@floating-ui/dom': 1.6.12 + '@floating-ui/utils': 0.2.8 + '@spectrum-web-components/action-button': 1.0.1 + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/reactive-controllers': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + '@spectrum-web-components/theme': 1.0.1 + + '@spectrum-web-components/picker@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/button': 1.0.1 + '@spectrum-web-components/field-label': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + '@spectrum-web-components/icons-ui': 1.0.1 + '@spectrum-web-components/icons-workflow': 1.0.1 + '@spectrum-web-components/menu': 1.0.1 + '@spectrum-web-components/overlay': 1.0.1 + '@spectrum-web-components/popover': 1.0.1 + '@spectrum-web-components/progress-circle': 1.0.1 + '@spectrum-web-components/reactive-controllers': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + '@spectrum-web-components/tooltip': 1.0.1 + '@spectrum-web-components/tray': 1.0.1 + + '@spectrum-web-components/popover@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/overlay': 1.0.1 + + '@spectrum-web-components/progress-circle@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + + '@spectrum-web-components/reactive-controllers@1.0.1': + dependencies: + lit: 3.2.1 + + '@spectrum-web-components/shared@1.0.1': + dependencies: + '@lit-labs/observers': 2.0.4 + '@spectrum-web-components/base': 1.0.1 + focus-visible: 5.2.1 + + '@spectrum-web-components/styles@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + lit: 3.2.1 + + '@spectrum-web-components/tabs@1.0.1': + dependencies: + '@lit-labs/observers': 2.0.4 + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/icon': 1.0.1 + '@spectrum-web-components/icons-ui': 1.0.1 + '@spectrum-web-components/reactive-controllers': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + + '@spectrum-web-components/theme@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/styles': 1.0.1 + + '@spectrum-web-components/tooltip@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/overlay': 1.0.1 + '@spectrum-web-components/reactive-controllers': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + + '@spectrum-web-components/top-nav@1.0.1': + dependencies: + '@lit-labs/observers': 2.0.4 + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + '@spectrum-web-components/tabs': 1.0.1 + + '@spectrum-web-components/tray@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@spectrum-web-components/modal': 1.0.1 + '@spectrum-web-components/reactive-controllers': 1.0.1 + '@spectrum-web-components/shared': 1.0.1 + '@spectrum-web-components/underlay': 1.0.1 + + '@spectrum-web-components/underlay@1.0.1': + dependencies: + '@spectrum-web-components/base': 1.0.1 + '@types/accepts@1.3.7': dependencies: '@types/node': 22.9.1 @@ -1868,6 +2181,8 @@ snapshots: dependencies: to-regex-range: 5.0.1 + focus-visible@5.2.1: {} + for-in@1.0.2: {} foreground-child@3.3.0: diff --git a/src/layouts/app.html b/src/layouts/app.html index 6842426..d2b4311 100644 --- a/src/layouts/app.html +++ b/src/layouts/app.html @@ -12,6 +12,7 @@ + @@ -26,6 +27,32 @@
+ + I'm a button! + + + More Actions + + Deselect + + + Select inverse + + + Feather... + + + Select and mask... + + + + Save selection + + + Make work path + + +

Demos

This is a Greenwood demonstration repo diff --git a/src/spectrum.js b/src/spectrum.js new file mode 100644 index 0000000..f4e7627 --- /dev/null +++ b/src/spectrum.js @@ -0,0 +1,9 @@ +import '@spectrum-web-components/theme/sp-theme.js'; +import '@spectrum-web-components/theme/src/themes.js'; + +import '@spectrum-web-components/button/sp-button.js'; +import '@spectrum-web-components/action-menu/sp-action-menu.js'; +import '@spectrum-web-components/menu/sp-menu.js'; +import '@spectrum-web-components/menu/sp-menu-item.js'; +import '@spectrum-web-components/menu/sp-menu-divider.js'; +import '@spectrum-web-components/menu/sp-menu-group.js';