@loworbitstudio/visor 1.27.0 → 1.29.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/CHANGELOG.json +19 -1
- package/dist/index.js +179 -1
- package/dist/registry.json +107 -17
- package/dist/visor-manifest.json +391 -7
- package/package.json +2 -2
package/dist/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.4.0",
|
|
3
|
-
"generated_at": "2026-09-
|
|
3
|
+
"generated_at": "2026-09-24T04:59:55.147Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"accessibility-specimen": {
|
|
6
6
|
"changeType": "current",
|
|
@@ -362,6 +362,12 @@
|
|
|
362
362
|
"breakingChange": false,
|
|
363
363
|
"migrationNote": null
|
|
364
364
|
},
|
|
365
|
+
"inline-edit": {
|
|
366
|
+
"changeType": "current",
|
|
367
|
+
"files": [],
|
|
368
|
+
"breakingChange": false,
|
|
369
|
+
"migrationNote": null
|
|
370
|
+
},
|
|
365
371
|
"input": {
|
|
366
372
|
"changeType": "current",
|
|
367
373
|
"files": [],
|
|
@@ -506,6 +512,12 @@
|
|
|
506
512
|
"breakingChange": false,
|
|
507
513
|
"migrationNote": null
|
|
508
514
|
},
|
|
515
|
+
"save-status": {
|
|
516
|
+
"changeType": "current",
|
|
517
|
+
"files": [],
|
|
518
|
+
"breakingChange": false,
|
|
519
|
+
"migrationNote": null
|
|
520
|
+
},
|
|
509
521
|
"score-indicator": {
|
|
510
522
|
"changeType": "current",
|
|
511
523
|
"files": [],
|
|
@@ -740,6 +752,12 @@
|
|
|
740
752
|
"breakingChange": false,
|
|
741
753
|
"migrationNote": null
|
|
742
754
|
},
|
|
755
|
+
"tin-input": {
|
|
756
|
+
"changeType": "current",
|
|
757
|
+
"files": [],
|
|
758
|
+
"breakingChange": false,
|
|
759
|
+
"migrationNote": null
|
|
760
|
+
},
|
|
743
761
|
"toast": {
|
|
744
762
|
"changeType": "current",
|
|
745
763
|
"files": [],
|
package/dist/index.js
CHANGED
|
@@ -8759,6 +8759,7 @@ function spawnCommand(cwd, options) {
|
|
|
8759
8759
|
// src/commands/render.ts
|
|
8760
8760
|
import { existsSync as existsSync31, mkdirSync as mkdirSync14, readFileSync as readFileSync33 } from "fs";
|
|
8761
8761
|
import { dirname as dirname15, isAbsolute as isAbsolute7, resolve as resolve21 } from "path";
|
|
8762
|
+
var ICON_X = `React.createElement("svg", { viewBox: "0 0 256 256", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": true }, React.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))`;
|
|
8762
8763
|
var FIXTURES = {
|
|
8763
8764
|
"stat-card": {
|
|
8764
8765
|
default: {
|
|
@@ -8885,13 +8886,190 @@ var FIXTURES = {
|
|
|
8885
8886
|
export: "Button",
|
|
8886
8887
|
interactiveTarget: "button",
|
|
8887
8888
|
props: `{ children: "Get started" }`
|
|
8889
|
+
},
|
|
8890
|
+
// Edged faces (VI-655): the three button faces that draw a resting edge.
|
|
8891
|
+
outline: {
|
|
8892
|
+
export: "Button",
|
|
8893
|
+
interactiveTarget: "button",
|
|
8894
|
+
props: `{ variant: "outline", children: "Outline" }`
|
|
8895
|
+
},
|
|
8896
|
+
"dlg-ghost": {
|
|
8897
|
+
export: "Button",
|
|
8898
|
+
interactiveTarget: "button",
|
|
8899
|
+
props: `{ size: "dlg", variant: "ghost", children: "Cancel" }`
|
|
8900
|
+
},
|
|
8901
|
+
gated: {
|
|
8902
|
+
export: "Button",
|
|
8903
|
+
interactiveTarget: "button",
|
|
8904
|
+
props: `{ gated: true, children: "Upgrade" }`
|
|
8905
|
+
},
|
|
8906
|
+
// Type tokens (VI-656): one fixture per size, plus the dlg outline face.
|
|
8907
|
+
sm: { export: "Button", interactiveTarget: "button", props: `{ size: "sm", children: "Small" }` },
|
|
8908
|
+
lg: { export: "Button", interactiveTarget: "button", props: `{ size: "lg", children: "Large" }` },
|
|
8909
|
+
dlg: { export: "Button", interactiveTarget: "button", props: `{ size: "dlg", children: "Save" }` },
|
|
8910
|
+
"dlg-outline": {
|
|
8911
|
+
export: "Button",
|
|
8912
|
+
interactiveTarget: "button",
|
|
8913
|
+
props: `{ size: "dlg", variant: "outline", children: "Preview" }`
|
|
8914
|
+
},
|
|
8915
|
+
// Icon-only (VI-659): a bare ghost mark and its outline face.
|
|
8916
|
+
icon: {
|
|
8917
|
+
export: "Button",
|
|
8918
|
+
interactiveTarget: "button",
|
|
8919
|
+
props: `{ size: "icon", variant: "ghost", "aria-label": "Remove", children: ${ICON_X} }`
|
|
8920
|
+
},
|
|
8921
|
+
"icon-outline": {
|
|
8922
|
+
export: "Button",
|
|
8923
|
+
interactiveTarget: "button",
|
|
8924
|
+
props: `{ size: "icon", variant: "outline", "aria-label": "Remove", children: ${ICON_X} }`
|
|
8925
|
+
}
|
|
8926
|
+
},
|
|
8927
|
+
// Type tokens (VI-656). Field label and Text at every step, in both densities.
|
|
8928
|
+
field: {
|
|
8929
|
+
default: {
|
|
8930
|
+
export: "Field",
|
|
8931
|
+
props: `{ children: [React.createElement(__mod.FieldLabel, { key: "l" }, "Display name"), React.createElement(__mod.FieldDescription, { key: "d" }, "Shown on your profile.")] }`
|
|
8932
|
+
},
|
|
8933
|
+
editorial: {
|
|
8934
|
+
export: "Field",
|
|
8935
|
+
props: `{ "data-density": "editorial", children: [React.createElement(__mod.FieldLabel, { key: "l" }, "Display name"), React.createElement(__mod.FieldDescription, { key: "d" }, "Shown on your profile.")] }`
|
|
8936
|
+
}
|
|
8937
|
+
},
|
|
8938
|
+
text: {
|
|
8939
|
+
default: {
|
|
8940
|
+
export: "Text",
|
|
8941
|
+
props: `{ as: "div", children: ["xs", "sm", "md", "lg", "xl"].map(function (s) { return React.createElement(__mod.Text, { key: s, size: s }, "Text " + s) }) }`
|
|
8942
|
+
},
|
|
8943
|
+
colors: {
|
|
8944
|
+
export: "Text",
|
|
8945
|
+
props: `{ as: "div", children: ["primary", "secondary", "tertiary", "warning"].map(function (c) { return React.createElement(__mod.Text, { key: c, size: "sm", color: c }, "Text " + c) }) }`
|
|
8946
|
+
}
|
|
8947
|
+
},
|
|
8948
|
+
// Form controls (VI-655). Each has a resting fixture plus the states that
|
|
8949
|
+
// redraw the edge (invalid, checked, selected), so `visor render` can prove
|
|
8950
|
+
// the edge tokens leave a default theme unchanged.
|
|
8951
|
+
input: {
|
|
8952
|
+
default: { export: "Input", interactiveTarget: "input", props: `{ placeholder: "Email address" }` },
|
|
8953
|
+
invalid: { export: "Input", interactiveTarget: "input", props: `{ defaultValue: "not-an-email", "aria-invalid": true }` }
|
|
8954
|
+
},
|
|
8955
|
+
textarea: {
|
|
8956
|
+
default: { export: "Textarea", interactiveTarget: "textarea", props: `{ placeholder: "Tell us more" }` },
|
|
8957
|
+
invalid: { export: "Textarea", interactiveTarget: "textarea", props: `{ defaultValue: "Too short", "aria-invalid": true }` }
|
|
8958
|
+
},
|
|
8959
|
+
select: {
|
|
8960
|
+
default: {
|
|
8961
|
+
export: "Select",
|
|
8962
|
+
interactiveTarget: "button",
|
|
8963
|
+
props: `{ children: React.createElement(__mod.SelectTrigger, null, React.createElement(__mod.SelectValue, { placeholder: "Pick a plan" })) }`
|
|
8964
|
+
},
|
|
8965
|
+
invalid: {
|
|
8966
|
+
export: "Select",
|
|
8967
|
+
interactiveTarget: "button",
|
|
8968
|
+
props: `{ children: React.createElement(__mod.SelectTrigger, { "aria-invalid": true }, React.createElement(__mod.SelectValue, { placeholder: "Pick a plan" })) }`
|
|
8969
|
+
},
|
|
8970
|
+
borderless: {
|
|
8971
|
+
export: "Select",
|
|
8972
|
+
interactiveTarget: "button",
|
|
8973
|
+
props: `{ children: React.createElement(__mod.SelectTrigger, { variant: "borderless" }, React.createElement(__mod.SelectValue, { placeholder: "Pick a plan" })) }`
|
|
8974
|
+
}
|
|
8975
|
+
},
|
|
8976
|
+
checkbox: {
|
|
8977
|
+
default: { export: "Checkbox", interactiveTarget: "button", props: `{ "aria-label": "Accept" }` },
|
|
8978
|
+
checked: { export: "Checkbox", interactiveTarget: "button", props: `{ "aria-label": "Accept", defaultChecked: true }` },
|
|
8979
|
+
invalid: { export: "Checkbox", interactiveTarget: "button", props: `{ "aria-label": "Accept", "aria-invalid": true }` }
|
|
8980
|
+
},
|
|
8981
|
+
switch: {
|
|
8982
|
+
default: { export: "Switch", interactiveTarget: "button", props: `{ "aria-label": "Notifications" }` },
|
|
8983
|
+
checked: { export: "Switch", interactiveTarget: "button", props: `{ "aria-label": "Notifications", defaultChecked: true }` },
|
|
8984
|
+
invalid: { export: "Switch", interactiveTarget: "button", props: `{ "aria-label": "Notifications", "aria-invalid": true }` },
|
|
8985
|
+
sm: { export: "Switch", interactiveTarget: "button", props: `{ "aria-label": "Notifications", size: "sm" }` },
|
|
8986
|
+
"sm-checked": {
|
|
8987
|
+
export: "Switch",
|
|
8988
|
+
interactiveTarget: "button",
|
|
8989
|
+
props: `{ "aria-label": "Notifications", size: "sm", defaultChecked: true }`
|
|
8990
|
+
}
|
|
8991
|
+
},
|
|
8992
|
+
// VI-658: rest draws no edge; editing draws the shared control edge.
|
|
8993
|
+
// `heading` renders at the 21px display size the editor's titles use.
|
|
8994
|
+
"inline-edit": {
|
|
8995
|
+
default: {
|
|
8996
|
+
export: "InlineEdit",
|
|
8997
|
+
interactiveTarget: "button",
|
|
8998
|
+
props: `{ label: "Rider title", value: "Technical rider", defaultValue: "Rider", onCommit: function () {} }`
|
|
8999
|
+
},
|
|
9000
|
+
"default-value": {
|
|
9001
|
+
export: "InlineEdit",
|
|
9002
|
+
interactiveTarget: "button",
|
|
9003
|
+
props: `{ label: "Rider title", value: "", defaultValue: "Rider", onCommit: function () {} }`
|
|
9004
|
+
},
|
|
9005
|
+
editing: {
|
|
9006
|
+
export: "InlineEdit",
|
|
9007
|
+
interactiveTarget: "input",
|
|
9008
|
+
props: `{ label: "Rider title", value: "Technical rider", defaultValue: "Rider", onCommit: function () {}, defaultEditing: true }`
|
|
9009
|
+
},
|
|
9010
|
+
heading: {
|
|
9011
|
+
export: "InlineEdit",
|
|
9012
|
+
interactiveTarget: "button",
|
|
9013
|
+
props: `{ as: "h2", style: { margin: 0, fontSize: "21px", lineHeight: 1.25, fontWeight: 600 }, label: "Section title", value: "Track record", defaultValue: "Untitled section", onCommit: function () {} }`
|
|
9014
|
+
},
|
|
9015
|
+
"heading-editing": {
|
|
9016
|
+
export: "InlineEdit",
|
|
9017
|
+
interactiveTarget: "input",
|
|
9018
|
+
props: `{ as: "h2", style: { margin: 0, fontSize: "21px", lineHeight: 1.25, fontWeight: 600 }, label: "Section title", value: "Track record", defaultValue: "Untitled section", onCommit: function () {}, defaultEditing: true }`
|
|
9019
|
+
}
|
|
9020
|
+
},
|
|
9021
|
+
// VI-657: the autosave readout in each state. It draws no edge in any of them.
|
|
9022
|
+
"save-status": {
|
|
9023
|
+
default: { export: "SaveStatus", props: `{ status: "saved" }` },
|
|
9024
|
+
saving: { export: "SaveStatus", props: `{ status: "saving" }` },
|
|
9025
|
+
unsaved: { export: "SaveStatus", props: `{ status: "unsaved" }` },
|
|
9026
|
+
refused: { export: "SaveStatus", props: `{ status: "refused" }` },
|
|
9027
|
+
"refused-retry": { export: "SaveStatus", interactiveTarget: "button", props: `{ status: "refused", onRetry: function () {} }` }
|
|
9028
|
+
},
|
|
9029
|
+
"tag-input": {
|
|
9030
|
+
default: {
|
|
9031
|
+
export: "TagInput",
|
|
9032
|
+
interactiveTarget: "input",
|
|
9033
|
+
props: `{ defaultValue: ["design", "tokens"], placeholder: "Add a tag" }`
|
|
9034
|
+
}
|
|
9035
|
+
},
|
|
9036
|
+
chip: {
|
|
9037
|
+
default: { export: "Chip", props: `{ label: "Default" }` },
|
|
9038
|
+
outlined: { export: "Chip", props: `{ variant: "outlined", label: "Outlined" }` },
|
|
9039
|
+
choice: { export: "ChoiceChip", interactiveTarget: "button", props: `{ label: "Choice" }` },
|
|
9040
|
+
selected: { export: "ChoiceChip", interactiveTarget: "button", props: `{ label: "Selected", selected: true }` }
|
|
9041
|
+
},
|
|
9042
|
+
"file-upload": {
|
|
9043
|
+
default: { export: "FileUpload", interactiveTarget: '[tabindex="0"]', props: `{}` }
|
|
9044
|
+
},
|
|
9045
|
+
"empty-state": {
|
|
9046
|
+
default: {
|
|
9047
|
+
export: "EmptyState",
|
|
9048
|
+
props: `{ heading: "No projects yet", description: "Create a project to get started." }`
|
|
8888
9049
|
}
|
|
8889
9050
|
},
|
|
8890
9051
|
badge: {
|
|
8891
9052
|
default: {
|
|
8892
9053
|
export: "Badge",
|
|
8893
9054
|
props: `{ children: "New" }`
|
|
8894
|
-
}
|
|
9055
|
+
},
|
|
9056
|
+
// One fixture per non-default variant (VI-661 reads each variant's ground and ink).
|
|
9057
|
+
...Object.fromEntries(
|
|
9058
|
+
[
|
|
9059
|
+
"secondary",
|
|
9060
|
+
"outline",
|
|
9061
|
+
"destructive",
|
|
9062
|
+
"success",
|
|
9063
|
+
"warning",
|
|
9064
|
+
"info",
|
|
9065
|
+
"neutral",
|
|
9066
|
+
"filled-destructive",
|
|
9067
|
+
"filled-success",
|
|
9068
|
+
"filled-warning",
|
|
9069
|
+
"filled-info",
|
|
9070
|
+
"filled-neutral"
|
|
9071
|
+
].map((variant) => [variant, { export: "Badge", props: `{ variant: "${variant}", children: "New" }` }])
|
|
9072
|
+
)
|
|
8895
9073
|
}
|
|
8896
9074
|
};
|
|
8897
9075
|
var VALID_MODES = /* @__PURE__ */ new Set(["light", "dark"]);
|