Skip to content

Commit

Permalink
Added meta export for @xyo-network/react-location-point-map-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Nov 4, 2024
1 parent dd0a2eb commit c8e005e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
10 changes: 5 additions & 5 deletions packages/plugins/packages/location-point-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"type": "module",
"exports": {
".": {
"browser": {
"types": "./dist/browser/index.d.ts",
"default": "./dist/browser/index.mjs"
},
"types": "./dist/browser/index.d.ts",
"default": "./dist/browser/index.mjs"
},
"./meta": {
"types": "./dist/browser/meta/index.d.ts",
"default": "./dist/browser/meta/index.mjs"
},
"./package.json": "./package.json"
},
"module": "dist/browser/index.mjs",
Expand Down Expand Up @@ -77,4 +77,4 @@
"access": "public"
},
"docs": "dist/docs.json"
}
}
6 changes: 2 additions & 4 deletions packages/plugins/packages/location-point-map/src/Plugin.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { LocationSchema } from '@xyo-network/location-payload-plugin'
import type { Payload } from '@xyo-network/payload-model'
import type { PayloadRenderPlugin } from '@xyo-network/react-payload-plugin'
import { createPayloadRenderPlugin } from '@xyo-network/react-payload-plugin'

import { PointMapWithSettingsRenderer } from './components/index.ts'
import PointMapRenderPluginMeta from './meta/index.ts'

export const PointMapRenderPlugin: PayloadRenderPlugin = {
...createPayloadRenderPlugin({
canRender: (payload?: Payload) => payload?.schema === LocationSchema,
...PointMapRenderPluginMeta,
components: { box: { detailsBox: PointMapWithSettingsRenderer } },
name: 'Point Map',
}),
}
1 change: 1 addition & 0 deletions packages/plugins/packages/location-point-map/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './components/index.ts'
export * from './Plugin.ts'
export { PointMapRenderPlugin as default } from './Plugin.ts'
10 changes: 10 additions & 0 deletions packages/plugins/packages/location-point-map/src/meta/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { LocationSchema } from '@xyo-network/location-payload-plugin'
import type { Payload } from '@xyo-network/payload-model'
import type { PayloadRenderPluginBase } from '@xyo-network/react-payload-plugin'

const PointMapRenderPluginMeta: PayloadRenderPluginBase = {
canRender: (payload?: Payload) => payload?.schema === LocationSchema,
name: 'Point Map',
}

export default PointMapRenderPluginMeta
2 changes: 1 addition & 1 deletion packages/plugins/packages/location-point-map/xy.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
const config: XyTsupConfig = {
compile: {
browser: { src: true },
browser: { src: { entry: ['./src/index.ts', './src/meta/index.ts'] } },
node: {},
neutral: {},
},
Expand Down

0 comments on commit c8e005e

Please sign in to comment.