Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3d9248

Browse files
committed
chore: commit prettier conf + add pandabox plugin
1 parent2a5beca commitb3d9248

37 files changed

+4687
-2209
lines changed

‎.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"singleQuote": false,
3+
"printWidth": 80,
4+
"bracketSpacing": true,
5+
"jsxSingleQuote": false,
6+
"proseWrap": "always",
7+
"semi": true,
8+
"tabWidth": 2,
9+
"plugins": ["@pandabox/prettier-plugin"]
10+
}

‎__tests__/compact-css.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test("removes longhands when same value as shorthands", () => {
99
paddingRight:"0px",
1010
paddingBottom:"0px",
1111
paddingLeft:"0px",
12-
})
12+
}),
1313
).toMatchInlineSnapshot(`
1414
{
1515
"omit": [
@@ -39,7 +39,7 @@ test("removes longhands when same value as shorthands - multiple", () => {
3939
marginRight:"0px",
4040
marginBottom:"0px",
4141
marginLeft:"0px",
42-
})
42+
}),
4343
).toMatchInlineSnapshot(`
4444
{
4545
"omit": [
@@ -74,7 +74,7 @@ test("removes shorthands when different value in one of the longhands", () => {
7474
marginRight:"0px",
7575
marginBottom:"0px",
7676
marginLeft:"0px",
77-
})
77+
}),
7878
).toMatchInlineSnapshot(`
7979
{
8080
"omit": [
@@ -111,7 +111,7 @@ test("keeps other keys", () => {
111111
marginRight:"0px",
112112
marginBottom:"0px",
113113
marginLeft:"0px",
114-
})
114+
}),
115115
).toMatchInlineSnapshot(`
116116
{
117117
"omit": [
@@ -141,7 +141,7 @@ test("works with partial longhands", () => {
141141
padding:"0px",
142142
paddingBottom:"0px",
143143
paddingLeft:"0px",
144-
})
144+
}),
145145
).toMatchInlineSnapshot(`
146146
{
147147
"omit": [
@@ -163,7 +163,7 @@ test("add both longhands and shorthands if not all longhands are in the styles a
163163
compactCSS({
164164
overflowX:"hidden",
165165
overflow:"auto",
166-
})
166+
}),
167167
).toMatchInlineSnapshot(`
168168
{
169169
"omit": [],
@@ -178,7 +178,7 @@ test("add both longhands and shorthands if not all longhands are in the styles a
178178
compactCSS({
179179
overflow:"auto",
180180
overflowY:"hidden",
181-
})
181+
}),
182182
).toMatchInlineSnapshot(`
183183
{
184184
"omit": [],
@@ -193,7 +193,7 @@ test("add both longhands and shorthands if not all longhands are in the styles a
193193
compactCSS({
194194
overflow:"auto",
195195
overflowY:"auto",
196-
})
196+
}),
197197
).toMatchInlineSnapshot(`
198198
{
199199
"omit": [
@@ -216,7 +216,7 @@ test("works in any order", () => {
216216
padding:"0px",
217217
overflow:"auto",
218218
paddingLeft:"0px",
219-
})
219+
}),
220220
).toMatchInlineSnapshot(`
221221
{
222222
"omit": [
@@ -242,7 +242,7 @@ test("add shorthand if all longhands are in the styles and none differs from the
242242
paddingRight:"0px",
243243
paddingTop:"0px",
244244
paddingBottom:"0px",
245-
})
245+
}),
246246
).toMatchInlineSnapshot(`
247247
{
248248
"omit": [

‎__tests__/css-text-to-entries.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test("works without space", () => {
4343

4444
test("works with multiple comma",()=>{
4545
expect(
46-
cssTextToEntries(" color: green;; color: blue; color: red; color: yellow;")
46+
cssTextToEntries(" color: green;; color: blue; color: red; color: yellow;"),
4747
).toMatchInlineSnapshot(`
4848
[
4949
[
@@ -69,8 +69,8 @@ test("works with multiple comma", () => {
6969
test("extracts commented declarations",()=>{
7070
expect(
7171
cssTextToEntries(
72-
" color: green;; color: blue;/* color: orange; */ color: red; /* color: amber; */color: yellow;/* color: pink; */"//
73-
)
72+
" color: green;; color: blue;/* color: orange; */ color: red; /* color: amber; */color: yellow;/* color: pink; */",//
73+
),
7474
).toMatchInlineSnapshot(`
7575
[
7676
[

‎__tests__/get-updated-css-text.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test("insert at index 0", () => {
3636
atIndex:0,
3737
isCommented:false,
3838
mode:"insert",
39-
})
39+
}),
4040
).toMatchInlineSnapshot(`" display: flex; color: red; margin: 10px;"`);
4141
});
4242

@@ -49,7 +49,7 @@ test("insert at index 1", () => {
4949
atIndex:1,
5050
isCommented:false,
5151
mode:"insert",
52-
})
52+
}),
5353
).toMatchInlineSnapshot(`" color: red; display: flex; margin: 10px;"`);
5454
});
5555

@@ -62,7 +62,7 @@ test("insert at index 2", () => {
6262
atIndex:2,
6363
isCommented:false,
6464
mode:"insert",
65-
})
65+
}),
6666
).toMatchInlineSnapshot(`" color: red; margin: 10px; display: flex;"`);
6767
});
6868

@@ -75,7 +75,7 @@ test("insert at index 3", () => {
7575
atIndex:2,
7676
isCommented:false,
7777
mode:"insert",
78-
})
78+
}),
7979
).toMatchInlineSnapshot(`" color: red; margin: 10px; display: flex;"`);
8080
});
8181

@@ -88,7 +88,7 @@ test("edit at index 0", () => {
8888
atIndex:0,
8989
isCommented:false,
9090
mode:"edit",
91-
})
91+
}),
9292
).toMatchInlineSnapshot(`" display: flex; margin: 10px;"`);
9393
});
9494

@@ -101,7 +101,7 @@ test("edit at index 1", () => {
101101
atIndex:1,
102102
isCommented:false,
103103
mode:"edit",
104-
})
104+
}),
105105
).toMatchInlineSnapshot(`" color: red; display: flex;"`);
106106
});
107107

@@ -114,7 +114,7 @@ test("edit at index 2", () => {
114114
atIndex:2,
115115
isCommented:false,
116116
mode:"edit",
117-
})
117+
}),
118118
).toMatchInlineSnapshot(`" color: red; margin: 10px; display: flex;"`);
119119
});
120120

@@ -127,6 +127,6 @@ test("edit at index 3", () => {
127127
atIndex:2,
128128
isCommented:false,
129129
mode:"edit",
130-
})
130+
}),
131131
).toMatchInlineSnapshot(`" color: red; margin: 10px; display: flex;"`);
132132
});

‎components/create-style-context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const createStyleContext = <R extends StyleRecipe>(recipe: R) => {
3333

3434
constwithProvider=<TextendsElementType>(
3535
Component:T,
36-
slot?:StyleSlot<R>
36+
slot?:StyleSlot<R>,
3737
):ComponentVariants<T,R>=>{
3838
constStyledComponent=forwardRef((props:ComponentProps<T>,ref)=>{
3939
const[variantProps,otherProps]=recipe.splitVariantProps(props);
@@ -53,7 +53,7 @@ export const createStyleContext = <R extends StyleRecipe>(recipe: R) => {
5353

5454
constwithContext=<TextendsElementType>(
5555
Component:T,
56-
slot?:StyleSlot<R>
56+
slot?:StyleSlot<R>,
5757
):T=>{
5858
if(!slot)returnComponent;
5959
constStyledComponent=forwardRef((props:ComponentProps<T>,ref)=>{

‎components/tooltip.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ const styles = sva({
1212
base:{
1313
positioner:{
1414
display:"flex",
15-
"--arrow-background":"colors.devtools.cdt-base-container",
15+
borderRadius:"2px",
16+
color:"devtools.on-surface",
17+
fontSize:"12px",
18+
lineHeight:"11px",
1619
backgroundColor:"var(--arrow-background)",
20+
userSelect:"text",
21+
"--arrow-background":"colors.devtools.cdt-base-container",
1722
"--drop-shadow":
1823
"0 0 0 1px rgb(255 255 255/20%),0 2px 4px 2px rgb(0 0 0/20%),0 2px 6px 2px rgb(0 0 0/10%)",
1924
"&:has([data-state=open])":{
2025
boxShadow:"var(--drop-shadow)",
2126
},
22-
borderRadius:"2px",
23-
userSelect:"text",
24-
fontSize:"12px",
25-
lineHeight:"11px",
26-
color:"devtools.on-surface",
2727
},
2828
content:{
2929
padding:"11px 7px",
@@ -40,7 +40,7 @@ export const Root = withProvider(ArkTooltip.Root);
4040
exportconstContent=withContext(styled(ArkTooltip.Content),"content");
4141
exportconstPositioner=withContext(
4242
styled(ArkTooltip.Positioner),
43-
"positioner"
43+
"positioner",
4444
);
4545
exportconstTrigger=withContext(styled(ArkTooltip.Trigger),"trigger");
4646
exportconstArrow=withContext(styled(ArkTooltip.Arrow),"arrow");
@@ -76,10 +76,10 @@ export const Tooltip = (props: TooltipProps) => {
7676
<Portallish>
7777
<Positioner>
7878
<Content
79-
maxW="var(--available-width)"
8079
// animation="unset"
8180
display="flex"
8281
flexDirection="column"
82+
maxW="var(--available-width)"
8383
>
8484
{content}
8585
{withArrow&&(

‎entrypoints/content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default defineContentScript({
3636
onDevtoolsMessage.computePropertyValue((message)=>{
3737
returninspectApi.computePropertyValue(
3838
message.data.selectors,
39-
message.data.prop
39+
message.data.prop,
4040
);
4141
});
4242
onDevtoolsMessage.updateStyleRule((message)=>{

‎entrypoints/devtools-pane/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ export const onContentScriptMessage = new Proxy<DevtoolsExtensionApi>(
3535
});
3636
};
3737
},
38-
}
38+
},
3939
);
4040

4141
constlisteners=newMap<string,()=>void>();
4242
exportconstonDevtoolEvent:DevtoolsContextValue["onDevtoolEvent"]=(
4343
event,
44-
cb
44+
cb,
4545
)=>{
4646
listeners.set(event,cb);
4747
};

‎entrypoints/devtools-pane/eval.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export const evaluator: Evaluator = {
163163
returnevalFn(
164164
//@ts-expect-error https://developer.chrome.com/docs/devtools/console/utilities/#copy-function
165165
(value:string)=>window.copy(value),
166-
valueToCopy
166+
valueToCopy,
167167
);
168168
},
169169
inspect:inspect,
@@ -173,7 +173,7 @@ export const evaluator: Evaluator = {
173173
cb(result??null);
174174
};
175175
browser.devtools.panels.elements.onSelectionChanged.addListener(
176-
handleSelectionChanged
176+
handleSelectionChanged,
177177
);
178178

179179
if(browser.devtools.panels.themeName==="dark"){
@@ -184,7 +184,7 @@ export const evaluator: Evaluator = {
184184

185185
return()=>{
186186
browser.devtools.panels.elements.onSelectionChanged.removeListener(
187-
handleSelectionChanged
187+
handleSelectionChanged,
188188
);
189189
};
190190
},

‎entrypoints/devtools-pane/main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ browser.runtime.onMessage.addListener(
1616
context:"devtools",
1717
tabId:nullasany,
1818
});
19-
}
19+
},
2020
);
2121

2222
ReactDOM.createRoot(document.getElementById("root")!).render(
@@ -25,5 +25,5 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
2525
<SidebarPane/>
2626
</DevtoolsProvider>
2727
<WithPlatformClass/>
28-
</React.StrictMode>
28+
</React.StrictMode>,
2929
);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp