@stackonward/cli 1.6.0 → 1.8.0
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/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/resources/components/nuxt/site-source/app/assets/css/site-shell.css +14 -2
- package/dist/resources/components/nuxt/site-source/app/components/content/CallToAction.vue +3 -1
- package/dist/resources/components/nuxt/site-source/app/components/content/Faq.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/content/Reviews.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/steps/Showcase.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/composables/useWebPush.ts +4 -0
- package/dist/resources/components/nuxt/site-source/app/plugins/web-push.ts +52 -0
- package/dist/resources/components/nuxt/site-source/app/theme/button.ts +18 -22
- package/dist/resources/components/nuxt/site-source/app/theme/index.ts +24 -0
- package/dist/resources/components/nuxt/site-source/app/theme/input.ts +32 -17
- package/dist/resources/components/nuxt/site-source/app/theme/modal.ts +1 -1
- package/dist/resources/components/nuxt/site-source/app/theme/select.ts +62 -18
- package/dist/resources/components/nuxt/site-source/app/theme/textarea.ts +73 -1
- package/dist/resources/components/nuxt/site-source/app/web-push/worker.ts +8 -0
- package/dist/resources/components/registry.json +11 -1
- package/dist/resources/registry.json +15 -3
- package/dist/resources/templates/base/{.claude → .codex}/docs/architecture-template.md +1 -1
- package/dist/resources/templates/base/{.claude → .codex}/docs/architecture.md +1 -1
- package/dist/resources/templates/base/{.claude → .codex}/docs/index.md +3 -3
- package/dist/resources/templates/base/{.claude → .codex}/docs/verification.md +1 -1
- package/dist/resources/templates/base/AGENTS.md +24 -24
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/api-design.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/architecture-template.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/check-list.md +3 -3
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/database.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/error-handling.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/index.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/logging.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/mediagen-provider-onboarding-sop.md +2 -2
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/mediagen-provider-quick-reference.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/module-standards.md +1 -1
- package/dist/resources/templates/go-backend/.dockerignore +1 -2
- package/dist/resources/templates/go-backend/AGENTS.md +19 -19
- package/dist/resources/templates/go-backend/README.md +5 -1
- package/dist/resources/templates/go-backend/deployments/onex/product-onboarding.example.json +201 -0
- package/dist/resources/templates/go-backend/docs/onex-notifications.md +85 -0
- package/dist/resources/templates/go-backend/docs/openapi-provenance.json +1 -1
- package/dist/resources/templates/go-backend/docs/runtime-provenance.json +23 -2
- package/dist/resources/templates/go-backend/docs/source-provenance.json +124 -6
- package/dist/resources/templates/go-backend/docs/standards-provenance.json +30 -30
- package/dist/resources/templates/go-backend/internal/common/middleware/cors.go +1 -0
- package/dist/resources/templates/go-backend/internal/common/middleware/middleware_test.go +1 -0
- package/dist/resources/templates/go-backend/internal/core/httpclient/safe_post.go +28 -0
- package/dist/resources/templates/go-backend/internal/core/httpclient/safe_post_test.go +56 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/client.go +453 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/client_test.go +772 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/codec.go +33 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/error.go +146 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/error_notification_test.go +29 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/notification/client.go +132 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/notification/client_test.go +222 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/notification/contracts.go +219 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/resilience.go +23 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/transport_policy.go +96 -0
- package/dist/resources/templates/go-backend/internal/products/README.md +1 -1
- package/dist/resources/templates/go-backend/internal/sharedevents/README.md +1 -1
- package/dist/resources/templates/go-backend/scripts/check-openapi-clean-deletion.sh +3 -3
- package/dist/resources/templates/mcp-server/.prettierignore +1 -0
- package/dist/resources/templates/nuxt/{.claude → .codex}/docs/stack.md +17 -1
- package/dist/resources/templates/nuxt/.dockerignore +1 -1
- package/dist/resources/templates/nuxt/.env.example +6 -0
- package/dist/resources/templates/nuxt/.prettierignore +2 -1
- package/dist/resources/templates/nuxt/DESIGN.md +55 -10
- package/dist/resources/templates/nuxt/README.md +8 -0
- package/dist/resources/templates/nuxt/nuxt.config.ts +13 -1
- package/dist/resources/templates/nuxt/package.json +4 -2
- package/package.json +1 -1
- package/dist/resources/templates/base/CLAUDE.md +0 -437
- package/dist/resources/templates/go-backend/CLAUDE.md +0 -1139
- /package/dist/resources/templates/base/{.claude → .codex}/docs/security-lifecycle.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/e2e-standards.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/event-runtime-boundary.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/identifier-contract.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/openapi-contract.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/payment-gateway-onboarding.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/platform-boundary.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/quality-gates.md +0 -0
- /package/dist/resources/templates/mcp-server/{.claude → .codex}/docs/stack.md +0 -0
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
@import "@nuxt/ui";
|
|
3
3
|
|
|
4
4
|
@theme inline {
|
|
5
|
+
--spacing-control-xs: var(--site-control-height-xs);
|
|
6
|
+
--spacing-control-sm: var(--site-control-height-sm);
|
|
7
|
+
--spacing-control-md: var(--site-control-height-md);
|
|
8
|
+
--spacing-control-lg: var(--site-control-height-lg);
|
|
9
|
+
--spacing-control-xl: var(--site-control-height-xl);
|
|
10
|
+
--spacing-control-2xl: var(--site-control-height-2xl);
|
|
5
11
|
--spacing-icon-xs: var(--site-icon-xs);
|
|
6
12
|
--spacing-icon-sm: var(--site-icon-sm);
|
|
7
13
|
--spacing-icon-md: var(--site-icon-md);
|
|
@@ -36,8 +42,8 @@
|
|
|
36
42
|
--color-dimmed: var(--site-color-dimmed);
|
|
37
43
|
--color-border: var(--site-color-border);
|
|
38
44
|
--color-border-strong: var(--site-color-border-strong);
|
|
39
|
-
--radius-ml:
|
|
40
|
-
--radius-2ml:
|
|
45
|
+
--radius-ml: var(--site-radius-md);
|
|
46
|
+
--radius-2ml: var(--site-radius-lg);
|
|
41
47
|
--shadow-accordion:
|
|
42
48
|
0 4px 16px color-mix(in srgb, var(--site-color-border) 40%, transparent),
|
|
43
49
|
0 11px 24px color-mix(in srgb, var(--site-color-border) 20%, transparent);
|
|
@@ -49,6 +55,12 @@
|
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
:root {
|
|
58
|
+
--site-control-height-xs: 2rem;
|
|
59
|
+
--site-control-height-sm: 2.25rem;
|
|
60
|
+
--site-control-height-md: 2.625rem;
|
|
61
|
+
--site-control-height-lg: 3rem;
|
|
62
|
+
--site-control-height-xl: 3.25rem;
|
|
63
|
+
--site-control-height-2xl: 3.5rem;
|
|
52
64
|
--site-icon-xs: 0.75rem;
|
|
53
65
|
--site-icon-sm: 1rem;
|
|
54
66
|
--site-icon-md: 1.25rem;
|
|
@@ -34,7 +34,9 @@ defineProps<{
|
|
|
34
34
|
{{ description }}
|
|
35
35
|
</p>
|
|
36
36
|
<slot name="action"
|
|
37
|
-
><UiButton :to="to" size="
|
|
37
|
+
><UiButton :to="to" size="2xl" class="min-w-[200px] max-w-full">{{
|
|
38
|
+
buttonLabel
|
|
39
|
+
}}</UiButton></slot
|
|
38
40
|
>
|
|
39
41
|
</div>
|
|
40
42
|
<UiImage
|
|
@@ -46,8 +46,8 @@ const columns = computed(() =>
|
|
|
46
46
|
<UiButton
|
|
47
47
|
v-if="buttonLabel"
|
|
48
48
|
:to="to"
|
|
49
|
-
size="
|
|
50
|
-
class="mx-auto mt-12.5 flex max-md:mt-7.5"
|
|
49
|
+
size="2xl"
|
|
50
|
+
class="w-fit min-w-[200px] max-w-full mx-auto mt-12.5 flex max-md:mt-7.5"
|
|
51
51
|
@click="emit('button-click', $event)"
|
|
52
52
|
>{{ buttonLabel }}</UiButton
|
|
53
53
|
>
|
|
@@ -144,9 +144,9 @@ onMounted(resumeAutoplay);
|
|
|
144
144
|
<slot name="footer">
|
|
145
145
|
<UiButton
|
|
146
146
|
v-if="showButton"
|
|
147
|
-
size="
|
|
147
|
+
size="2xl"
|
|
148
148
|
:label="buttonText"
|
|
149
|
-
class="flex justify-center mt-10 mx-auto max-lg:mt-0"
|
|
149
|
+
class="w-fit min-w-[200px] max-w-full flex justify-center mt-10 mx-auto max-lg:mt-0"
|
|
150
150
|
ripple
|
|
151
151
|
:to="to"
|
|
152
152
|
/>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { State } from "@stackonward/web-push";
|
|
2
|
+
import { createBrowser, initialState } from "@stackonward/web-push";
|
|
3
|
+
import { createWebPushController } from "@stackonward/composables";
|
|
4
|
+
import { createApi, createStorage, readConfig } from "@stackonward/onex-web-push";
|
|
5
|
+
|
|
6
|
+
export default defineNuxtPlugin({
|
|
7
|
+
name: "site:web-push",
|
|
8
|
+
setup(nuxtApp) {
|
|
9
|
+
const runtime = useRuntimeConfig();
|
|
10
|
+
const state = useState<State>("site:web-push", initialState);
|
|
11
|
+
const controller = createWebPushController(state, () => {
|
|
12
|
+
const config = readConfig(
|
|
13
|
+
runtime.public.webPush,
|
|
14
|
+
window.location.origin,
|
|
15
|
+
runtime.app.baseURL,
|
|
16
|
+
runtime.public.api.timeout,
|
|
17
|
+
);
|
|
18
|
+
return {
|
|
19
|
+
enabled: config.enabled,
|
|
20
|
+
api: createApi(config),
|
|
21
|
+
browser: createBrowser(
|
|
22
|
+
{
|
|
23
|
+
origin: config.origin,
|
|
24
|
+
workerUrl: new URL("push-sw.js", new URL(config.basePath, config.origin)).href,
|
|
25
|
+
scope: config.basePath,
|
|
26
|
+
timeout: config.timeout,
|
|
27
|
+
},
|
|
28
|
+
window,
|
|
29
|
+
navigator,
|
|
30
|
+
),
|
|
31
|
+
storage: createStorage(
|
|
32
|
+
{
|
|
33
|
+
databaseName: runtime.public.webPush.databaseName,
|
|
34
|
+
origin: config.origin,
|
|
35
|
+
productCode: config.productCode,
|
|
36
|
+
applicationCode: config.applicationCode,
|
|
37
|
+
},
|
|
38
|
+
window.indexedDB,
|
|
39
|
+
),
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
if (import.meta.client) {
|
|
43
|
+
onNuxtReady(() => {
|
|
44
|
+
void controller.initialize().catch(() => {
|
|
45
|
+
/* 初始化错误已进入状态;网站浏览不依赖推送服务可用。 */
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
nuxtApp.vueApp.onUnmount(() => controller.dispose());
|
|
49
|
+
}
|
|
50
|
+
return { provide: { webPush: controller } };
|
|
51
|
+
},
|
|
52
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
slots: {
|
|
3
|
-
base: "border-0 rounded-ml font-medium
|
|
3
|
+
base: "border-0 rounded-ml font-medium inline-flex items-center justify-center cursor-pointer disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors",
|
|
4
4
|
label: "truncate",
|
|
5
5
|
leadingIcon: "shrink-0",
|
|
6
6
|
leadingAvatar: "shrink-0",
|
|
@@ -13,44 +13,39 @@ export default {
|
|
|
13
13
|
vertical:
|
|
14
14
|
"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none",
|
|
15
15
|
},
|
|
16
|
-
variant: {
|
|
17
|
-
link: "h-auto min-w-0 p-0",
|
|
18
|
-
ghost: "min-w-0",
|
|
19
|
-
},
|
|
20
|
-
color: { neutral: "min-w-0" },
|
|
21
16
|
size: {
|
|
22
17
|
xs: {
|
|
23
|
-
base: "px-3 py-
|
|
18
|
+
base: "px-3 py-0 text-xs/4 h-control-xs gap-1.5",
|
|
24
19
|
leadingIcon: "size-icon-sm",
|
|
25
20
|
leadingAvatarSize: "3xs",
|
|
26
21
|
trailingIcon: "size-icon-sm",
|
|
27
22
|
},
|
|
28
23
|
sm: {
|
|
29
|
-
base: "px-4 py-
|
|
24
|
+
base: "px-4 py-0 text-sm/5 h-control-sm gap-1.5",
|
|
30
25
|
leadingIcon: "size-icon-sm",
|
|
31
26
|
leadingAvatarSize: "3xs",
|
|
32
27
|
trailingIcon: "size-icon-sm",
|
|
33
28
|
},
|
|
34
29
|
md: {
|
|
35
|
-
base: "px-5 py-
|
|
30
|
+
base: "px-5 py-0 text-sm/5 h-control-md gap-2",
|
|
36
31
|
leadingIcon: "size-icon-md",
|
|
37
32
|
leadingAvatarSize: "2xs",
|
|
38
33
|
trailingIcon: "size-icon-md",
|
|
39
34
|
},
|
|
40
35
|
lg: {
|
|
41
|
-
base: "px-6 py-
|
|
36
|
+
base: "px-6 py-0 text-base/6 h-control-lg gap-2",
|
|
42
37
|
leadingIcon: "size-icon-md",
|
|
43
38
|
leadingAvatarSize: "2xs",
|
|
44
39
|
trailingIcon: "size-icon-md",
|
|
45
40
|
},
|
|
46
41
|
xl: {
|
|
47
|
-
base: "px-7 py-
|
|
42
|
+
base: "px-7 py-0 text-lg/7 h-control-xl gap-2",
|
|
48
43
|
leadingIcon: "size-icon-lg",
|
|
49
44
|
leadingAvatarSize: "xs",
|
|
50
45
|
trailingIcon: "size-icon-lg",
|
|
51
46
|
},
|
|
52
47
|
"2xl": {
|
|
53
|
-
base: "px-8 py-
|
|
48
|
+
base: "px-8 py-0 text-lg/7 h-control-2xl gap-2",
|
|
54
49
|
leadingIcon: "size-icon-lg",
|
|
55
50
|
leadingAvatarSize: "sm",
|
|
56
51
|
trailingIcon: "size-icon-lg",
|
|
@@ -77,9 +72,9 @@ export default {
|
|
|
77
72
|
color: "neutral",
|
|
78
73
|
variant: "outline",
|
|
79
74
|
class:
|
|
80
|
-
"border-0 ring-1 ring-inset ring-border bg-surface text-text hover:bg-surface-muted focus-visible:ring-primary focus-visible:outline-
|
|
75
|
+
"border-0 ring-1 ring-inset ring-border bg-surface text-text hover:bg-surface-muted focus-visible:ring-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
81
76
|
},
|
|
82
|
-
{ size: "2xl", square: true, class: "w-
|
|
77
|
+
{ size: "2xl", square: true, class: "w-control-2xl p-0" },
|
|
83
78
|
{
|
|
84
79
|
color: "primary",
|
|
85
80
|
variant: "solid",
|
|
@@ -90,7 +85,7 @@ export default {
|
|
|
90
85
|
color: "primary",
|
|
91
86
|
variant: "outline",
|
|
92
87
|
class:
|
|
93
|
-
"text-primary-hover ring-
|
|
88
|
+
"text-primary-hover ring-1 ring-inset ring-primary hover:bg-primary hover:text-primary-contrast active:transition-none active:ring-primary-hover active:bg-primary-hover active:text-primary-contrast focus:outline-none focus:transition-none focus-visible:ring-2 focus-visible:ring-primary-hover",
|
|
94
89
|
},
|
|
95
90
|
{
|
|
96
91
|
color: "primary",
|
|
@@ -126,7 +121,7 @@ export default {
|
|
|
126
121
|
color: "success",
|
|
127
122
|
variant: "outline",
|
|
128
123
|
class:
|
|
129
|
-
"text-success-hover ring-
|
|
124
|
+
"text-success-hover ring-1 ring-inset ring-success hover:bg-success hover:text-success-contrast active:transition-none active:ring-success-hover active:bg-success-hover active:text-success-contrast focus:outline-none focus:transition-none focus-visible:ring-2 focus-visible:ring-success-hover",
|
|
130
125
|
},
|
|
131
126
|
{
|
|
132
127
|
color: "success",
|
|
@@ -155,27 +150,27 @@ export default {
|
|
|
155
150
|
{
|
|
156
151
|
size: "xs",
|
|
157
152
|
square: true,
|
|
158
|
-
class: "w-
|
|
153
|
+
class: "w-control-xs p-0",
|
|
159
154
|
},
|
|
160
155
|
{
|
|
161
156
|
size: "sm",
|
|
162
157
|
square: true,
|
|
163
|
-
class: "w-
|
|
158
|
+
class: "w-control-sm p-0",
|
|
164
159
|
},
|
|
165
160
|
{
|
|
166
161
|
size: "md",
|
|
167
162
|
square: true,
|
|
168
|
-
class: "w-
|
|
163
|
+
class: "w-control-md p-0",
|
|
169
164
|
},
|
|
170
165
|
{
|
|
171
166
|
size: "lg",
|
|
172
167
|
square: true,
|
|
173
|
-
class: "w-
|
|
168
|
+
class: "w-control-lg p-0",
|
|
174
169
|
},
|
|
175
170
|
{
|
|
176
171
|
size: "xl",
|
|
177
172
|
square: true,
|
|
178
|
-
class: "w-
|
|
173
|
+
class: "w-control-xl p-0",
|
|
179
174
|
},
|
|
180
175
|
{
|
|
181
176
|
loading: true,
|
|
@@ -192,10 +187,11 @@ export default {
|
|
|
192
187
|
trailingIcon: "animate-spin",
|
|
193
188
|
},
|
|
194
189
|
},
|
|
190
|
+
{ variant: "link", class: "h-auto min-w-0 p-0" },
|
|
195
191
|
{ square: true, class: "min-h-11 min-w-11" },
|
|
196
192
|
],
|
|
197
193
|
defaultVariants: {
|
|
198
|
-
color: "
|
|
194
|
+
color: "primary",
|
|
199
195
|
variant: "solid",
|
|
200
196
|
size: "md",
|
|
201
197
|
},
|
|
@@ -16,6 +16,30 @@ import textarea from "./textarea";
|
|
|
16
16
|
import tooltip from "./tooltip";
|
|
17
17
|
|
|
18
18
|
const siteUiTheme = {
|
|
19
|
+
tv: {
|
|
20
|
+
twMergeConfig: {
|
|
21
|
+
extend: {
|
|
22
|
+
theme: {
|
|
23
|
+
radius: ["ml", "2ml"],
|
|
24
|
+
spacing: [
|
|
25
|
+
"control-xs",
|
|
26
|
+
"control-sm",
|
|
27
|
+
"control-md",
|
|
28
|
+
"control-lg",
|
|
29
|
+
"control-xl",
|
|
30
|
+
"control-2xl",
|
|
31
|
+
"icon-xs",
|
|
32
|
+
"icon-sm",
|
|
33
|
+
"icon-md",
|
|
34
|
+
"icon-lg",
|
|
35
|
+
"icon-xl",
|
|
36
|
+
"icon-2xl",
|
|
37
|
+
"icon-3xl",
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
19
43
|
accordion,
|
|
20
44
|
breadcrumb,
|
|
21
45
|
button,
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
slots: {
|
|
3
3
|
root: "w-full ring-border",
|
|
4
|
-
base:
|
|
4
|
+
base: "border-0 rounded-ml bg-surface text-text transition-colors",
|
|
5
5
|
},
|
|
6
6
|
variants: {
|
|
7
7
|
size: {
|
|
8
8
|
xs: {
|
|
9
|
-
base: "px-
|
|
10
|
-
leading: "ps-
|
|
11
|
-
trailing: "pe-
|
|
9
|
+
base: "h-control-xs px-3 py-0 text-xs/4 gap-2",
|
|
10
|
+
leading: "ps-3",
|
|
11
|
+
trailing: "pe-3",
|
|
12
12
|
leadingIcon: "size-icon-sm",
|
|
13
13
|
leadingAvatarSize: "3xs",
|
|
14
14
|
trailingIcon: "size-icon-sm",
|
|
15
15
|
},
|
|
16
16
|
sm: {
|
|
17
|
-
base: "px-
|
|
18
|
-
leading: "ps-
|
|
19
|
-
trailing: "pe-
|
|
17
|
+
base: "h-control-sm px-3 py-0 text-sm/5 gap-2",
|
|
18
|
+
leading: "ps-3",
|
|
19
|
+
trailing: "pe-3",
|
|
20
20
|
leadingIcon: "size-icon-sm",
|
|
21
21
|
leadingAvatarSize: "3xs",
|
|
22
22
|
trailingIcon: "size-icon-sm",
|
|
23
23
|
},
|
|
24
24
|
md: {
|
|
25
|
-
base: "px-
|
|
26
|
-
leading: "ps-
|
|
27
|
-
trailing: "pe-
|
|
25
|
+
base: "h-control-md px-3.5 py-0 text-sm/5 gap-2",
|
|
26
|
+
leading: "ps-3.5",
|
|
27
|
+
trailing: "pe-3.5",
|
|
28
28
|
leadingIcon: "size-icon-md",
|
|
29
29
|
leadingAvatarSize: "2xs",
|
|
30
30
|
trailingIcon: "size-icon-md",
|
|
31
31
|
},
|
|
32
32
|
lg: {
|
|
33
|
-
base: "px-
|
|
34
|
-
leading: "ps-
|
|
35
|
-
trailing: "pe-
|
|
33
|
+
base: "h-control-lg px-4 py-0 text-base/6 gap-2",
|
|
34
|
+
leading: "ps-4",
|
|
35
|
+
trailing: "pe-4",
|
|
36
36
|
leadingIcon: "size-icon-md",
|
|
37
37
|
leadingAvatarSize: "2xs",
|
|
38
38
|
trailingIcon: "size-icon-md",
|
|
39
39
|
},
|
|
40
40
|
xl: {
|
|
41
|
-
base: "px-
|
|
42
|
-
leading: "ps-
|
|
43
|
-
trailing: "pe-
|
|
41
|
+
base: "h-control-xl px-4.5 py-0 text-lg/7 gap-2",
|
|
42
|
+
leading: "ps-4.5",
|
|
43
|
+
trailing: "pe-4.5",
|
|
44
44
|
leadingIcon: "size-icon-lg",
|
|
45
45
|
leadingAvatarSize: "xs",
|
|
46
46
|
trailingIcon: "size-icon-lg",
|
|
@@ -52,8 +52,23 @@ export default {
|
|
|
52
52
|
color: "primary",
|
|
53
53
|
variant: ["outline", "subtle"],
|
|
54
54
|
class:
|
|
55
|
-
"ring-
|
|
55
|
+
"ring-1 ring-inset ring-border focus-visible:ring-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
56
56
|
},
|
|
57
|
+
{ leading: true, size: "xs", class: "ps-9" },
|
|
58
|
+
{ trailing: true, size: "xs", class: "pe-9" },
|
|
59
|
+
{ fixed: false, size: "xs", class: "max-md:text-base md:text-xs" },
|
|
60
|
+
{ leading: true, size: "sm", class: "ps-9" },
|
|
61
|
+
{ trailing: true, size: "sm", class: "pe-9" },
|
|
62
|
+
{ fixed: false, size: "sm", class: "max-md:text-base md:text-sm" },
|
|
63
|
+
{ leading: true, size: "md", class: "ps-10.5" },
|
|
64
|
+
{ trailing: true, size: "md", class: "pe-10.5" },
|
|
65
|
+
{ fixed: false, size: "md", class: "max-md:text-base md:text-sm" },
|
|
66
|
+
{ leading: true, size: "lg", class: "ps-11" },
|
|
67
|
+
{ trailing: true, size: "lg", class: "pe-11" },
|
|
68
|
+
{ fixed: false, size: "lg", class: "max-md:text-base md:text-base" },
|
|
69
|
+
{ leading: true, size: "xl", class: "ps-12.5" },
|
|
70
|
+
{ trailing: true, size: "xl", class: "pe-12.5" },
|
|
71
|
+
{ fixed: false, size: "xl", class: "max-md:text-base md:text-lg" },
|
|
57
72
|
],
|
|
58
73
|
defaultVariants: {
|
|
59
74
|
size: "md",
|
|
@@ -1,31 +1,75 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
slots: {
|
|
3
|
-
base:
|
|
4
|
-
value: "
|
|
5
|
-
placeholder: "text-dimmed
|
|
6
|
-
group: "p-
|
|
7
|
-
content: "border-0 rounded-ml ring-1 ring-border bg-surface
|
|
8
|
-
item: [
|
|
9
|
-
"rounded-ml !py-3.5 !px-2.5 text-muted bg-transparent data-highlighted:text-muted hover:bg-surface data-[state=checked]:bg-surface",
|
|
10
|
-
],
|
|
3
|
+
base: "border-0 rounded-ml bg-surface text-text",
|
|
4
|
+
value: "truncate",
|
|
5
|
+
placeholder: "truncate text-dimmed",
|
|
6
|
+
group: "p-1.5",
|
|
7
|
+
content: "border-0 rounded-ml ring-1 ring-border bg-surface",
|
|
8
|
+
item: "min-h-11 rounded-ml px-3 py-2 text-sm/5 text-text data-highlighted:bg-surface-muted data-[state=checked]:bg-surface-muted",
|
|
11
9
|
trailingIcon:
|
|
12
10
|
"group-data-[state=open]:rotate-180 transition-transform duration-200 text-dimmed",
|
|
13
|
-
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
xs: {
|
|
15
|
+
base: "h-control-xs px-3 py-0 text-xs/4 gap-2",
|
|
16
|
+
leading: "ps-3",
|
|
17
|
+
trailing: "pe-3",
|
|
18
|
+
leadingIcon: "size-icon-sm",
|
|
19
|
+
leadingAvatarSize: "3xs",
|
|
20
|
+
trailingIcon: "size-icon-sm",
|
|
21
|
+
},
|
|
22
|
+
sm: {
|
|
23
|
+
base: "h-control-sm px-3 py-0 text-sm/5 gap-2",
|
|
24
|
+
leading: "ps-3",
|
|
25
|
+
trailing: "pe-3",
|
|
26
|
+
leadingIcon: "size-icon-sm",
|
|
27
|
+
leadingAvatarSize: "3xs",
|
|
28
|
+
trailingIcon: "size-icon-sm",
|
|
29
|
+
},
|
|
30
|
+
md: {
|
|
31
|
+
base: "h-control-md px-3.5 py-0 text-sm/5 gap-2",
|
|
32
|
+
leading: "ps-3.5",
|
|
33
|
+
trailing: "pe-3.5",
|
|
34
|
+
leadingIcon: "size-icon-md",
|
|
35
|
+
leadingAvatarSize: "2xs",
|
|
36
|
+
trailingIcon: "size-icon-md",
|
|
37
|
+
},
|
|
38
|
+
lg: {
|
|
39
|
+
base: "h-control-lg px-4 py-0 text-base/6 gap-2",
|
|
40
|
+
leading: "ps-4",
|
|
41
|
+
trailing: "pe-4",
|
|
42
|
+
leadingIcon: "size-icon-md",
|
|
43
|
+
leadingAvatarSize: "2xs",
|
|
44
|
+
trailingIcon: "size-icon-md",
|
|
45
|
+
},
|
|
46
|
+
xl: {
|
|
47
|
+
base: "h-control-xl px-4.5 py-0 text-lg/7 gap-2",
|
|
48
|
+
leading: "ps-4.5",
|
|
49
|
+
trailing: "pe-4.5",
|
|
50
|
+
leadingIcon: "size-icon-lg",
|
|
51
|
+
leadingAvatarSize: "xs",
|
|
52
|
+
trailingIcon: "size-icon-lg",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
14
55
|
},
|
|
15
56
|
compoundVariants: [
|
|
16
57
|
{
|
|
17
58
|
color: "primary",
|
|
18
59
|
variant: ["outline", "subtle"],
|
|
19
|
-
class:
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
leading: true,
|
|
23
|
-
class: { value: "ps-10", placeholder: "ps-10" },
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
trailing: true,
|
|
27
|
-
class: { value: "pe-10", placeholder: "pe-10" },
|
|
60
|
+
class:
|
|
61
|
+
"ring-1 ring-inset ring-border focus-visible:ring-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
28
62
|
},
|
|
63
|
+
{ leading: true, size: "xs", class: "ps-9" },
|
|
64
|
+
{ trailing: true, size: "xs", class: "pe-9" },
|
|
65
|
+
{ leading: true, size: "sm", class: "ps-9" },
|
|
66
|
+
{ trailing: true, size: "sm", class: "pe-9" },
|
|
67
|
+
{ leading: true, size: "md", class: "ps-10.5" },
|
|
68
|
+
{ trailing: true, size: "md", class: "pe-10.5" },
|
|
69
|
+
{ leading: true, size: "lg", class: "ps-11" },
|
|
70
|
+
{ trailing: true, size: "lg", class: "pe-11" },
|
|
71
|
+
{ leading: true, size: "xl", class: "ps-12.5" },
|
|
72
|
+
{ trailing: true, size: "xl", class: "pe-12.5" },
|
|
29
73
|
],
|
|
30
74
|
defaultVariants: {
|
|
31
75
|
size: "md",
|
|
@@ -1,6 +1,78 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
slots: {
|
|
3
3
|
root: "w-full",
|
|
4
|
-
base: "w-full border-0 rounded-ml bg-surface
|
|
4
|
+
base: "w-full border-0 rounded-ml bg-surface text-text placeholder:text-dimmed transition-colors",
|
|
5
|
+
},
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
xs: {
|
|
9
|
+
base: "px-3 py-1.5 text-xs/4 gap-2",
|
|
10
|
+
leading: "ps-3",
|
|
11
|
+
trailing: "pe-3",
|
|
12
|
+
leadingIcon: "size-icon-sm",
|
|
13
|
+
leadingAvatarSize: "3xs",
|
|
14
|
+
trailingIcon: "size-icon-sm",
|
|
15
|
+
},
|
|
16
|
+
sm: {
|
|
17
|
+
base: "px-3 py-2 text-sm/5 gap-2",
|
|
18
|
+
leading: "ps-3",
|
|
19
|
+
trailing: "pe-3",
|
|
20
|
+
leadingIcon: "size-icon-sm",
|
|
21
|
+
leadingAvatarSize: "3xs",
|
|
22
|
+
trailingIcon: "size-icon-sm",
|
|
23
|
+
},
|
|
24
|
+
md: {
|
|
25
|
+
base: "px-3.5 py-2.5 text-sm/5 gap-2",
|
|
26
|
+
leading: "ps-3.5",
|
|
27
|
+
trailing: "pe-3.5",
|
|
28
|
+
leadingIcon: "size-icon-md",
|
|
29
|
+
leadingAvatarSize: "2xs",
|
|
30
|
+
trailingIcon: "size-icon-md",
|
|
31
|
+
},
|
|
32
|
+
lg: {
|
|
33
|
+
base: "px-4 py-3 text-base/6 gap-2",
|
|
34
|
+
leading: "ps-4",
|
|
35
|
+
trailing: "pe-4",
|
|
36
|
+
leadingIcon: "size-icon-md",
|
|
37
|
+
leadingAvatarSize: "2xs",
|
|
38
|
+
trailingIcon: "size-icon-md",
|
|
39
|
+
},
|
|
40
|
+
xl: {
|
|
41
|
+
base: "px-4.5 py-3 text-lg/7 gap-2",
|
|
42
|
+
leading: "ps-4.5",
|
|
43
|
+
trailing: "pe-4.5",
|
|
44
|
+
leadingIcon: "size-icon-lg",
|
|
45
|
+
leadingAvatarSize: "xs",
|
|
46
|
+
trailingIcon: "size-icon-lg",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
compoundVariants: [
|
|
51
|
+
{
|
|
52
|
+
color: "primary",
|
|
53
|
+
variant: ["outline", "subtle"],
|
|
54
|
+
class:
|
|
55
|
+
"ring-1 ring-inset ring-border focus-visible:ring-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
56
|
+
},
|
|
57
|
+
{ leading: true, size: "xs", class: "ps-9" },
|
|
58
|
+
{ trailing: true, size: "xs", class: "pe-9" },
|
|
59
|
+
{ fixed: false, size: "xs", class: "max-md:text-base md:text-xs" },
|
|
60
|
+
{ leading: true, size: "sm", class: "ps-9" },
|
|
61
|
+
{ trailing: true, size: "sm", class: "pe-9" },
|
|
62
|
+
{ fixed: false, size: "sm", class: "max-md:text-base md:text-sm" },
|
|
63
|
+
{ leading: true, size: "md", class: "ps-10.5" },
|
|
64
|
+
{ trailing: true, size: "md", class: "pe-10.5" },
|
|
65
|
+
{ fixed: false, size: "md", class: "max-md:text-base md:text-sm" },
|
|
66
|
+
{ leading: true, size: "lg", class: "ps-11" },
|
|
67
|
+
{ trailing: true, size: "lg", class: "pe-11" },
|
|
68
|
+
{ fixed: false, size: "lg", class: "max-md:text-base md:text-base" },
|
|
69
|
+
{ leading: true, size: "xl", class: "ps-12.5" },
|
|
70
|
+
{ trailing: true, size: "xl", class: "pe-12.5" },
|
|
71
|
+
{ fixed: false, size: "xl", class: "max-md:text-base md:text-lg" },
|
|
72
|
+
],
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
size: "md",
|
|
75
|
+
color: "primary",
|
|
76
|
+
variant: "outline",
|
|
5
77
|
},
|
|
6
78
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WorkerScope } from "@stackonward/web-push/worker";
|
|
2
|
+
import { installWorker } from "@stackonward/web-push/worker";
|
|
3
|
+
import { decodeMessage } from "@stackonward/onex-web-push";
|
|
4
|
+
|
|
5
|
+
declare const self: WorkerScope;
|
|
6
|
+
|
|
7
|
+
// 产品拥有品牌兜底文案;运行时实现通过公开包消费。
|
|
8
|
+
installWorker(self, { fallbackTitle: "Website notification", decode: decodeMessage });
|
|
@@ -147,6 +147,12 @@
|
|
|
147
147
|
"description": "Editable Nuxt product-site source: site shell, app shell, content shell, UI primitives, composables, plugins, theme tokens, and CSS.",
|
|
148
148
|
"installContext": "template",
|
|
149
149
|
"files": [
|
|
150
|
+
{ "path": "site-source/app/plugins/web-push.ts", "target": "app/plugins/web-push.ts" },
|
|
151
|
+
{
|
|
152
|
+
"path": "site-source/app/composables/useWebPush.ts",
|
|
153
|
+
"target": "app/composables/useWebPush.ts"
|
|
154
|
+
},
|
|
155
|
+
{ "path": "site-source/app/web-push/worker.ts", "target": "app/web-push/worker.ts" },
|
|
150
156
|
{
|
|
151
157
|
"path": "site-source/app/app.vue",
|
|
152
158
|
"target": "app/app.vue"
|
|
@@ -468,7 +474,11 @@
|
|
|
468
474
|
"target": "app/theme/tooltip.ts"
|
|
469
475
|
}
|
|
470
476
|
],
|
|
471
|
-
"dependencies": [
|
|
477
|
+
"dependencies": [
|
|
478
|
+
"@stackonward/composables",
|
|
479
|
+
"@stackonward/web-push",
|
|
480
|
+
"@stackonward/onex-web-push"
|
|
481
|
+
],
|
|
472
482
|
"devDependencies": [],
|
|
473
483
|
"registryDependencies": [],
|
|
474
484
|
"framework": "nuxt",
|
|
@@ -5,6 +5,18 @@
|
|
|
5
5
|
"type": "npm",
|
|
6
6
|
"version": "^0.0.3"
|
|
7
7
|
},
|
|
8
|
+
"@stackonward/web-push": {
|
|
9
|
+
"name": "@stackonward/web-push",
|
|
10
|
+
"description": "Provider-neutral browser Web Push and worker primitives",
|
|
11
|
+
"type": "npm",
|
|
12
|
+
"version": "^0.0.1"
|
|
13
|
+
},
|
|
14
|
+
"@stackonward/onex-web-push": {
|
|
15
|
+
"name": "@stackonward/onex-web-push",
|
|
16
|
+
"description": "OneX anonymous Web Push protocol and recovery storage adapters",
|
|
17
|
+
"type": "npm",
|
|
18
|
+
"version": "^0.0.1"
|
|
19
|
+
},
|
|
8
20
|
"@stackonward/analytics-core": {
|
|
9
21
|
"name": "@stackonward/analytics-core",
|
|
10
22
|
"description": "Provider-neutral analytics pipeline and browser autocapture",
|
|
@@ -21,7 +33,7 @@
|
|
|
21
33
|
"name": "@stackonward/cli",
|
|
22
34
|
"description": "StackOnward project and resource CLI",
|
|
23
35
|
"type": "npm",
|
|
24
|
-
"version": "^1.
|
|
36
|
+
"version": "^1.8.0"
|
|
25
37
|
},
|
|
26
38
|
"@stackonward/cms-client": {
|
|
27
39
|
"name": "@stackonward/cms-client",
|
|
@@ -45,7 +57,7 @@
|
|
|
45
57
|
"name": "@stackonward/composables",
|
|
46
58
|
"description": "Headless Vue composables",
|
|
47
59
|
"type": "npm",
|
|
48
|
-
"version": "^0.0
|
|
60
|
+
"version": "^0.1.0"
|
|
49
61
|
},
|
|
50
62
|
"@stackonward/device-fingerprint": {
|
|
51
63
|
"name": "@stackonward/device-fingerprint",
|
|
@@ -111,7 +123,7 @@
|
|
|
111
123
|
"name": "@stackonward/nuxt-site-shell",
|
|
112
124
|
"description": "Brand-free Nuxt product-site shell",
|
|
113
125
|
"type": "layer",
|
|
114
|
-
"version": "^0.
|
|
126
|
+
"version": "^0.4.0"
|
|
115
127
|
},
|
|
116
128
|
"@stackonward/onex-cms-client": {
|
|
117
129
|
"name": "@stackonward/onex-cms-client",
|