@starci/grammar 0.4.3 → 0.4.4
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/common/registry.d.ts +2 -2
- package/dist/common/styles.css +542 -9
- package/dist/core/branch/MarkdownArticle/classNames.d.ts +9 -4
- package/dist/core/branch/MarkdownArticle/classNames.d.ts.map +1 -1
- package/dist/core/branch/MarkdownArticle/classNames.js +9 -4
- package/dist/core/branch/MarkdownArticle/classNames.js.map +1 -1
- package/dist/core/branch/Rail/classNames.d.ts +8 -4
- package/dist/core/branch/Rail/classNames.d.ts.map +1 -1
- package/dist/core/branch/Rail/classNames.js +8 -4
- package/dist/core/branch/Rail/classNames.js.map +1 -1
- package/dist/core/branch/Rail/index.d.ts.map +1 -1
- package/dist/core/branch/Rail/index.js +1 -2
- package/dist/core/branch/Rail/index.js.map +1 -1
- package/dist/core/branch/Subnav/classNames.d.ts +14 -7
- package/dist/core/branch/Subnav/classNames.d.ts.map +1 -1
- package/dist/core/branch/Subnav/classNames.js +14 -7
- package/dist/core/branch/Subnav/classNames.js.map +1 -1
- package/dist/core/branch/Subnav/index.d.ts.map +1 -1
- package/dist/core/branch/Subnav/index.js +2 -2
- package/dist/core/branch/Subnav/index.js.map +1 -1
- package/dist/core/branch/SurfaceAccordionCard/classNames.d.ts +16 -8
- package/dist/core/branch/SurfaceAccordionCard/classNames.d.ts.map +1 -1
- package/dist/core/branch/SurfaceAccordionCard/classNames.js +17 -9
- package/dist/core/branch/SurfaceAccordionCard/classNames.js.map +1 -1
- package/dist/core/branch/SurfaceAccordionCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceAccordionCard/index.js +1 -1
- package/dist/core/branch/SurfaceAccordionCard/index.js.map +1 -1
- package/dist/core/branch/SurfaceCard/classNames.d.ts +16 -7
- package/dist/core/branch/SurfaceCard/classNames.d.ts.map +1 -1
- package/dist/core/branch/SurfaceCard/classNames.js +17 -8
- package/dist/core/branch/SurfaceCard/classNames.js.map +1 -1
- package/dist/core/branch/SurfaceCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceCard/index.js +6 -2
- package/dist/core/branch/SurfaceCard/index.js.map +1 -1
- package/dist/core/branch/SurfaceListCard/classNames.d.ts +14 -7
- package/dist/core/branch/SurfaceListCard/classNames.d.ts.map +1 -1
- package/dist/core/branch/SurfaceListCard/classNames.js +14 -7
- package/dist/core/branch/SurfaceListCard/classNames.js.map +1 -1
- package/dist/core/branch/SurfaceListCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceListCard/index.js +2 -2
- package/dist/core/branch/SurfaceListCard/index.js.map +1 -1
- package/dist/core/classNames.d.ts +3 -5
- package/dist/core/classNames.d.ts.map +1 -1
- package/dist/core/classNames.js +3 -5
- package/dist/core/classNames.js.map +1 -1
- package/dist/core/composite/EmptyNotice/index.js +1 -1
- package/dist/core/composite/EmptyNotice/index.js.map +1 -1
- package/dist/core/composition/ChatWorkspace/classNames.d.ts +16 -9
- package/dist/core/composition/ChatWorkspace/classNames.d.ts.map +1 -1
- package/dist/core/composition/ChatWorkspace/classNames.js +21 -14
- package/dist/core/composition/ChatWorkspace/classNames.js.map +1 -1
- package/dist/core/composition/NavigationFeatureNav/classNames.d.ts +13 -8
- package/dist/core/composition/NavigationFeatureNav/classNames.d.ts.map +1 -1
- package/dist/core/composition/NavigationFeatureNav/classNames.js +13 -8
- package/dist/core/composition/NavigationFeatureNav/classNames.js.map +1 -1
- package/dist/core/composition/NavigationFeatureNav/index.d.ts +16 -2
- package/dist/core/composition/NavigationFeatureNav/index.d.ts.map +1 -1
- package/dist/core/composition/NavigationFeatureNav/index.js +2 -2
- package/dist/core/composition/NavigationFeatureNav/index.js.map +1 -1
- package/dist/core/composition/PrimaryRailLayout/index.d.ts +7 -1
- package/dist/core/composition/PrimaryRailLayout/index.d.ts.map +1 -1
- package/dist/core/composition/PrimaryRailLayout/index.js +1 -1
- package/dist/core/composition/PrimaryRailLayout/index.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/primitive/Button/index.d.ts +10 -0
- package/dist/core/primitive/Button/index.d.ts.map +1 -1
- package/dist/core/primitive/Button/index.js +3 -3
- package/dist/core/primitive/Button/index.js.map +1 -1
- package/dist/core/primitive/Divider/index.js +1 -1
- package/dist/core/primitive/Divider/index.js.map +1 -1
- package/dist/core/primitive/Icon/index.d.ts.map +1 -1
- package/dist/core/primitive/Icon/index.js +8 -7
- package/dist/core/primitive/Icon/index.js.map +1 -1
- package/dist/core/primitive/IconButton/index.d.ts.map +1 -1
- package/dist/core/primitive/IconButton/index.js +7 -5
- package/dist/core/primitive/IconButton/index.js.map +1 -1
- package/dist/core/primitive/IconTile/index.d.ts.map +1 -1
- package/dist/core/primitive/IconTile/index.js +7 -12
- package/dist/core/primitive/IconTile/index.js.map +1 -1
- package/dist/core/primitive/Input/index.d.ts.map +1 -1
- package/dist/core/primitive/Input/index.js +4 -4
- package/dist/core/primitive/Input/index.js.map +1 -1
- package/dist/core/primitive/Label/classNames.d.ts +10 -6
- package/dist/core/primitive/Label/classNames.d.ts.map +1 -1
- package/dist/core/primitive/Label/classNames.js +10 -6
- package/dist/core/primitive/Label/classNames.js.map +1 -1
- package/dist/core/primitive/Label/index.js +1 -1
- package/dist/core/primitive/Label/index.js.map +1 -1
- package/dist/core/primitive/Progress/index.d.ts.map +1 -1
- package/dist/core/primitive/Progress/index.js +6 -2
- package/dist/core/primitive/Progress/index.js.map +1 -1
- package/dist/core/primitive/Text/index.d.ts +8 -1
- package/dist/core/primitive/Text/index.d.ts.map +1 -1
- package/dist/core/primitive/Text/index.js +16 -20
- package/dist/core/primitive/Text/index.js.map +1 -1
- package/dist/core/primitive/TextAction/index.d.ts.map +1 -1
- package/dist/core/primitive/TextAction/index.js +24 -23
- package/dist/core/primitive/TextAction/index.js.map +1 -1
- package/dist/core/primitive/actionStyles.d.ts +10 -2
- package/dist/core/primitive/actionStyles.d.ts.map +1 -1
- package/dist/core/primitive/actionStyles.js +10 -18
- package/dist/core/primitive/actionStyles.js.map +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import { Spinner, skeletonVariants } from "@heroui/react";
|
|
|
4
4
|
import { useRef } from "react";
|
|
5
5
|
import { getActionClassName } from "../actionStyles.js";
|
|
6
6
|
const SKELETON_CLASS_NAME = skeletonVariants({ animationType: "shimmer" }).base({
|
|
7
|
-
className: "
|
|
7
|
+
className: "starci-core-text-action-resting",
|
|
8
8
|
});
|
|
9
9
|
const FONT_RULE_BY_SIZE = {
|
|
10
10
|
xs: "FONT-1",
|
|
@@ -12,12 +12,11 @@ const FONT_RULE_BY_SIZE = {
|
|
|
12
12
|
md: "FONT-3",
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* Padding rule ids per appearance, from
|
|
16
|
-
* Each side is matched against padding.md's `## Scale` via the
|
|
17
|
-
*
|
|
18
|
-
* PADDING-
|
|
19
|
-
* inline
|
|
20
|
-
* `muted`, `disclosure` and `plain` add no inset class.
|
|
15
|
+
* Padding rule ids per appearance, from the shipped `.starci-core-text-action`
|
|
16
|
+
* appearance rules. Each side is matched against padding.md's `## Scale` via the
|
|
17
|
+
* axis-variant rule: choice is PADDING-2 inline / PADDING-1 block; route and
|
|
18
|
+
* section are PADDING-3 inline / PADDING-2 block; tab is PADDING-3 block only.
|
|
19
|
+
* `inline`, `muted`, `disclosure` and `plain` draw no inset.
|
|
21
20
|
*/
|
|
22
21
|
const PADDING_RULES_BY_APPEARANCE = {
|
|
23
22
|
choice: ["PADDING-2", "PADDING-1"],
|
|
@@ -26,11 +25,12 @@ const PADDING_RULES_BY_APPEARANCE = {
|
|
|
26
25
|
tab: ["PADDING-3"],
|
|
27
26
|
};
|
|
28
27
|
/**
|
|
29
|
-
* Tone rule ids per appearance, from
|
|
30
|
-
* matched against tone.md `## Scale`. `choice`, `route` and
|
|
31
|
-
* accent-soft foreground (TONE-3) only
|
|
32
|
-
* the already-known `isCurrent` prop.
|
|
33
|
-
* which tone.md does not
|
|
28
|
+
* Tone rule ids per appearance, from the shipped `.starci-core-text-action`
|
|
29
|
+
* appearance rules, matched against tone.md `## Scale`. `choice`, `route` and
|
|
30
|
+
* `section` swap to the accent-soft foreground (TONE-3) only at
|
|
31
|
+
* `data-current="true"`, mirrored here from the already-known `isCurrent` prop.
|
|
32
|
+
* `tab`'s current-state colour is the accent itself, which tone.md does not
|
|
33
|
+
* publish, so that state stays unclaimed.
|
|
34
34
|
*/
|
|
35
35
|
const getToneRule = (appearance, isCurrent) => {
|
|
36
36
|
switch (appearance) {
|
|
@@ -45,7 +45,7 @@ const getToneRule = (appearance, isCurrent) => {
|
|
|
45
45
|
case "route":
|
|
46
46
|
return isCurrent ? "TONE-3" : "TONE-2";
|
|
47
47
|
case "tab":
|
|
48
|
-
// Current state renders
|
|
48
|
+
// Current state renders the accent itself, which tone.md does not publish.
|
|
49
49
|
return isCurrent ? undefined : "TONE-2";
|
|
50
50
|
case "disclosure":
|
|
51
51
|
return "TONE-3";
|
|
@@ -53,17 +53,17 @@ const getToneRule = (appearance, isCurrent) => {
|
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
55
|
* Rule ids this element can claim from actionStyles.ts's shared recipe.
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
56
|
+
* The always-present 0.5rem gap matches gap.md's scale directly (GAP-2), and the
|
|
57
|
+
* content width matches measure.md's MEASURE-3 (Content width) catalog entry.
|
|
58
|
+
* Size selects the FONT-1/2/3 row. Appearance (with `isCurrent`) selects the tone
|
|
59
|
+
* row and any padding rows. Medium/semibold weight, the pill and section corners,
|
|
60
|
+
* and the `tab` underline/border carry no rule id in their topic files and stay
|
|
61
|
+
* unclaimed.
|
|
62
62
|
*/
|
|
63
63
|
/**
|
|
64
|
-
* `choice`, `route` and `section` swap to
|
|
65
|
-
* pairing with the same
|
|
66
|
-
* surface.md's SURFACE-4 catalog entry exactly.
|
|
64
|
+
* `choice`, `route` and `section` swap to the accent-soft surface only at
|
|
65
|
+
* `data-current="true"`, pairing with the same accent-soft foreground as TONE-3.
|
|
66
|
+
* That pair matches surface.md's SURFACE-4 catalog entry exactly.
|
|
67
67
|
*/
|
|
68
68
|
const CURRENT_SURFACE_APPEARANCES = new Set(["choice", "route", "section"]);
|
|
69
69
|
const getActionContract = (appearance, size, isCurrent) => {
|
|
@@ -91,8 +91,9 @@ export const TextAction = (props) => {
|
|
|
91
91
|
"data-current": isCurrent ? "true" : "false",
|
|
92
92
|
"data-action-pending": isPending ? "true" : "false",
|
|
93
93
|
"aria-busy": isPending || undefined,
|
|
94
|
+
"data-size": size,
|
|
94
95
|
"data-contract": getActionContract(appearance, size, isCurrent),
|
|
95
|
-
className: getActionClassName(
|
|
96
|
+
className: getActionClassName(),
|
|
96
97
|
};
|
|
97
98
|
const content = (_jsxs(_Fragment, { children: [isPending ? _jsx(Spinner, { size: "sm", color: "current", "aria-hidden": "true" }) : startContent, _jsx("span", { children: children }), isPending ? null : endContent] }));
|
|
98
99
|
if (props.href !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/primitive/TextAction/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAA8C,MAAM,oBAAoB,CAAA;AA6CnG,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC;IAC5E,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/primitive/TextAction/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,M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AAC,CAAA"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export type ActionAppearance = "inline" | "muted" | "choice" | "route" | "tab" | "section" | "disclosure" | "plain";
|
|
2
2
|
export type ActionTextSize = "xs" | "sm" | "md";
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* One typography/selection recipe shared by native links and text-styled actions.
|
|
5
|
+
*
|
|
6
|
+
* The recipe itself is SHIPPED: `.starci-core-text-action` in `src/common/styles.css` reads
|
|
7
|
+
* `data-appearance`, `data-size` and `data-current` from the element, so every appearance - its
|
|
8
|
+
* scale, corner, inset, tone and current-state surface - exists without a consumer's Tailwind build
|
|
9
|
+
* scanning this package. `group` stays here as the marker a descendant `Text` selects its
|
|
10
|
+
* selected-parent accent through; it is a hook, not a utility, and emits nothing on its own.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getActionClassName: () => string;
|
|
5
13
|
//# sourceMappingURL=actionStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionStyles.d.ts","sourceRoot":"","sources":["../../../src/core/primitive/actionStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actionStyles.d.ts","sourceRoot":"","sources":["../../../src/core/primitive/actionStyles.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,CAAA;AACnH,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,cAAwC,CAAA"}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
route: "rounded-full px-3 py-2 text-muted data-[current=true]:bg-accent-soft data-[current=true]:font-semibold data-[current=true]:text-accent-soft-foreground",
|
|
12
|
-
tab: "border-b-2 border-transparent py-3 text-muted data-[current=true]:border-accent data-[current=true]:font-semibold data-[current=true]:text-accent",
|
|
13
|
-
section: "rounded-large px-3 py-2 text-foreground hover:bg-default focus-visible:bg-default data-[current=true]:bg-accent-soft data-[current=true]:font-semibold data-[current=true]:text-accent-soft-foreground",
|
|
14
|
-
disclosure: "font-semibold text-accent-soft-foreground underline-offset-4 hover:underline focus-visible:underline",
|
|
15
|
-
plain: "text-foreground no-underline",
|
|
16
|
-
};
|
|
17
|
-
/** One typography/selection recipe shared by native links and text-styled actions. */
|
|
18
|
-
export const getActionClassName = (appearance, size) => cn("group inline-flex w-fit min-w-0 shrink-0 items-center gap-2 outline-none", "disabled:cursor-default disabled:opacity-50", SIZE_CLASS_NAMES[size], APPEARANCE_CLASS_NAMES[appearance]);
|
|
1
|
+
/**
|
|
2
|
+
* One typography/selection recipe shared by native links and text-styled actions.
|
|
3
|
+
*
|
|
4
|
+
* The recipe itself is SHIPPED: `.starci-core-text-action` in `src/common/styles.css` reads
|
|
5
|
+
* `data-appearance`, `data-size` and `data-current` from the element, so every appearance - its
|
|
6
|
+
* scale, corner, inset, tone and current-state surface - exists without a consumer's Tailwind build
|
|
7
|
+
* scanning this package. `group` stays here as the marker a descendant `Text` selects its
|
|
8
|
+
* selected-parent accent through; it is a hook, not a utility, and emits nothing on its own.
|
|
9
|
+
*/
|
|
10
|
+
export const getActionClassName = () => "group starci-core-text-action";
|
|
19
11
|
//# sourceMappingURL=actionStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionStyles.js","sourceRoot":"","sources":["../../../src/core/primitive/actionStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actionStyles.js","sourceRoot":"","sources":["../../../src/core/primitive/actionStyles.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,+BAA+B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starci/grammar",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Reusable StarCi React components, compositions, and packaged visual DNA.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"starci",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "node scripts/clean.mjs && tsc -p tsconfig.build.json && node scripts/copy-css.mjs",
|
|
57
57
|
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
58
|
-
"test": "npm run build && node --test src/common/index.test.mjs src/core/index.test.mjs src/package-boundary.test.mjs && vitest run --config vitest.config.ts src/shipped-geometry.spec.ts src/common/conformance.spec.ts src/common/styles.spec.ts src/core/family.spec.tsx src/core/styles.spec.ts src/core/surface-card-family.spec.tsx src/core/scrollable-surfaces.spec.tsx src/core/primitive/Badge/index.spec.tsx src/core/primitive/Button/index.spec.tsx src/core/primitive/Divider/index.spec.tsx src/core/primitive/Heading/index.spec.tsx src/core/primitive/Icon/index.spec.tsx src/core/primitive/IconButton/index.spec.tsx src/core/primitive/IconTile/index.spec.tsx src/core/primitive/Input/index.spec.tsx src/core/primitive/PressableField/index.spec.tsx src/core/primitive/Progress/index.spec.tsx src/core/primitive/Text/index.spec.tsx src/core/primitive/TextAction/index.spec.tsx src/core/primitive/Label/index.spec.tsx src/core/primitive/RankArtwork/index.spec.tsx src/core/composite/EmptyNotice/index.spec.tsx src/core/branch/Tabs/index.spec.tsx src/core/branch/Subnav/index.spec.tsx src/core/branch/Tooltip/index.spec.tsx src/core/composition/NavigationFeatureNav/index.spec.tsx src/core/composition/NavigationFeatureNav/styles.spec.ts src/core/composition/Sidebar/index.spec.tsx src/core/composition/Sidebar/styles.spec.ts src/core/composition/WorkspaceShell/index.spec.tsx src/core/composition/ChatWorkspace/index.spec.tsx src/heritage/index.spec.tsx src/heritage/styles.spec.ts src/offset-pop/index.spec.tsx src/offset-pop/render.spec.tsx src/offset-pop/styles.spec.ts",
|
|
58
|
+
"test": "npm run build && node --test src/common/index.test.mjs src/core/index.test.mjs src/package-boundary.test.mjs && vitest run --config vitest.config.ts src/shipped-geometry.spec.ts src/core/shipped-claims.spec.tsx src/common/conformance.spec.ts src/common/styles.spec.ts src/core/family.spec.tsx src/core/styles.spec.ts src/core/surface-card-family.spec.tsx src/core/scrollable-surfaces.spec.tsx src/core/primitive/Badge/index.spec.tsx src/core/primitive/Button/index.spec.tsx src/core/primitive/Divider/index.spec.tsx src/core/primitive/Heading/index.spec.tsx src/core/primitive/Icon/index.spec.tsx src/core/primitive/IconButton/index.spec.tsx src/core/primitive/IconTile/index.spec.tsx src/core/primitive/Input/index.spec.tsx src/core/primitive/PressableField/index.spec.tsx src/core/primitive/Progress/index.spec.tsx src/core/primitive/Text/index.spec.tsx src/core/primitive/TextAction/index.spec.tsx src/core/primitive/Label/index.spec.tsx src/core/primitive/RankArtwork/index.spec.tsx src/core/composite/EmptyNotice/index.spec.tsx src/core/branch/Tabs/index.spec.tsx src/core/branch/Subnav/index.spec.tsx src/core/branch/Tooltip/index.spec.tsx src/core/composition/NavigationFeatureNav/index.spec.tsx src/core/composition/NavigationFeatureNav/styles.spec.ts src/core/composition/Sidebar/index.spec.tsx src/core/composition/Sidebar/styles.spec.ts src/core/composition/WorkspaceShell/index.spec.tsx src/core/composition/ChatWorkspace/index.spec.tsx src/heritage/index.spec.tsx src/heritage/styles.spec.ts src/offset-pop/index.spec.tsx src/offset-pop/render.spec.tsx src/offset-pop/styles.spec.ts",
|
|
59
59
|
"prepack": "npm run typecheck && npm test"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|