Skip to content

Commit 6a801d1

Browse files
committed
just pushing up where i was
1 parent cc37026 commit 6a801d1

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"postcss": "^8.5.15",
8787
"rdflib": "2.3.9",
8888
"solid-logic": "4.0.8-0",
89-
"solid-ui": "3.1.3-5",
89+
"solid-ui": "3.1.3-7",
9090
"style-loader": "^4.0.0",
9191
"terser-webpack-plugin": "^5.4.0",
9292
"typescript": "^5.9.3",

src/components/source-provider/SourceProvider.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@ import { WebComponent } from 'solid-ui'
99
import { sourceContext, SourceContext } from '../../primitives/context'
1010
import { SourcePaneState } from '../../types'
1111

12+
const webComponentIdentityKey = Symbol.for('solid-ui/WebComponentIdentity')
13+
14+
queueMicrotask(() => {
15+
const currentWebComponent = WebComponent
16+
const previousWebComponent = (globalThis as typeof globalThis & {
17+
[webComponentIdentityKey]?: typeof WebComponent
18+
})[webComponentIdentityKey]
19+
20+
;(globalThis as typeof globalThis & {
21+
[webComponentIdentityKey]?: typeof WebComponent
22+
})[webComponentIdentityKey] = currentWebComponent
23+
24+
console.log('WebComponent identity:', {
25+
currentName: currentWebComponent.name,
26+
hasPrevious: previousWebComponent != null,
27+
sameAsPrevious: previousWebComponent === currentWebComponent,
28+
})
29+
})
30+
1231
@customElement('solid-panes-source-provider')
1332
export default class SourceProvider extends WebComponent {
1433
@property({ attribute: false })

webpack.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const esmPaneConfig = {
104104
path: path.resolve(process.cwd(), 'dist/esm'),
105105
filename: 'source-pane.esm.js',
106106
chunkFilename: '[name].esm.js',
107-
publicPath: 'auto',
107+
publicPath: '',
108108
library: {
109109
type: 'module',
110110
},

0 commit comments

Comments
 (0)