Skip to content

Commit fd191e9

Browse files
authored
Fix floating-ui and motion dependencies in tooltip and carousel tutorials (#835)
- Upgrades playground-elements to bring in google/playground-elements#313, which lets us import `floating-ui` without any special handling. - Removed special handling for `process.env` error from incorrect module resolution in tooltip tutorial. - Fixed `"dependencies"` in tooltip and carousel tutorials. Previously they were listed in the tutorial `project.json` file -- which has no effect. Now, they are correctly inside a `package.json` file, so that the playground sees it. - Also: made the order of files in the carousel tutorials consistent.
1 parent f5186a8 commit fd191e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+10549
-10655
lines changed

Diff for: packages/lit-dev-content/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: packages/lit-dev-content/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
"@material/mwc-textfield": "^0.25.1",
207207
"lit": "^2.1.0",
208208
"minisearch": "^3.0.4",
209-
"playground-elements": "^0.15.4",
209+
"playground-elements": "^0.16.0",
210210
"postdoc-lib": "^1.0.3",
211211
"tarts": "^1.0.0",
212212
"timeago.js": "^4.0.2",
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
4-
"index.html": {"selected": true},
54
"motion-carousel.ts": {},
5+
"index.html": {"selected": true},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
44
"motion-carousel.ts": {"selected": true},
55
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../carousel-base.json",
33
"files": {
4-
"index.html": {},
54
"motion-carousel.ts": {"selected": true},
5+
"index.html": {},
66
"styles.ts": {}
7-
},
8-
"dependencies": {
9-
"@lit-labs/motion": "^1.0.2"
107
}
118
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "/samples/base.json",
3+
"files": {
4+
"package.json": {"hidden": true, "content": "{\"dependencies\":{\"@lit-labs/motion\":\"^1.0.2\"}}"}
5+
}
6+
}

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/00/before/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
</style>
88
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
99
rel="stylesheet">
10-
<script src="./process.js"></script>
1110
<script type="module" src="./my-content.js"></script>
1211
</head>
1312
<body>

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/00/before/process.js

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"hidden":true},
55
"my-content.ts": {"selected": true},
6-
"index.html": {"hidden": true},
7-
"process.js": {"hidden": true}
8-
},
9-
"dependencies": {
10-
"@floating-ui/dom": "^0.4.1"
6+
"index.html": {"hidden": true}
117
}
128
}

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/01/before/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"selected": true},
55
"my-content.ts": {},

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/02/before/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"selected": true},
55
"my-content.ts": {},

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/03/before/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"selected": true},
55
"my-content.ts": {},

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/04/before/project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"selected": true},
55
"my-content.ts": {},

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/05/before/index.html

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
</style>
88
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
99
rel="stylesheet">
10-
<!-- playground-fold -->
11-
<script src="./process.js"></script>
12-
<!-- playground-fold-end -->
1310

1411
<script type="module" src="./my-content.js"></script>
1512
</head>

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/05/before/process.js

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"selected": true},
55
"my-content.ts": {},
6-
"index.html": {},
7-
"process.js": {"hidden": true}
6+
"index.html": {}
87
}
98
}

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/06/before/index.html

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
</style>
88
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
99
rel="stylesheet">
10-
<!-- playground-fold -->
11-
<script src="./process.js"></script>
12-
<!-- playground-fold-end -->
1310

1411
<script type="module" src="./my-content.js"></script>
1512
</head>

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/06/before/process.js

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"selected": true},
55
"my-content.ts": {},
6-
"index.html": {},
7-
"process.js": {"hidden": true}
8-
},
9-
"dependencies": {
10-
"@floating-ui/dom": "^0.4.1"
6+
"index.html": {}
117
}
128
}

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/07/after/index.html

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
</style>
88
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
99
rel="stylesheet">
10-
<!-- playground-fold -->
11-
<script src="./process.js"></script>
12-
<!-- playground-fold-end -->
1310

1411
<script type="module" src="./my-content.js"></script>
1512
</head>

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/07/after/process.js

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"selected": true},
55
"my-content.ts": {},
6-
"index.html": {},
7-
"process.js": {"hidden": true}
8-
},
9-
"dependencies": {
10-
"@floating-ui/dom": "^0.4.1"
6+
"index.html": {}
117
}
128
}

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/07/before/index.html

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
</style>
88
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
99
rel="stylesheet">
10-
<!-- playground-fold -->
11-
<script src="./process.js"></script>
12-
<!-- playground-fold-end -->
1310

1411
<script type="module" src="./my-content.js"></script>
1512
</head>

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/07/before/process.js

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"extends": "/samples/base.json",
2+
"extends": "../../tooltip-base.json",
33
"files": {
44
"simple-tooltip.ts": {"selected": true},
55
"my-content.ts": {},
6-
"index.html": {},
7-
"process.js": {"hidden": true}
8-
},
9-
"dependencies": {
10-
"@floating-ui/dom": "^0.4.1"
6+
"index.html": {}
117
}
128
}

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/08/after/index.html

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
99
rel="stylesheet">
1010

11-
<!-- playground-fold -->
12-
<script src="./process.js"></script>
13-
<!-- playground-fold-end -->
14-
1511
<script type="module" src="./my-content.js"></script>
1612
</head>
1713
<body>

Diff for: packages/lit-dev-content/samples/tutorials/tooltip/08/after/process.js

-3
This file was deleted.

0 commit comments

Comments
 (0)