@stripchatdev/create-stripchat-extension 0.1.22 → 0.1.23

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.
@@ -10,7 +10,7 @@ Read `AGENTS.md` first. It is the project contract for SDK usage, slot lifecycle
10
10
 
11
11
  - `public/manifest.json` declares slots, page keys, optional settings entry, and backend actions.
12
12
  - `public/resolveSlotPage.js` maps slot types to page keys from `views.pages`.
13
- - Root HTML files like `<%= slots[0] %>.html` and `background.html` are emitted to the archive root.
13
+ - Root HTML files like `<%= slotsEntries[0].slotCamelCased %>.html` and `background.html` are emitted to the archive root.
14
14
  - Visual slots should stay disposable; keep durable state and coordination in `background`.
15
15
  - `vite.config.<%= isTypescript ? 'ts' : 'js' %>` must include every root HTML file in `build.rollupOptions.input`.
16
16
 
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "version": "v2.0",
3
3
  "views": {
4
- "slots": <%- JSON.stringify(slots) %>,
4
+ "slots": [<%- slotsEntries.map(({ slot }) => `"${slot}"`).join(', ') %>],
5
5
  "pages": {
6
- <% slots.forEach((slot, i) => { -%>
7
- "<%= slot %>": "<%= slot %>.html"<%= i < slots.length - 1 ? ',' : '' %>
6
+ <% slotsEntries.forEach(({ slotCamelCased }, i) => { -%>
7
+ "<%= slotCamelCased %>": "<%= slotCamelCased %>.html"<%= i < slotsEntries.length - 1 ? ',' : '' %>
8
8
  <% }); -%>
9
9
  },
10
10
  "resolveSlotPageScript": "resolveSlotPage.js"
11
- }<% if (slots.includes('moveableOverlay')) { %>,
11
+ }<% if (slotsEntries.filter(({ slot }) => slot ==='EXTENSION_SLOT_MOVEABLE_OVERLAY').length > 0) { %>,
12
12
  "moveableSlot": {
13
13
  "width": 400,
14
14
  "height": 600
@@ -1,8 +1,8 @@
1
1
  export default function resolveSlotPage(slotType, context, extSettings) {
2
2
  switch (slotType) {
3
- <% slotResolverEntries.forEach((entry) => { -%>
4
- case '<%= entry.slotType %>':
5
- return '<%= entry.slot %>';
3
+ <% slotsEntries.forEach(({ slotCamelCased, slot }) => { -%>
4
+ case '<%= slot %>':
5
+ return '<%= slotCamelCased %>';
6
6
  <% }); -%>
7
7
  default:
8
8
  return null;
@@ -15,8 +15,8 @@ export default defineConfig({
15
15
  outDir: 'dist',
16
16
  rollupOptions: {
17
17
  input: {
18
- <% slots.forEach((slot, i) => { -%>
19
- '<%= slot %>': resolve(__dirname, '<%= slot %>.html')<%= i < slots.length - 1 ? ',' : '' %>
18
+ <% slotsEntries.forEach(({ slotCamelCased }, i) => { -%>
19
+ '<%= slotCamelCased %>': resolve(__dirname, '<%= slotCamelCased %>.html')<%= i < slotsEntries.length - 1 ? ',' : '' %>
20
20
  <% }); -%>
21
21
  },
22
22
  },