@goodandready/dsh-subscriptions 0.6.13 → 0.6.15
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/lib/client.js +41 -5
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -202,6 +202,10 @@ const cssId = 'dsh-subscriptions/settings.module.css'
|
|
|
202
202
|
// them without touching this plugin's code. English is the default,
|
|
203
203
|
// and the fallback when no translation exists.
|
|
204
204
|
const NS = 'dsh-subscriptions'
|
|
205
|
+
// Plugins page row seat (DSH 0.1.6-alpha.2): key = '<package name>#<row id>'.
|
|
206
|
+
const PKG = '@goodandready/dsh-subscriptions'
|
|
207
|
+
const ROW_ID = 'dsh-subscriptions'
|
|
208
|
+
const ROW_CONFIG_KEY = PKG + '#' + ROW_ID
|
|
205
209
|
|
|
206
210
|
const INSTRUCTIONS = {
|
|
207
211
|
codex: {
|
|
@@ -1779,15 +1783,22 @@ const cssId = 'dsh-subscriptions/settings.module.css'
|
|
|
1779
1783
|
// titled header with description and chevron, collapsible, bordered.
|
|
1780
1784
|
function PluginCard(props) {
|
|
1781
1785
|
const t = (props && props.t) || ((key) => key)
|
|
1782
|
-
const
|
|
1783
|
-
|
|
1784
|
-
|
|
1786
|
+
const page = !!(props && props.view === 'page')
|
|
1787
|
+
const [open, setOpen] = React.useState(!!page)
|
|
1788
|
+
// Row seat (plugins.row.config): the host page draws title/icon/crumb and the
|
|
1789
|
+
// padding, so the summary is a one-liner and the page drops our card chrome.
|
|
1790
|
+
if (props && props.view === 'summary') {
|
|
1791
|
+
return React.createElement('div', { className: 'dsub-description' }, t('cardIntro'))
|
|
1792
|
+
}
|
|
1793
|
+
return React.createElement(page ? 'div' : 'li', {
|
|
1794
|
+
className: page ? 'dsub-page' : 'dsub-card' + (open ? ' dsub-cardOpen' : ''),
|
|
1785
1795
|
},
|
|
1786
1796
|
React.createElement('button', {
|
|
1787
1797
|
type: 'button',
|
|
1788
1798
|
className: 'dsub-header',
|
|
1799
|
+
style: page ? { display: 'none' } : undefined,
|
|
1789
1800
|
onClick: () => setOpen(!open),
|
|
1790
|
-
'aria-expanded': open,
|
|
1801
|
+
'aria-expanded': page ? true : open,
|
|
1791
1802
|
},
|
|
1792
1803
|
React.createElement('div', { className: 'dsub-headText' },
|
|
1793
1804
|
React.createElement('div', { className: 'dsub-name' }, t('title')),
|
|
@@ -1795,7 +1806,7 @@ const cssId = 'dsh-subscriptions/settings.module.css'
|
|
|
1795
1806
|
),
|
|
1796
1807
|
React.createElement(Chevron, { className: 'dsub-chev' + (open ? ' dsub-chevOpen' : '') }),
|
|
1797
1808
|
),
|
|
1798
|
-
open ? React.createElement('div', { className: 'dsub-body' },
|
|
1809
|
+
(page || open) ? React.createElement('div', { className: 'dsub-body' },
|
|
1799
1810
|
React.createElement(ErrorBoundary, null, React.createElement(SubsSection, props)),
|
|
1800
1811
|
) : null,
|
|
1801
1812
|
)
|
|
@@ -1827,6 +1838,31 @@ const cssId = 'dsh-subscriptions/settings.module.css'
|
|
|
1827
1838
|
// and collapse instead of a row in the side list. The registration key must
|
|
1828
1839
|
// equal the settings namespace, otherwise the tab silently hides the slot.
|
|
1829
1840
|
try {
|
|
1841
|
+
// Plugin-list seat (plugins.item) first: the seat the current core
|
|
1842
|
+
// (0.1.6-alpha.2) renders as the plugin's own page with its configuration. The
|
|
1843
|
+
// label is a static string on purpose — it is resolved while the page renders,
|
|
1844
|
+
// and a locale lookup there would take the whole client batch down with it.
|
|
1845
|
+
ctx.slots.inject('plugins.item', () => ctx.slots.register(
|
|
1846
|
+
{
|
|
1847
|
+
name: 'plugins.item',
|
|
1848
|
+
id: ROW_ID,
|
|
1849
|
+
order: 60,
|
|
1850
|
+
label: () => 'Subscriptions',
|
|
1851
|
+
locale: NS,
|
|
1852
|
+
inject: () => ({ ctx: ctx }),
|
|
1853
|
+
},
|
|
1854
|
+
PluginCard,
|
|
1855
|
+
))
|
|
1856
|
+
// Row seat and the legacy seat stay as fallbacks.
|
|
1857
|
+
ctx.slots.inject('plugins.row.config', () => ctx.slots.register(
|
|
1858
|
+
{
|
|
1859
|
+
name: 'plugins.row.config',
|
|
1860
|
+
key: ROW_CONFIG_KEY,
|
|
1861
|
+
locale: NS,
|
|
1862
|
+
inject: () => ({ ctx: ctx }),
|
|
1863
|
+
},
|
|
1864
|
+
PluginCard,
|
|
1865
|
+
))
|
|
1830
1866
|
ctx.slots.inject('settings.plugin.item', () => ctx.slots.register(
|
|
1831
1867
|
{
|
|
1832
1868
|
name: 'settings.plugin.item',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-subscriptions",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "Use ChatGPT Codex, Claude, Grok, Antigravity, Kimi, GLM, Cursor, Kiro, Copilot, Qwen, ERNIE, Spark, JetBrains, Perplexity, Replit, and Cody subscriptions as DeepSeek Harness LLM providers via OAuth.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|