id
stringclasses
20 values
date
timestamp[s]date
2025-05-12 00:00:00
2025-05-12 00:00:00
level
stringclasses
4 values
description
stringlengths
28
5.03k
project
stringclasses
50 values
task-1
2025-05-12T00:00:00
easy
When click label line, use mouse in canvas to draw a svg line (line width is '.line-width' value, line color is '.color' value). The line's start point is the point when mouse pressing down and end point is the point when mouse pressing up.
svg
task-2
2025-05-12T00:00:00
easy
When click label rect, use mouse in canvas to draw a svg rect (fill color is white, line width is '.line-width' value, line color is '.color' value). The rect's left-top is the point when mouse pressing down and right-bottom is the point when mouse pressing up.
svg
task-3
2025-05-12T00:00:00
easy
When click label circle, use mouse in canvas to draw a svg circle (fill color is white, line width is '.line-width' value, line color is '.color' value). There is a rect whose left-top is the point when mouse pressing down and right-bottom is the point when mouse pressing up. The circle's center is the rect center, radius is the half rect width.
svg
task-4
2025-05-12T00:00:00
easy
When click label ellipse, use mouse in canvas to draw a svg ellipse (fill color is white, line width is '.line-width' value, line color is '.color' value). There is a rect whose left-top is the point when mouse pressing down and right-bottom is the point when mouse pressing up. The ellipse's center is the rect center, x radius is the half rect width, y radius is the half rect height.
svg
task-5
2025-05-12T00:00:00
moderate
After label delete clicked, click any shape (line/rect/ellipse/...) in the canvas to delete it.
svg
task-6
2025-05-12T00:00:00
moderate
After label fill clicked, click any shape (line/rect/ellipse/...) in the canvas to set its fill color to '.color' value.
svg
task-7
2025-05-12T00:00:00
moderate
After label copy clicked, click any shape (line/rect/ellipse/...) in the canvas to copy itself. The copied shape is placed 20 to the right and 20 below the original shape.
svg
task-8
2025-05-12T00:00:00
challenging
When the length of the line is less than line width, keep it to be the line width. When the width or height of the rect is less than line width, keep it to be line width.
svg
task-9
2025-05-12T00:00:00
challenging
When the radius of the circle is less than half line width, keep it to be half line width. When the x or y radius of the ellipse is less than half line width, keep it to be half line width.
svg
task-10
2025-05-12T00:00:00
challenging
When click label triangle, use mouse in canvas to draw a svg polygon triangle (fill color is white, line width is '.line-width' value, line color is '.color' value). There is a rect whose left-top is the point when mouse pressing down and right-bottom is the point when mouse pressing up. The triangle's left-bottom is the rect left-bottom, right-bottom is the rect right-bottom, and top is the center of rect top edge. Polygon points sequence is left-bottom, right-bottom, top.
svg
task-11
2025-05-12T00:00:00
challenging
When click label trapezoid, use mouse in canvas to draw a svg polygon trapezoid (fill color is white, line width is '.line-width' value, line color is '.color' value). There is a rect whose left-top is the point when mouse pressing down and right-bottom is the point when mouse pressing up. The trapezoid's left-bottom is the rect left-bottom, right-bottom is the rect right-bottom, left-top and right-top points divide rect top edge to 3 equal parts. Polygon points sequence is left-bottom, right-bottom, top.
svg
task-12
2025-05-12T00:00:00
challenging
When click label hexagon, use mouse in canvas to draw a svg polygon hexagon (fill color is white, line width is '.line-width' value, line color is '.color' value). There is a rect whose left-top is the point when mouse pressing down and right-bottom is the point when mouse pressing up. The hexagon's left point is rect left edge center, right point is rect right edge center, 2 top points divide rect top edge to 3 parts (width 1:2:1), 2 bottom points divide rect bottom edge to 3 parts (width 1:2:1). Polygon points sequence is left, bottom, right, top.
svg
task-13
2025-05-12T00:00:00
challenging
When click label curve, use mouse in canvas to draw a svg path quadratic curve (no fill, line width is '.line-width' value, line color is '.color' value). There is a rect whose left-top is the point when mouse pressing down and right-bottom is the point when mouse pressing up. The curve's start point is rect left-bottom, end point is rect right-bottom, and control point is the center of rect top edge.
svg
task-14
2025-05-12T00:00:00
challenging
When click label polyline, use mouse in canvas to draw a svg polyline (no fill, line width is '.line-width' value, line color is '.color' value). The line's start point is the point when mouse pressing down, end point is the point when mouse pressing up, and other points are from the points when mouse moving.
svg
task-15
2025-05-12T00:00:00
challenging
When click label text, use mouse in canvas to draw a svg text (no stroke, fill is '.color' value, default content is 'Text'). There is a rect whose left-top is the point when mouse pressing down and right-bottom is the point when mouse pressing up. The text's content fills the rect. Double click the text to edit its content with prompt dialog.
svg
task-16
2025-05-12T00:00:00
challenging
After label move clicked, drag and move any shape in the canvas.
svg
task-17
2025-05-12T00:00:00
moderate
Set label move clicked after creating or copying a shape. Press and hold the blankspace to enable moving the shape. Release it to restore the selected label if needed.
svg
task-18
2025-05-12T00:00:00
challenging
After label rotate clicked, drag and rotate any shape in the canvas around its center.
svg
task-19
2025-05-12T00:00:00
challenging
After label zoom clicked, drag and zoom any shape in the canvas according the distance between mouse position and its center. Zoom the shape around its center.
svg
task-20
2025-05-12T00:00:00
challenging
Perform move, rotate, and zoom operations on a shape in any sequence, ensuring that each operation builds on the previous one.
svg
task-1
2025-05-12T00:00:00
easy
Add a context menu (class menu, absolute position, min-width/height 100px) in the page. Display context menu when right-clicking on the table. Hide the menu when clicking anywhere else on the page, including the menu space. Save codes to es-module 'common/menu.js' imported by 'index.js'.
table
task-2
2025-05-12T00:00:00
easy
When right clicking td cell in tbody row, add menu item 'Insert Row Above' (class menu-item-insert-row-above), 'Insert Row Below' (class menu-item-insert-row-below), 'Delete Row' (class menu-item-delete-row). Click these menu items to do the corresponding actions.
table
task-3
2025-05-12T00:00:00
easy
When right clicking th cell in thead row, add menu item 'Insert Col Left' (class menu-item-insert-col-left), 'Insert Col Right' (class menu-item-insert-col-right), 'Delete Col' (class menu-item-delete-col). Insert th cell in thead row and td cell in tbody row.
table
task-4
2025-05-12T00:00:00
easy
Click to select and highlight a cell which is added class 'selected'. Save codes to 'common/table.js' imported by 'index.js'.
table
task-5
2025-05-12T00:00:00
easy
If no selected cell, press Arrow keys to the first cell (top-left one). Press Arrow keys to change the selected cell to the next possible one. Save codes to 'common/key.js' imported by 'index.js'.
table
task-6
2025-05-12T00:00:00
moderate
If no selected cell, press Tab and 'Shift+Tab' key to the first cell. Press Tab key to change the selected cell to the next one. The rules are from left col to right col, change to the left of next row if no next cell in current row; change to the first cell of the table if no next row. The rules for 'Shift+Tab' is the opposite of the rules of Tab key.
table
task-7
2025-05-12T00:00:00
moderate
Add menu item 'Select Row' (class menu-item-select-row) for body cell. Add menu item 'Select Col' (class menu-item-select-col) for header cell. Press 'Cmd+A'(windows 'Ctrl+A') to select all cells. Press Escape key to unselect the selected cells.
table
task-8
2025-05-12T00:00:00
moderate
Press 'Delete' or 'Backspace' key to clear all selected cells content.
table
task-9
2025-05-12T00:00:00
challenging
Click with Shift key to select a rectangle of cells. Press 'Shift+Arrow' key to extend the selected cells by one more/less row/col.
table
task-10
2025-05-12T00:00:00
challenging
Move mouse while keeping pressed down left button to select a rectangle of cells. Save codes to 'common/mouse.js' imported by 'index.js'
table
task-11
2025-05-12T00:00:00
moderate
Single click a selected cell, or double click any cell to edit the cell (contenteditable). An editable cell is also selected.
table
task-12
2025-05-12T00:00:00
challenging
Press Enter key to edit a selected cell. Press Escape key to change the edited cell to the readonly and selected one.
table
task-13
2025-05-12T00:00:00
challenging
Press Cmd/Ctrl+C to copy the content of the selected cell. Press Cmd/Ctrl+V to paste the copied content to the selected cell.
table
task-14
2025-05-12T00:00:00
challenging
Copy and paste exactly the content of the selected cells. Extend the table rows or cols if the target cells area is not large enough.
table
task-15
2025-05-12T00:00:00
challenging
Drag row bottom lines to adjust row height. Row's minimum height is 40px. Save codes to 'common/layout.js' imported by 'index.js'
table
task-16
2025-05-12T00:00:00
challenging
Drag thead cell right lines to adjust col width. Col's minimum width is 80px. Save codes to 'common/layout.js'.
table
task-17
2025-05-12T00:00:00
challenging
Select a tbody row to drag and move the row in tbody. Insert after the target when dragging into the target's bottom half, and to insert before the target when dragging into the target's top half. Save codes to 'common/drag.js' imported by 'index.js'.
table
task-18
2025-05-12T00:00:00
challenging
Select a col to drag and move the col. Insert after the target when dragging into the target's right half, and to insert before the target when dragging into the target's left half.
table
task-19
2025-05-12T00:00:00
challenging
Add a menu item 'Filter'(class menu-item-filter) for thead cell to accept keywords from prompt dialog to filter the rows matching the keywords. If keywords are empty string, display all rows.
table
task-20
2025-05-12T00:00:00
challenging
Add a menu item 'Sort'(class menu-item-sort) for thead cell to sort the rows text content in either ascending (A-Z) or descending (Z-A) order. The first order for each col is descending.
table
task-1
2025-05-12T00:00:00
easy
add divs(class 'header', 'footer', 'content') with arbitrary text in '.root' element. '.root' occupies total viewport and children elements together occupy total '.root' space. header (border-box) is always fixed at the top of '.root'; footer (border-box) is always fixed at the bottom of '.root'; content (border-box) occupies the remaining '.root' space. USE tailwind grid only, NO flex, float and position, NO js.
tailwind
task-2
2025-05-12T00:00:00
easy
add divs(class 'leftbar', 'rightbar') with arbitrary text in '.root' element. leftbar (border-box) is fixed at the left of '.root'; rightbar (border-box) is fixed at the right of '.root'; content occupies the remaining '.root' space. USE tailwind grid only.
tailwind
task-3
2025-05-12T00:00:00
easy
clear header content. add menu(class 'menu') with 3 items(arbitrary text) at the right side of header. USE tailwind grid only too.
tailwind
task-4
2025-05-12T00:00:00
easy
add logo(class 'logo') with arbitrary background color at the left side of header. USE tailwind grid only.
tailwind
task-5
2025-05-12T00:00:00
easy
leftbar width is the smaller of 200px and 20vw. rightbar width is the bigger of 200px and 20vw. leftbar should disappear when page width is equal to or less than 799px. USE tailwind grid only.
tailwind
task-6
2025-05-12T00:00:00
easy
when page width is equal to or less than 399px, menu items should have evenly spaced distribution in the whole header space and logo should disappear. USE tailwind grid only.
tailwind
task-7
2025-05-12T00:00:00
easy
when page width is less than 400px, content and rightbar should occupy full page width and rightbar should be at the bottom of content. USE tailwind grid only.
tailwind
task-8
2025-05-12T00:00:00
easy
when page width is less than 400px, each menu item should occupy full page width. USE tailwind grid only.
tailwind
task-9
2025-05-12T00:00:00
challenging
separate leftbar whole space into 20 rows and 2 columns. fill each cell with text 'this is a very long text sample to test word wrap'. USE tailwind grid only.
tailwind
task-10
2025-05-12T00:00:00
challenging
separate rightbar whole space into 10 rows and 2 columns; fill 40 items in the rightbar whole space. fill each item with text 'this-is-a-very-long-text-sample-to-test-overflow'. USE tailwind grid only.
tailwind
task-11
2025-05-12T00:00:00
challenging
when page width is less than 400px, display the first 3 rows in rightbar.
tailwind
task-12
2025-05-12T00:00:00
challenging
show 12 cards (class 'card') in content with 3 per row, 100px minimum height each and vertical scrolling enabled.
tailwind
task-13
2025-05-12T00:00:00
challenging
when page width is less than 1000px, display 2 cards per row in content.
tailwind
task-14
2025-05-12T00:00:00
challenging
when page width is less than 600px, display 1 card per row in content.
tailwind
task-15
2025-05-12T00:00:00
challenging
each card has a image(class 'card-image'), title and price; title's minimum height is 1.5rem and no wrap, text is 'Long Product Title That Goes Here'; price's minimum height is 1rem; image uses the remaining space. USE tailwind grid only.
tailwind
task-16
2025-05-12T00:00:00
challenging
only change card css property to reverse the order of the last 2 cards.
tailwind
task-17
2025-05-12T00:00:00
challenging
add a logo(class 'footer-logo') and info (class 'footer-info') in the footer. footer-info should never wrap and should show ellipsis when space is insufficient.
tailwind
task-18
2025-05-12T00:00:00
challenging
add left-drag and right-drag with absolute positions at the left and right sides of the content; left-drag and right-drag are not visible by default and become visible when mouse hovers over content.
tailwind
task-19
2025-05-12T00:00:00
challenging
gen js, drag right-drag and left-drag to adjust content width.
tailwind
task-20
2025-05-12T00:00:00
challenging
when page width is less than 400px, move right-drag to the bottom of content and drag right-drag to adjust content height.
tailwind
task-1
2025-05-12T00:00:00
easy
Edit index.js 1: Generate a basic Scene named scene and assign to window.scene. 2: Generate a basic PerspectiveCamera named camera and assign to window.camera. Do not add any other code. 2: Generate a basic WebGLRenderer and assign to window.renderer with full window size, named renderer, and append render dom into #root. 3: Auto render the scene and camera with requestAnimationFrame.
threejs
task-2
2025-05-12T00:00:00
easy
Create floor.js imported by index.js 1: Generate a green 8x8 PlaneGeometry named floor. Set this floor.name to floor. 2: Set the floor along the X and Z axes, with the Y-axis coordinate set to 0. 3: Add floor to scene after scene is ready.
threejs
task-3
2025-05-12T00:00:00
easy
Create light.js imported by index.js 1: Generate a white point light, and place at (-10, 15, -10). 2. Place the camera at (0, 15, 15) and orient it towards the position (0, 0, 0).
threejs
task-4
2025-05-12T00:00:00
moderate
Create snake.js imported by index.js 1: Create a group named snake, and set this group.name to snake. Place the group in the center of the floor. 2: Generate a gray cone geometry which radius is 0.5 and height is 1, named snakeHead, and add to the snake group. Then set snakeHead.name to snake_head. Place snakeHead to center of the group.
threejs
task-5
2025-05-12T00:00:00
moderate
Edit snake.js . 1: Create 3 snakeBody segments and add them behind the snakeHead, Ensure that the snakeBody is a straight line with the snake head at the top and the snake tail at the bottom. 2: Every snakeBody is a lightgray sphere which radius is 0.5 .
threejs
task-6
2025-05-12T00:00:00
challenging
Edit index.js 1: When the user presses the up, down, left, and right keys on the keyboard, the snakeHead is controlled to move to top, bottom, left, and right by one unit respectively. 2: The apex of snakeHead always points in the direction of recent movement. 3: Ensuring that when the user moves the snakeHead, all the snakeBody follows the way closely. 4: All the snake part can not over other self part.
threejs
task-7
2025-05-12T00:00:00
challenging
Create fence.js imported by index.js 1: Create a group named fences, and set this group.name to fences. 2: Generate fence, and it is a 1 * 1 * 1 darkgreen cuboid, and then add these fences in fences group. Repeat the above steps to add fences around the floor. 3: The snake cannot be moved on the fences by the user, so collision detection is required
threejs
task-8
2025-05-12T00:00:00
challenging
Create candy.js imported by index.js 1: Generate a pink spherical object with a radius of 0.3 and name it candy. 2: Place the candy in the center of the cell at the top-left corner of the map. If the current cell is occupied(eg: snake or other objects), move one cell to the right. If it encounters a fence, move to the leftmost cell of the next row. Continue this process until the candy is successfully placed. 3: When the candy eaten by snake, reposition the candy to a new cell according to the above rules.
threejs
task-9
2025-05-12T00:00:00
challenging
Edit some files. 1: When the snakeHead eats a candy, the snakeBody will grow by one unit.
threejs
task-10
2025-05-12T00:00:00
challenging
Create animation.js imported by index.js 1: Add a 3 seconds looping animation to the candy. The candy should move up and down along the y-axis within the range of 0.5 to 1.5, moving at a constant speed.
threejs
task-11
2025-05-12T00:00:00
challenging
Create portal.js imported by index.js 1: Create a group named portals. 2: Generate a pair of portal units at the top-right and bottom-left corners of the map, and place them in the portal group. 3: When the snakeHead collides with a portal unit, it will be immediately transported to the coordinates of the other portal.
threejs
task-12
2025-05-12T00:00:00
challenging
Edit portal.js & animation.js 1: Set the portal units to be standing, ring shapes smaller than one unit in length. Create a 3-second frame animation that makes the portal rotate along the y-axis and gradually change colors in the order of red, yellow, and blue.
threejs
task-13
2025-05-12T00:00:00
challenging
Edit some files. 1: Ensure that the candy cannot be generated over the portal units.
threejs
task-14
2025-05-12T00:00:00
challenging
Create control.js imported by index.js 1: When the left mouse button is pressed and dragging, The camera view can rotate around the camera position by the mouse movement. 2: When the mouse wheel is scrolled, the camera moves forward or backward in the direction it is facing. 3: When the right mouse button is pressed and dragging, the camera moves horizontally on the x and z axes. 4: The camera's horizontal movement should consider its current position and orientation, should be moving in the direction of the mouse orientation.
threejs
task-15
2025-05-12T00:00:00
challenging
Edit control.js 1: When the 'h' button is preesed, the camera reset to the initial position and orientation
threejs
task-16
2025-05-12T00:00:00
challenging
Edit control.js & index.js 1: After user press the 'l' button, the snakeHead direction changed, the camera will be rotated to the new direction immediately. 2: User can press the 'l' button again to disable this feature.
threejs
task-17
2025-05-12T00:00:00
challenging
Edit index.js 1: When the snake enters a dead-end, all of the snake's states need to be reset, and the candy should be placed back to its initial position.
threejs
task-18
2025-05-12T00:00:00
challenging
Edit some files. 1. When the user presses 'a', the snake starts to automatically move in the current direction, moving one unit every half second. Pressing 'a' again disable this automatically movement.
threejs
task-19
2025-05-12T00:00:00
challenging
Edit some files. 1: When the snake passes through the portal, set all snake's objects color to the current color of the portal.
threejs
task-20
2025-05-12T00:00:00
challenging
Edit some files. 1: When the snake's length reaches 20 units, it is considered a game victory, and all objects in the scene should be removed.
threejs
task-1
2025-05-12T00:00:00
easy
InputSetter、NumberSetter、CheckboxSetter add optional type onChange. onChange is a function type, parameter is the value of the corresponding type and may be undefined, return type is void.
typescript
task-2
2025-05-12T00:00:00
easy
Create a file at types/setter-check.ts that exports the function isInputSetter to check the Setter is InputSetter.
typescript
task-3
2025-05-12T00:00:00
easy
1. Export interface `BaseSetter`, has `value` and `onChange`, onChange is a function type, parameter is the value of the corresponding type and may be undefined, return type is void. 2. BaseSetter all types are required. 3. Export type OptionalBaseSetter, has the same type of BaseSetter, but all types are optional. 4. InputSetter、NumberSetter、CheckboxSetter extends OptionalBaseSetter.
typescript
task-4
2025-05-12T00:00:00
easy
In types/setter.ts: 1. Export type `SetterValueType` that includes primitive string, number, boolean, array, object. Array and Object are strictly of type SetterValueType. 2. The BaseSetter's value is strictly of type SetterValueType.
typescript
task-5
2025-05-12T00:00:00
easy
In types/setter.ts create and export a type `ValueSetter`, Dynamically create supported Setter types according to the provided generic type.
typescript
task-6
2025-05-12T00:00:00
moderate
In types/setter.ts: create and export Setter `PasswordSetter` type 'password' and value type string.
typescript
task-7
2025-05-12T00:00:00
moderate
In types/setter.ts: create and export Setter `SelectSetter` type 'select' and value could be string or number.
typescript
task-8
2025-05-12T00:00:00
challenging
In types/setter.ts, create and export Setter `ArraySetter`: - type 'array' - item: dynamically create supported Setter types according to the value item.
typescript
task-9
2025-05-12T00:00:00
challenging
In types/setter.ts, create and export Setter `TupleSetter`: - type: 'tuple' - items: each item is a Setter with the corresponding type in the tuple.
typescript
task-10
2025-05-12T00:00:00
challenging
In types/setter.ts, create and export Setter `ObjectSetter`: - type 'object' - properties: dynamically create supported Setter types according to the value type
typescript
task-11
2025-05-12T00:00:00
moderate
In types/setter.ts, create and export Setter `CustomSetter`: - type 'custom' and customType string - value implements generic ValueType In ValueSetter, CustomSetter supports any type of value.
typescript
task-12
2025-05-12T00:00:00
challenging
The Setter implements generic ValueType where: 1. ArraySetter, ObjectSetter and CustomSetter inherit the ValueType from their parent Setter 2. InputSetter maintains backward compatibility without ValueType constraints
typescript
task-13
2025-05-12T00:00:00
moderate
Create a file at types/schema.ts that exports interface `FormSchema`: fields: dynamically create supported Setter types according to the form value type. In types/setter.ts, create and export interfaces: 1. ExpressionEvent with generic SetterValue and FormValue: - value: generic type SetterValue - formValue: generic type FormValue, FormValue's constraints align with FormSchema. 2. Expression with generic SetterValue, FormValue and ExpressionValue: - type: 'expression' - value: value is a function type, parameter is ExpressionEvent, return type is generic type ExpressionValue. 3. SetterMaybeExpression: Expression or generic type ExpressionValue
typescript
task-14
2025-05-12T00:00:00
challenging
In BaseSetter, add optional prop `visible` - a SetterMaybeExpression with ExpressionValue constrained to boolean and FormValue depends on BaseSetter's FormValue. FormSchema needs to pass FormValue to the Setter to populate the visible property of BaseSetter, and omitting the Setter will not cause errors.
typescript
task-15
2025-05-12T00:00:00
challenging
In types/setter.ts, create and export `CustomSetterRender`, has prop `render` which is a FC from React, props contain: - all props in generic type Props - value - onChange, onChange's param newValue could be empty and type depends on `value` Add a new prop customSetterRenderDefinitions to FormSchema: Type: A generic type CustomSetterRenderDef, which is an object type where keys are strings and values are of type CustomSetterRender. Requirement: The customSetterRenderDefinitions prop must include all CustomSetterRender definitions specified by the generic CustomSetterRenderDef.
typescript
task-16
2025-05-12T00:00:00
challenging
CustomSetter needs to constrain the type of customType. In the fields of FormSchema, the customType must be included in the key of CustomSetterRenderDef.
typescript
task-17
2025-05-12T00:00:00
challenging
Add a new optional prop `props` to CustomSetter: The type of `props` is determined by the parameters of CustomSetterRender corresponding to customType in CustomSetterRenderDef, and these parameters must omit the `value` and `onChange`.
typescript
task-18
2025-05-12T00:00:00
challenging
Add a prop `ctxValue` to ExpressionEvent: - type CtxValue. - Only the item within an ArraySetter creates a ctxValue, whose type matches the array item's type. - If not inside an ArraySetter, ctxValue defaults to the FormValue type.
typescript
task-19
2025-05-12T00:00:00
moderate
Edit CustomSetter customType: customType can't be string with hyphen.
typescript
task-20
2025-05-12T00:00:00
challenging
In types/schema.ts, create and export interface `EditorRef`: - setSetterValueByPath: param1: path, an array of nested property keys on FormValue (type-restricted to valid nested paths of FormValue). param2: value, the value to set, whose type must match the nested property type inferred from path. return: void
typescript